From 1bee7c98b8dad1fc1c4e0c9a17a4f5e3008ab987 Mon Sep 17 00:00:00 2001 From: Ryder Belserion Date: Mon, 29 Apr 2024 19:58:24 -0400 Subject: [PATCH] Only give them the display item as a reward if prize commands are empty --- .../com/badbones69/crazycrates/api/PrizeManager.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/paper/src/main/java/com/badbones69/crazycrates/api/PrizeManager.java b/paper/src/main/java/com/badbones69/crazycrates/api/PrizeManager.java index 74d4643f1..0cfdfc786 100644 --- a/paper/src/main/java/com/badbones69/crazycrates/api/PrizeManager.java +++ b/paper/src/main/java/com/badbones69/crazycrates/api/PrizeManager.java @@ -77,10 +77,13 @@ public static void givePrize(Player player, Prize prize, Crate crate) { } } } else { - if (!MiscUtils.isInventoryFull(player)) { - player.getInventory().addItem(prize.getDisplayItem(player)); - } else { - player.getWorld().dropItemNaturally(player.getLocation(), prize.getDisplayItem(player)); + // Only give them the display item as a reward if prize commands are empty. + if (crate.getPrizeCommands().isEmpty()) { + if (!MiscUtils.isInventoryFull(player)) { + player.getInventory().addItem(prize.getDisplayItem(player)); + } else { + player.getWorld().dropItemNaturally(player.getLocation(), prize.getDisplayItem(player)); + } } }