Skip to content

Commit 40b34f6

Browse files
committed
fix(listener): 对版本改变路径
1 parent 01eb974 commit 40b34f6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plugin/src/main/kotlin/trplugins/menu/module/internal/listener/ListenerItemInteract.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ object ListenerItemInteract {
5353
class InventoryNMSImpl : InventoryNMS() {
5454

5555
private val `clazz$CraftInventoryCustom$MinecraftInventory` =
56-
obcClass("inventory.CraftInventoryCustom\$MinecraftInventory")
56+
if (versionId >= 12108) {
57+
obcClass("inventory.CraftInventoryCustom\$MinecraftInventory")
58+
} else {
59+
obcClass("org.bukkit.craftbukkit.inventory.CraftInventoryCustom\$MinecraftInventory")
60+
}
5761

5862
override fun checkInventory(inventory: Inventory): Boolean {
5963
return `clazz$CraftInventoryCustom$MinecraftInventory`.isInstance((inventory as CraftInventory).inventory)

0 commit comments

Comments
 (0)