diff --git a/paper/src/main/java/com/badbones69/crazycrates/api/objects/Crate.java b/paper/src/main/java/com/badbones69/crazycrates/api/objects/Crate.java index 51cb61c32..b3eea42a3 100644 --- a/paper/src/main/java/com/badbones69/crazycrates/api/objects/Crate.java +++ b/paper/src/main/java/com/badbones69/crazycrates/api/objects/Crate.java @@ -564,7 +564,7 @@ public List getPrizes() { */ public Prize getPrize(String name) { for (Prize prize : this.prizes) { - if (prize.getPrizeName().equalsIgnoreCase(name)) return prize; + if (prize.getPrizeNumber().equalsIgnoreCase(name)) return prize; } return null; diff --git a/paper/src/main/java/com/badbones69/crazycrates/api/objects/Prize.java b/paper/src/main/java/com/badbones69/crazycrates/api/objects/Prize.java index 40245e379..5ec163aef 100644 --- a/paper/src/main/java/com/badbones69/crazycrates/api/objects/Prize.java +++ b/paper/src/main/java/com/badbones69/crazycrates/api/objects/Prize.java @@ -117,7 +117,7 @@ public String getPrizeNumber() { public ItemStack getDisplayItem() { ItemStack itemStack = this.displayItem.build(); - itemStack.editMeta(itemMeta -> itemMeta.getPersistentDataContainer().set(PersistentKeys.crate_prize.getNamespacedKey(), PersistentDataType.STRING, this.prizeName)); + itemStack.editMeta(itemMeta -> itemMeta.getPersistentDataContainer().set(PersistentKeys.crate_prize.getNamespacedKey(), PersistentDataType.STRING, this.prizeNumber)); return itemStack; } @@ -128,7 +128,7 @@ public ItemStack getDisplayItem() { public ItemStack getDisplayItem(Player player) { ItemStack itemStack = this.displayItem.setTarget(player).build(); - itemStack.editMeta(itemMeta -> itemMeta.getPersistentDataContainer().set(PersistentKeys.crate_prize.getNamespacedKey(), PersistentDataType.STRING, this.prizeName)); + itemStack.editMeta(itemMeta -> itemMeta.getPersistentDataContainer().set(PersistentKeys.crate_prize.getNamespacedKey(), PersistentDataType.STRING, this.prizeNumber)); return itemStack; }