* Fixed bug being unable to put in Blocks when using Chest commands.

This commit is contained in:
Steffion 2013-08-25 19:50:42 +02:00
parent 7360d17c9e
commit 580afb014d

View File

@ -33,18 +33,17 @@ public class OnInventoryClickEvent implements Listener {
Inventory inv = event.getInventory();
if (inv.getType().equals(InventoryType.CHEST)) {
if (inv.getName().startsWith("\u00A7r")) {
if (inv.getName().contains("DisguiseBlocks")) {
if (event.getCurrentItem() != null) {
if (!event.getCurrentItem().getType().isBlock()) {
event.setCancelled(true);
MessageM.sendFMessage(player,
ConfigC.error_setNotABlock, true);
}
if (inv.getName().contains("DisguiseBlocks")) {
if (event.getCurrentItem() != null) {
if (!event.getCurrentItem().getType().isBlock()) {
event.setCancelled(true);
MessageM.sendFMessage(player,
ConfigC.error_setNotABlock, true);
}
return;
}
return;
} else if (inv.getName().startsWith("\u00A7r")) {
event.setCancelled(true);
ItemStack item = event.getCurrentItem();
String arenaname = inv