From 3d1481fec52f672107a8945f5161856d88d1a6c5 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 6 Jul 2021 15:15:35 -0700 Subject: [PATCH] Fix test for InventoryListener --- .../bentobox/listeners/flags/protection/InventoryListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/listeners/flags/protection/InventoryListener.java b/src/main/java/world/bentobox/bentobox/listeners/flags/protection/InventoryListener.java index ef7e103c2..f9e5275be 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/flags/protection/InventoryListener.java +++ b/src/main/java/world/bentobox/bentobox/listeners/flags/protection/InventoryListener.java @@ -76,7 +76,7 @@ public class InventoryListener extends FlagListener { // To differentiate between a Chest and a Trapped Chest we need to get the Block corresponding to the inventory Chest chestInventoryHolder = (Chest) inventoryHolder; try { - if (chestInventoryHolder.getBlock().getType() == Material.TRAPPED_CHEST) { + if (chestInventoryHolder.getType() == Material.TRAPPED_CHEST) { checkIsland(e, player, e.getInventory().getLocation(), Flags.TRAPPED_CHEST); } else { checkIsland(e, player, e.getInventory().getLocation(), Flags.CHEST);