Skip to content

Commit

Permalink
更新 TLib 6.0最新版
Browse files Browse the repository at this point in the history
修复 1.20.4 的动态物品报错
  • Loading branch information
Glomzzz committed Feb 11, 2024
1 parent 2c6fe1c commit 042b1ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
7 changes: 3 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ taboolib {
install("platform-bukkit")
install("module-nms")
classifier = null
version = "6.0.12-35"
version = "6.0.12-69"
}

repositories {
Expand All @@ -84,9 +84,8 @@ dependencies {
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.6.10")

compileOnly("ink.ptms:nms-all:1.0.0")
compileOnly("ink.ptms.core:v11900:11900:mapped")
compileOnly("ink.ptms.core:v11900:11900:universal")
compileOnly("ink.ptms.core:v11200:11200")

// compileOnly("ink.ptms.core:v12004-minimize:universal")

compileOnly("io.lumine:Mythic-Dist:5.0.3")
compileOnly("com.github.LoneDev6:api-itemsadder:3.0.0")
Expand Down
17 changes: 7 additions & 10 deletions src/main/kotlin/com/skillw/itemsystem/util/nms/NMS.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.bukkit.World
import org.bukkit.entity.Entity
import org.bukkit.entity.Player
import org.bukkit.inventory.ItemStack
import taboolib.common.util.unsafeLazy
import taboolib.module.nms.MinecraftVersion
import taboolib.module.nms.nmsProxy

Expand All @@ -16,17 +17,13 @@ import taboolib.module.nms.nmsProxy
* @date 2022/8/9 22:24 Copyright 2022 user. All rights reserved.
*/
abstract class NMS {
val itemsField by lazy {
when (MinecraftVersion.major) {
in 9..11 -> "c"
else -> "b"
}
val itemsField by unsafeLazy {
if (MinecraftVersion.major >= 9) "c"
else "b"
}
val itemField by lazy {
when (MinecraftVersion.major) {
in 9..11 -> "f"
else -> "c"
}
val itemField by unsafeLazy {
if (MinecraftVersion.major >= 9) "f"
else "c"
}

enum class VersionType {
Expand Down

0 comments on commit 042b1ba

Please sign in to comment.