mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Don't deny placing a blacklisted item if the block clicked is a chest. People often complain that "i was just trying to open my chest" when they were holding water.
This commit is contained in:
parent
b7481dbd2e
commit
a665e86096
@ -301,19 +301,26 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
|
||||
}
|
||||
|
||||
if (wcfg.getBlacklist() != null) {
|
||||
if (!wcfg.getBlacklist().check(
|
||||
new ItemUseBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
||||
item.getTypeId()), false, false)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!wcfg.getBlacklist().check(
|
||||
new BlockInteractBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
||||
block.getTypeId()), false, false)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
if((block.getType() != Material.CHEST
|
||||
&& block.getType() != Material.DISPENSER
|
||||
&& block.getType() != Material.FURNACE
|
||||
&& block.getType() != Material.BURNING_FURNACE)) {
|
||||
if (!wcfg.getBlacklist().check(
|
||||
new ItemUseBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
||||
item.getTypeId()), false, false)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!wcfg.getBlacklist().check(
|
||||
new BlockInteractBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
||||
block.getTypeId()), false, false)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((block.getType() == Material.CHEST
|
||||
|
Loading…
Reference in New Issue
Block a user