mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-02 17:09:35 +01:00
Merge pull request #94 from yetanotherx/chest-blacklist.
Don't deny placing a blacklisted item if the block clicked is a chest.
This commit is contained in:
commit
6db8e1d842
@ -301,19 +301,26 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (wcfg.getBlacklist() != null) {
|
if (wcfg.getBlacklist() != null) {
|
||||||
if (!wcfg.getBlacklist().check(
|
if((block.getType() != Material.CHEST
|
||||||
new ItemUseBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
&& block.getType() != Material.DISPENSER
|
||||||
item.getTypeId()), false, false)) {
|
&& block.getType() != Material.FURNACE
|
||||||
event.setCancelled(true);
|
&& block.getType() != Material.BURNING_FURNACE)) {
|
||||||
return;
|
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 (!wcfg.getBlacklist().check(
|
|
||||||
new BlockInteractBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
|
|
||||||
block.getTypeId()), false, false)) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((block.getType() == Material.CHEST
|
if ((block.getType() == Material.CHEST
|
||||||
|
Loading…
Reference in New Issue
Block a user