forked from SteamWar/SteamWar
Add customModelData to Velocity SWItem
This commit is contained in:
@@ -42,6 +42,7 @@ public class SWItem {
|
||||
@Getter
|
||||
private InvCallback callback;
|
||||
private int color = 0;
|
||||
private int customModelData = 0;
|
||||
|
||||
public SWItem(String material, Message title) {
|
||||
this.material = material.toUpperCase();
|
||||
@@ -64,6 +65,11 @@ public class SWItem {
|
||||
return this;
|
||||
}
|
||||
|
||||
public SWItem setCustomModelData(int customModelData) {
|
||||
this.customModelData = customModelData;
|
||||
return this;
|
||||
}
|
||||
|
||||
public JsonObject writeToString(Chatter player, int position) {
|
||||
JsonObject object = new JsonObject();
|
||||
object.addProperty("material", material);
|
||||
@@ -84,6 +90,9 @@ public class SWItem {
|
||||
}
|
||||
object.add("lore", array);
|
||||
}
|
||||
if (customModelData > 0) {
|
||||
object.addProperty("customModelData", customModelData);
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user