Skip to content

Commit

Permalink
added check for if the map contains the slot type
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Jan 19, 2025
1 parent 95442d6 commit 4511e0f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public Stream<ItemStack> getCuriosItems(String slotType, Player player) {
}
List<ItemStack> stacks = new ArrayList<>();
var curioMap = handler.getCurios();
if (!curioMap.containsKey(slotType)) return Stream.empty();
var stacksHandler = curioMap.get(slotType).getStacks();
for (int i = 0; i < stacksHandler.getSlots(); i++) {
if (!stacksHandler.getStackInSlot(i).isEmpty()) {
Expand Down

0 comments on commit 4511e0f

Please sign in to comment.