Lighter changes in BlockIgnite as well

This commit is contained in:
wizjany 2013-06-02 11:19:12 -04:00
parent b41be0c319
commit a0d0ff0b92

View File

@ -339,8 +339,11 @@ public void onBlockIgnite(BlockIgniteEvent event) {
if (player != null && !plugin.getGlobalRegionManager().hasBypass(player, world)) {
LocalPlayer localPlayer = plugin.wrapPlayer(player);
// this is preliminarily handled in the player listener under handleBlockRightClick
// why it's handled here too, no one knows
if (cause == IgniteCause.FLINT_AND_STEEL || cause == IgniteCause.FIREBALL) {
if (!set.allows(DefaultFlag.LIGHTER, localPlayer)
if (!set.allows(DefaultFlag.LIGHTER)
&& !set.canBuild(localPlayer)
&& !plugin.hasPermission(player, "worldguard.override.lighter")) {
event.setCancelled(true);
return;