Skip to content

Commit

Permalink
Bump to mc 1.20.4 (#61)
Browse files Browse the repository at this point in the history
Co-authored-by: mgvpri <mgvpridev@gmail.com>
  • Loading branch information
mgvpri and mgvpriDev committed Jan 28, 2024
1 parent 5e2b8ca commit 7f9ee62
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val githubRepo = "jakobkmar/KSpigot"

group = "net.axay"
version = "1.20.2"
version = "1.20.3"

description = "A Kotlin API for Minecraft plugins using the Spigot or Paper toolchain"

Expand All @@ -25,7 +25,7 @@ repositories {
}

dependencies {
paperweight.paperDevBundle("1.20.2-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.20.4-R0.1-SNAPSHOT")

api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
Expand Down
Expand Up @@ -33,7 +33,7 @@ object BrigardierSupport {
}

@Suppress("HasPlatformType")
fun resolveCommandManager() = (server as org.bukkit.craftbukkit.v1_20_R2.CraftServer)
fun resolveCommandManager() = (server as org.bukkit.craftbukkit.v1_20_R3.CraftServer)
.server.vanillaCommandDispatcher

internal fun registerAll() {
Expand All @@ -52,7 +52,7 @@ object BrigardierSupport {
fun updateCommandTree() {
onlinePlayers.forEach {
// send the command tree
resolveCommandManager().sendCommands((it as org.bukkit.craftbukkit.v1_20_R2.entity.CraftPlayer).handle)
resolveCommandManager().sendCommands((it as org.bukkit.craftbukkit.v1_20_R3.entity.CraftPlayer).handle)
}
}
}
4 changes: 2 additions & 2 deletions src/main/kotlin/net/axay/kspigot/data/NBTDataLoader.kt
Expand Up @@ -4,8 +4,8 @@ package net.axay.kspigot.data

import net.axay.kspigot.annotations.NMS_General
import net.minecraft.nbt.CompoundTag
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftEntity
import org.bukkit.craftbukkit.v1_20_R2.inventory.CraftItemStack
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity
import org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack
import org.bukkit.entity.Entity
import org.bukkit.inventory.ItemStack

Expand Down
Expand Up @@ -138,8 +138,8 @@ fun Player.showOnlinePlayers() {
@Deprecated("This function is unstable and it cannot be guaranteed that it will work at any time in the future.")
@NMS_General
fun Location.spawnCleanEntity(entityType: EntityType): Entity? {
val craftWorld = world as? org.bukkit.craftbukkit.v1_20_R2.CraftWorld ?: return null
return craftWorld.createEntity(this, entityType.entityClass)?.let {
val craftWorld = world as? org.bukkit.craftbukkit.v1_20_R3.CraftWorld ?: return null
return craftWorld.makeEntity(this, entityType.entityClass!!)?.let {
craftWorld.handle.addFreshEntity(it)
return@let it.bukkitEntity
}
Expand Down Expand Up @@ -197,7 +197,7 @@ fun Player.give(vararg itemStacks: ItemStack) = inventory.addItem(*itemStacks)
* Adds all equipment locks to every equipment slot
*/
fun ArmorStand.fullLock() {
for (slot in EquipmentSlot.values()) {
for (slot in EquipmentSlot.entries) {
lock(slot)
}
}
Expand All @@ -207,7 +207,7 @@ fun ArmorStand.fullLock() {
* @param slot the slot which gets locked
*/
fun ArmorStand.lock(slot: EquipmentSlot) {
for (lock in ArmorStand.LockType.values()) {
for (lock in ArmorStand.LockType.entries) {
addEquipmentLock(slot, lock)
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/net/axay/kspigot/structures/Structure.kt
Expand Up @@ -10,7 +10,7 @@ import org.bukkit.Location
import org.bukkit.Material
import org.bukkit.block.Block
import org.bukkit.block.data.BlockData
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftEntity
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity
import org.bukkit.entity.Entity
import org.bukkit.entity.EntityType

Expand Down

0 comments on commit 7f9ee62

Please sign in to comment.