Skip to content

Commit

Permalink
Use correct getCommands() method
Browse files Browse the repository at this point in the history
```yml
    1:
      DisplayName: '<red>Porkchop'
      DisplayItem: 'PORKCHOP'
      DisplayAmount: 4
      Chance: 60
```

If you simply want to give basic items without the need for using `Items:` or `Commands:`, You can configure a prize like this and it will give 4 porkchop.

DisplayAmount defines how many items to give, DisplayItem defines the material to give to the player.
  • Loading branch information
ryderbelserion committed Apr 30, 2024
1 parent 1bee7c9 commit 4cdb49d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static void givePrize(Player player, Prize prize, Crate crate) {
}
} else {
// Only give them the display item as a reward if prize commands are empty.
if (crate.getPrizeCommands().isEmpty()) {
if (prize.getCommands().isEmpty()) {
if (!MiscUtils.isInventoryFull(player)) {
player.getInventory().addItem(prize.getDisplayItem(player));
} else {
Expand Down

0 comments on commit 4cdb49d

Please sign in to comment.