Fix test for InventoryListener

This commit is contained in:
tastybento 2021-07-06 15:15:35 -07:00
parent ce4b124279
commit 3d1481fec5

View File

@ -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);