Add Minecraft 1.19.4 support
This commit is contained in:
@@ -33,7 +33,7 @@ object BrigardierSupport {
|
||||
}
|
||||
|
||||
@Suppress("HasPlatformType")
|
||||
fun resolveCommandManager() = (server as org.bukkit.craftbukkit.v1_19_R2.CraftServer)
|
||||
fun resolveCommandManager() = (server as org.bukkit.craftbukkit.v1_19_R3.CraftServer)
|
||||
.server.vanillaCommandDispatcher
|
||||
|
||||
internal fun registerAll() {
|
||||
@@ -52,7 +52,7 @@ object BrigardierSupport {
|
||||
fun updateCommandTree() {
|
||||
onlinePlayers.forEach {
|
||||
// send the command tree
|
||||
resolveCommandManager().sendCommands((it as org.bukkit.craftbukkit.v1_19_R2.entity.CraftPlayer).handle)
|
||||
resolveCommandManager().sendCommands((it as org.bukkit.craftbukkit.v1_19_R3.entity.CraftPlayer).handle)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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_19_R2.entity.CraftEntity
|
||||
import org.bukkit.craftbukkit.v1_19_R2.inventory.CraftItemStack
|
||||
import org.bukkit.craftbukkit.v1_19_R3.entity.CraftEntity
|
||||
import org.bukkit.craftbukkit.v1_19_R3.inventory.CraftItemStack
|
||||
import org.bukkit.entity.Entity
|
||||
import org.bukkit.inventory.ItemStack
|
||||
|
||||
|
@@ -138,7 +138,7 @@ 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_19_R2.CraftWorld ?: return null
|
||||
val craftWorld = world as? org.bukkit.craftbukkit.v1_19_R3.CraftWorld ?: return null
|
||||
return craftWorld.createEntity(this, entityType.entityClass)?.let {
|
||||
craftWorld.handle.addFreshEntity(it)
|
||||
return@let it.bukkitEntity
|
||||
|
@@ -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_19_R2.entity.CraftEntity
|
||||
import org.bukkit.craftbukkit.v1_19_R3.entity.CraftEntity
|
||||
import org.bukkit.entity.Entity
|
||||
import org.bukkit.entity.EntityType
|
||||
|
||||
|
Reference in New Issue
Block a user