mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 15:17:36 +01:00
Improved lighter handling.
This commit is contained in:
parent
a6888c3767
commit
df5af6129c
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user