diff --git a/src/com/projectkorra/projectkorra/GeneralMethods.java b/src/com/projectkorra/projectkorra/GeneralMethods.java index 550462c5..ec0f784a 100644 --- a/src/com/projectkorra/projectkorra/GeneralMethods.java +++ b/src/com/projectkorra/projectkorra/GeneralMethods.java @@ -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; } } diff --git a/src/com/projectkorra/projectkorra/airbending/AirSuction.java b/src/com/projectkorra/projectkorra/airbending/AirSuction.java index a85e7b32..b5707469 100644 --- a/src/com/projectkorra/projectkorra/airbending/AirSuction.java +++ b/src/com/projectkorra/projectkorra/airbending/AirSuction.java @@ -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)) {