Fixed NullPointerException on Mohist servers when processing inventory transactions
This commit is contained in:
parent
e7c5078035
commit
cfb53f766e
1 changed files with 7 additions and 2 deletions
|
|
@ -317,7 +317,12 @@ public final class InventoryChangeListener extends Queue implements Listener {
|
|||
return;
|
||||
}
|
||||
|
||||
Location location = event.getSource().getLocation();
|
||||
Inventory sourceInventory = event.getSource();
|
||||
if (sourceInventory == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location location = sourceInventory.getLocation();
|
||||
if (location == null) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -327,7 +332,7 @@ public final class InventoryChangeListener extends Queue implements Listener {
|
|||
return;
|
||||
}
|
||||
|
||||
InventoryHolder sourceHolder = PaperAdapter.ADAPTER.getHolder(event.getSource(), false);
|
||||
InventoryHolder sourceHolder = PaperAdapter.ADAPTER.getHolder(sourceInventory, false);
|
||||
if (sourceHolder == null) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue