KSpigot 1.19 (#50)

* Use new papermc repo url

* Update gradle plugins

* Update paper dependencies to 1.19 and bump version

* Package renames

* Update to kotlin 1.7.0

* Update kotlinx-serialization-json to 1.3.3

* Update kotlinx-coroutines to 1.6.2

* Correct version bump

* Update versions in gradle_example.md

* update some guide stuff

Co-authored-by: l4zs <business@l4zs.de>
This commit is contained in:
mooziii
2022-06-09 21:27:08 +02:00
committed by GitHub
parent 2db6b935ba
commit ed338a712c
11 changed files with 59 additions and 34 deletions

View File

@@ -33,7 +33,7 @@ object BrigardierSupport {
}
@Suppress("HasPlatformType")
fun resolveCommandManager() = (server as org.bukkit.craftbukkit.v1_18_R2.CraftServer)
fun resolveCommandManager() = (server as org.bukkit.craftbukkit.v1_19_R1.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_18_R2.entity.CraftPlayer).handle)
resolveCommandManager().sendCommands((it as org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer).handle)
}
}
}

View File

@@ -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_18_R2.entity.CraftEntity
import org.bukkit.craftbukkit.v1_18_R2.inventory.CraftItemStack
import org.bukkit.craftbukkit.v1_19_R1.entity.CraftEntity
import org.bukkit.craftbukkit.v1_19_R1.inventory.CraftItemStack
import org.bukkit.entity.Entity
import org.bukkit.inventory.ItemStack

View File

@@ -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_18_R2.CraftWorld ?: return null
val craftWorld = world as? org.bukkit.craftbukkit.v1_19_R1.CraftWorld ?: return null
return craftWorld.createEntity(this, entityType.entityClass)?.let {
craftWorld.handle.addFreshEntity(it)
return@let it.bukkitEntity

View File

@@ -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_18_R2.entity.CraftEntity
import org.bukkit.craftbukkit.v1_19_R1.entity.CraftEntity
import org.bukkit.entity.Entity
import org.bukkit.entity.EntityType