changed interact blocking to only block containers

This commit is contained in:
Boos 2012-03-22 12:45:48 +01:00
parent 811e6cd3a4
commit 07c9a7c677

View File

@ -287,7 +287,8 @@ public class boosCoolDownListener implements Listener {
boosPriceManager
.payForCommand(player, pre, message);
if (boosConfigManager.getCommandLogging()) {
boosCoolDown.commandLogger(player.getName(), message);
boosCoolDown.commandLogger(player.getName(),
message);
}
} else {
boosPriceManager
@ -514,18 +515,62 @@ public class boosCoolDownListener implements Listener {
&& !boosCoolDown.getPermissions().has(player,
"booscooldowns.dontblock.interact")) {
if (boosWarmUpManager.hasWarmUps(player)) {
boosChat.sendMessageToPlayer(player, boosConfigManager
.getInteractBlockedMessage());
if (event.getClickedBlock().getType().equals("CHEST")
|| event.getClickedBlock().getType()
.equals("FURNACE")
|| event.getClickedBlock().getType()
.equals("BURNING_FURNACE")
|| event.getClickedBlock().getType()
.equals("WORKBENCH")
|| event.getClickedBlock().getType()
.equals("DISPENSER")
|| event.getClickedBlock().getType()
.equals("JUKEBOX")
|| event.getClickedBlock().getType()
.equals("LOCKED_CHEST")
|| event.getClickedBlock().getType()
.equals("ENCHANTMENT_TABLE")
|| event.getClickedBlock().getType()
.equals("BREWING_STAND")
|| event.getClickedBlock().getType()
.equals("CAULDRON")
|| event.getClickedBlock().getType()
.equals("STORAGE_MINECART")){
event.setCancelled(true);
boosChat.sendMessageToPlayer(player,
boosConfigManager.getInteractBlockedMessage());
}
}
}
} else {
if (player != null) {
if (boosWarmUpManager.hasWarmUps(player)) {
boosChat.sendMessageToPlayer(player, boosConfigManager
.getInteractBlockedMessage());
if (event.getClickedBlock().getType().equals("CHEST")
|| event.getClickedBlock().getType()
.equals("FURNACE")
|| event.getClickedBlock().getType()
.equals("BURNING_FURNACE")
|| event.getClickedBlock().getType()
.equals("WORKBENCH")
|| event.getClickedBlock().getType()
.equals("DISPENSER")
|| event.getClickedBlock().getType()
.equals("JUKEBOX")
|| event.getClickedBlock().getType()
.equals("LOCKED_CHEST")
|| event.getClickedBlock().getType()
.equals("ENCHANTMENT_TABLE")
|| event.getClickedBlock().getType()
.equals("BREWING_STAND")
|| event.getClickedBlock().getType()
.equals("CAULDRON")
|| event.getClickedBlock().getType()
.equals("STORAGE_MINECART")){
event.setCancelled(true);
boosChat.sendMessageToPlayer(player,
boosConfigManager.getInteractBlockedMessage());
}
}
}