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:
2011-05-03 01:32:00 -07:00
commit 6db8e1d842

View File

@ -301,6 +301,10 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
} }
if (wcfg.getBlacklist() != null) { if (wcfg.getBlacklist() != null) {
if((block.getType() != Material.CHEST
&& block.getType() != Material.DISPENSER
&& block.getType() != Material.FURNACE
&& block.getType() != Material.BURNING_FURNACE)) {
if (!wcfg.getBlacklist().check( if (!wcfg.getBlacklist().check(
new ItemUseBlacklistEvent(plugin.wrapPlayer(player), toVector(block), new ItemUseBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
item.getTypeId()), false, false)) { item.getTypeId()), false, false)) {
@ -314,6 +318,9 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
}
} }
if ((block.getType() == Material.CHEST if ((block.getType() == Material.CHEST