Improved lighter handling.

This commit is contained in:
wizjany 2013-03-23 21:10:30 -04:00
parent a6888c3767
commit df5af6129c
3 changed files with 1 additions and 6 deletions

View File

@ -340,10 +340,6 @@ public void onBlockIgnite(BlockIgniteEvent event) {
LocalPlayer localPlayer = plugin.wrapPlayer(player);
if (cause == IgniteCause.FLINT_AND_STEEL || cause == IgniteCause.FIREBALL) {
if (!set.canBuild(localPlayer)) {
event.setCancelled(true);
return;
}
if (!set.allows(DefaultFlag.LIGHTER, localPlayer)
&& !plugin.hasPermission(player, "worldguard.override.lighter")) {
event.setCancelled(true);

View File

@ -776,7 +776,6 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
if (item.getTypeId() == ItemID.FIRE_CHARGE || item.getTypeId() == ItemID.FLINT_AND_TINDER) {
if (!plugin.getGlobalRegionManager().hasBypass(localPlayer, world)
&& !placedInSet.canBuild(localPlayer)
&& !placedInSet.allows(DefaultFlag.LIGHTER, localPlayer)) {
event.setCancelled(true);
event.setUseItemInHand(Result.DENY);

View File

@ -40,7 +40,7 @@ public final class DefaultFlag {
public static final StateFlag OTHER_EXPLOSION = new StateFlag("other-explosion", true);
public static final StateFlag SLEEP = new StateFlag("sleep", true);
public static final StateFlag TNT = new StateFlag("tnt", true, RegionGroup.ALL);
public static final StateFlag LIGHTER = new StateFlag("lighter", true, RegionGroup.ALL);
public static final StateFlag LIGHTER = new StateFlag("lighter", true, RegionGroup.MEMBERS);
public static final StateFlag FIRE_SPREAD = new StateFlag("fire-spread", true);
public static final StateFlag LAVA_FIRE = new StateFlag("lava-fire", true);
public static final StateFlag LIGHTNING = new StateFlag("lightning", true);