Skip to content

Commit

Permalink
Fix an NPE and remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
GroobleDierne committed Dec 10, 2024
1 parent d8c74e2 commit 6dc0abc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void onSignBreak(BlockDestroyEvent event) {

@EventHandler(priority = EventPriority.MONITOR)
public void onInventoryClose(InventoryCloseEvent event) {
if (!Util.isValidInventory(event.getInventory().getType())) return;
if (event.getInventory().getLocation() == null || !Util.isValidInventory(event.getInventory().getType())) return;

AccountChest chest = getAccountChestFromHolder(event.getInventory());
if (chest == null) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public void applyOperationsForChunk(Chunk chunk) {
).findAny();

if (accountChest.isEmpty()) continue;
System.out.println("chest found");

if (operation.getAmount() < 0) {
accountChest.get().remove(-operation.getAmount());
Expand Down

0 comments on commit 6dc0abc

Please sign in to comment.