mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-11-01 01:42:18 +00:00
fix firebending with worldguard
This commit is contained in:
parent
bb912f0423
commit
e4e179bd44
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue