From 4798b160152f3b0755c1fc63e0cc9fa4b912d85e Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Mon, 29 Sep 2025 11:10:11 +0200 Subject: [PATCH] Hotfix SWItem.setCustomModelData --- .../SpigotCore_Main/src/de/steamwar/inventory/SWItem.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java index 7fb27810..7ca0829d 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/inventory/SWItem.java @@ -21,6 +21,7 @@ package de.steamwar.inventory; import com.google.gson.JsonArray; import com.google.gson.JsonObject; +import de.steamwar.core.Core; import de.steamwar.core.FlatteningWrapper; import de.steamwar.core.TrickyTrialsWrapper; import org.bukkit.Material; @@ -216,8 +217,10 @@ public class SWItem { } public SWItem setCustomModelData(int customModelData) { - itemMeta.setCustomModelData(customModelData); - itemStack.setItemMeta(itemMeta); + if (Core.getVersion() > 12) { + itemMeta.setCustomModelData(customModelData); + itemStack.setItemMeta(itemMeta); + } return this; }