mirror of
https://github.com/LordBoos/boosCooldowns.git
synced 2024-11-23 02:55:11 +01:00
changed interact blocking to only block containers
This commit is contained in:
parent
811e6cd3a4
commit
07c9a7c677
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user