Respect LIGHTER flag for ignition build checks

This commit is contained in:
wizjany 2013-03-23 15:19:56 -04:00
parent 1bd367ddde
commit a6888c3767

View File

@ -776,7 +776,8 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
if (item.getTypeId() == ItemID.FIRE_CHARGE || item.getTypeId() == ItemID.FLINT_AND_TINDER) { if (item.getTypeId() == ItemID.FIRE_CHARGE || item.getTypeId() == ItemID.FLINT_AND_TINDER) {
if (!plugin.getGlobalRegionManager().hasBypass(localPlayer, world) if (!plugin.getGlobalRegionManager().hasBypass(localPlayer, world)
&& !placedInSet.canBuild(localPlayer)) { && !placedInSet.canBuild(localPlayer)
&& !placedInSet.allows(DefaultFlag.LIGHTER, localPlayer)) {
event.setCancelled(true); event.setCancelled(true);
event.setUseItemInHand(Result.DENY); event.setUseItemInHand(Result.DENY);
player.sendMessage(ChatColor.DARK_RED + "You're not allowed to use that here."); player.sendMessage(ChatColor.DARK_RED + "You're not allowed to use that here.");