mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 02:25:25 +01:00
Fix NPE in StockCounter on autofill/no item found (Fixes #376)
This commit is contained in:
parent
b43454531e
commit
7a1c091c74
@ -54,10 +54,12 @@ public class StockCounterModule implements Listener {
|
||||
}
|
||||
|
||||
ItemStack itemTradedByShop = determineItemTradedByShop(event.getSignLine(ITEM_LINE));
|
||||
if (itemTradedByShop != null) {
|
||||
Inventory chestShopInventory = uBlock.findConnectedContainer(event.getSign()).getInventory();
|
||||
|
||||
event.setSignLine(QUANTITY_LINE, getQuantityLineWithCounter(quantity, itemTradedByShop, chestShopInventory));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public static void onInventoryClose(InventoryCloseEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user