reverted chest recognition for beacon and enderchest

This commit is contained in:
Jascha Starke 2013-03-28 09:46:03 +01:00
parent 071279ff02
commit 467653891f

View file

@ -18,6 +18,7 @@
package de.jaschastarke.minecraft.limitedcreative.limits; package de.jaschastarke.minecraft.limitedcreative.limits;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity; 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.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.inventory.BeaconInventory;
import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.InventoryHolder;
import org.bukkit.material.DirectionalContainer; import org.bukkit.material.DirectionalContainer;
@ -186,8 +186,9 @@ public class PlayerListener implements Listener {
*/ */
private boolean isChest(Block block) { private boolean isChest(Block block) {
return block.getState() instanceof InventoryHolder || return block.getState() instanceof InventoryHolder ||
block.getState() instanceof DirectionalContainer || block.getState().getData() instanceof DirectionalContainer ||
block.getState() instanceof BeaconInventory; block.getType().equals(Material.ENDER_CHEST) ||
block.getType().equals(Material.BEACON);
} }
private boolean checkPermission(Player player, IAbstractPermission perm) { private boolean checkPermission(Player player, IAbstractPermission perm) {