fix firebending with worldguard

This commit is contained in:
PhanaticD 2019-01-02 11:21:22 -05:00
parent bb912f0423
commit e4e179bd44
2 changed files with 4 additions and 2 deletions

View file

@ -50,6 +50,7 @@ import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.flags.Flags;
import com.sk89q.worldguard.protection.flags.StateFlag;
import com.songoda.kingdoms.constants.land.Land;
import com.songoda.kingdoms.constants.land.SimpleChunkLocation;
import com.songoda.kingdoms.constants.player.KingdomPlayer;
@ -1428,7 +1429,8 @@ public class GeneralMethods {
if (wg.getPlatform().getGlobalStateManager().get(BukkitAdapter.adapt(location.getWorld())).blockTNTExplosions) {
return true;
}
if (!wg.getPlatform().getRegionContainer().createQuery().testState(BukkitAdapter.adapt(location), WorldGuardPlugin.inst().wrapPlayer(player), Flags.TNT)) {
StateFlag.State tntflag = wg.getPlatform().getRegionContainer().createQuery().queryState(BukkitAdapter.adapt(location), WorldGuardPlugin.inst().wrapPlayer(player), Flags.TNT);
if (tntflag != null && tntflag.equals(StateFlag.State.DENY)) {
return true;
}
}

View file

@ -132,7 +132,7 @@ public class AirSuction extends AirAbility {
ignore[i] = AirBlast.TDOORS[i - getTransparentMaterials().length - AirBlast.DOORS.length];
}
}
final Location location = GeneralMethods.getTargetedLocation(player, getSelectRange(), ignore);
final Location location = GeneralMethods.getTargetedLocation(player, getSelectRange(), false, ignore);
if (location.getBlock().isLiquid() || GeneralMethods.isSolid(location.getBlock())) {
return;
} else if (GeneralMethods.isRegionProtectedFromBuild(player, "AirSuction", location)) {