forked from SteamWar/SteamWar
Hotfix SWItem.setCustomModelData
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user