From 467653891fa4a7c43afc93511596b2c80d30e221 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Thu, 28 Mar 2013 09:46:03 +0100 Subject: [PATCH] reverted chest recognition for beacon and enderchest --- .../minecraft/limitedcreative/limits/PlayerListener.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java index 74c90ca..e160c40 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/PlayerListener.java @@ -18,6 +18,7 @@ package de.jaschastarke.minecraft.limitedcreative.limits; import org.bukkit.GameMode; +import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; @@ -35,7 +36,6 @@ import org.bukkit.event.player.PlayerEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerPickupItemEvent; -import org.bukkit.inventory.BeaconInventory; import org.bukkit.inventory.InventoryHolder; import org.bukkit.material.DirectionalContainer; @@ -186,8 +186,9 @@ public class PlayerListener implements Listener { */ private boolean isChest(Block block) { return block.getState() instanceof InventoryHolder || - block.getState() instanceof DirectionalContainer || - block.getState() instanceof BeaconInventory; + block.getState().getData() instanceof DirectionalContainer || + block.getType().equals(Material.ENDER_CHEST) || + block.getType().equals(Material.BEACON); } private boolean checkPermission(Player player, IAbstractPermission perm) {