Bump to mc 1.20.4 (#61)

Co-authored-by: mgvpri <mgvpridev@gmail.com>
This commit is contained in:
mgvpri
2024-01-28 12:30:33 +01:00
committed by GitHub
parent 5e2b8ca5c6
commit 7f9ee6243f
5 changed files with 11 additions and 11 deletions

View File

@@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val githubRepo = "jakobkmar/KSpigot" val githubRepo = "jakobkmar/KSpigot"
group = "net.axay" group = "net.axay"
version = "1.20.2" version = "1.20.3"
description = "A Kotlin API for Minecraft plugins using the Spigot or Paper toolchain" description = "A Kotlin API for Minecraft plugins using the Spigot or Paper toolchain"
@@ -25,7 +25,7 @@ repositories {
} }
dependencies { 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-serialization-json:1.6.2")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3") api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")

View File

@@ -33,7 +33,7 @@ object BrigardierSupport {
} }
@Suppress("HasPlatformType") @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 .server.vanillaCommandDispatcher
internal fun registerAll() { internal fun registerAll() {
@@ -52,7 +52,7 @@ object BrigardierSupport {
fun updateCommandTree() { fun updateCommandTree() {
onlinePlayers.forEach { onlinePlayers.forEach {
// send the command tree // 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)
} }
} }
} }

View File

@@ -4,8 +4,8 @@ package net.axay.kspigot.data
import net.axay.kspigot.annotations.NMS_General import net.axay.kspigot.annotations.NMS_General
import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.CompoundTag
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftEntity import org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity
import org.bukkit.craftbukkit.v1_20_R2.inventory.CraftItemStack import org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack
import org.bukkit.entity.Entity import org.bukkit.entity.Entity
import org.bukkit.inventory.ItemStack import org.bukkit.inventory.ItemStack

View File

@@ -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.") @Deprecated("This function is unstable and it cannot be guaranteed that it will work at any time in the future.")
@NMS_General @NMS_General
fun Location.spawnCleanEntity(entityType: EntityType): Entity? { fun Location.spawnCleanEntity(entityType: EntityType): Entity? {
val craftWorld = world as? org.bukkit.craftbukkit.v1_20_R2.CraftWorld ?: return null val craftWorld = world as? org.bukkit.craftbukkit.v1_20_R3.CraftWorld ?: return null
return craftWorld.createEntity(this, entityType.entityClass)?.let { return craftWorld.makeEntity(this, entityType.entityClass!!)?.let {
craftWorld.handle.addFreshEntity(it) craftWorld.handle.addFreshEntity(it)
return@let it.bukkitEntity return@let it.bukkitEntity
} }
@@ -197,7 +197,7 @@ fun Player.give(vararg itemStacks: ItemStack) = inventory.addItem(*itemStacks)
* Adds all equipment locks to every equipment slot * Adds all equipment locks to every equipment slot
*/ */
fun ArmorStand.fullLock() { fun ArmorStand.fullLock() {
for (slot in EquipmentSlot.values()) { for (slot in EquipmentSlot.entries) {
lock(slot) lock(slot)
} }
} }
@@ -207,7 +207,7 @@ fun ArmorStand.fullLock() {
* @param slot the slot which gets locked * @param slot the slot which gets locked
*/ */
fun ArmorStand.lock(slot: EquipmentSlot) { fun ArmorStand.lock(slot: EquipmentSlot) {
for (lock in ArmorStand.LockType.values()) { for (lock in ArmorStand.LockType.entries) {
addEquipmentLock(slot, lock) addEquipmentLock(slot, lock)
} }
} }

View File

@@ -10,7 +10,7 @@ import org.bukkit.Location
import org.bukkit.Material import org.bukkit.Material
import org.bukkit.block.Block import org.bukkit.block.Block
import org.bukkit.block.data.BlockData 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.Entity
import org.bukkit.entity.EntityType import org.bukkit.entity.EntityType