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