Fixed NullPointerException when logging container transactions

This commit is contained in:
Intelli 2021-07-21 19:01:32 -06:00
parent 45e1fee9ff
commit 718d7d7a80

View file

@ -174,8 +174,9 @@ public final class InventoryChangeListener extends Queue implements Listener {
int chestId = getChestId(loggingChestId); int chestId = getChestId(loggingChestId);
if (chestId > 0) { if (chestId > 0) {
if (ConfigHandler.forceContainer.get(loggingChestId) != null) { List<ItemStack[]> forceList = ConfigHandler.forceContainer.get(loggingChestId);
int forceSize = ConfigHandler.forceContainer.get(loggingChestId).size(); if (forceList != null) {
int forceSize = forceList.size();
List<ItemStack[]> list = ConfigHandler.oldContainer.get(loggingChestId); List<ItemStack[]> list = ConfigHandler.oldContainer.get(loggingChestId);
if (list != null && list.size() <= forceSize) { if (list != null && list.size() <= forceSize) {