Skip to content

Commit

Permalink
Fixed NullPointerException on Mohist servers when processing inventor…
Browse files Browse the repository at this point in the history
…y transactions
  • Loading branch information
Intelli committed May 19, 2024
1 parent e7c5078 commit cfb53f7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,12 @@ protected void onInventoryMoveItemEvent(InventoryMoveItemEvent event) {
return;
}

Location location = event.getSource().getLocation();
Inventory sourceInventory = event.getSource();
if (sourceInventory == null) {
return;
}

Location location = sourceInventory.getLocation();
if (location == null) {
return;
}
Expand All @@ -327,7 +332,7 @@ protected void onInventoryMoveItemEvent(InventoryMoveItemEvent event) {
return;
}

InventoryHolder sourceHolder = PaperAdapter.ADAPTER.getHolder(event.getSource(), false);
InventoryHolder sourceHolder = PaperAdapter.ADAPTER.getHolder(sourceInventory, false);
if (sourceHolder == null) {
return;
}
Expand Down

2 comments on commit cfb53f7

@aktosezz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am sorry i don't understand english well what should I do with this?

@NOIR-DexPrkr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am sorry i don't understand english well what should I do with this?

Update the plugin, man

Please sign in to comment.