mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-14 12:57:55 +00:00
Support for WorldGuard 6.0.0 or Higher
We'll have to just change with the times, from this point forward, ProjectKorra will only work with WorldGuard if you are using WorldGuard 6.0.0 or higher.
This commit is contained in:
parent
0aaa575cf6
commit
0f9edfa9c4
1 changed files with 4 additions and 22 deletions
|
@ -1225,30 +1225,12 @@ public class Methods {
|
|||
if (explode.contains(ability)) {
|
||||
if (wg.getGlobalStateManager().get(location.getWorld()).blockTNTExplosions)
|
||||
return true;
|
||||
if (wg.getDescription().getVersion().startsWith("5")) {
|
||||
if (!wg.getGlobalRegionManager().get(world)
|
||||
.getApplicableRegions(location)
|
||||
.allows(DefaultFlag.TNT))
|
||||
return true;
|
||||
} else { // Version 6.x.x and above. API change
|
||||
if (wg.getRegionContainer().get(world)
|
||||
.getApplicableRegions(location)
|
||||
.queryState(null, DefaultFlag.TNT).equals(State.DENY))
|
||||
return true;
|
||||
}
|
||||
if (wg.getRegionContainer().get(world).getApplicableRegions(location).queryState(null, DefaultFlag.TNT).equals(State.DENY))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (wg.getDescription().getVersion().startsWith("5")) {
|
||||
if ((!(wg.getGlobalRegionManager().canBuild(player, location)) || !(wg
|
||||
.getGlobalRegionManager()
|
||||
.canConstruct(player, location)))) {
|
||||
return true;
|
||||
}
|
||||
} else { // Version 6.x.x and above. API change
|
||||
if (!wg.getRegionContainer().createQuery()
|
||||
.testBuild(location, player, (StateFlag[]) null))
|
||||
return true;
|
||||
}
|
||||
if (!wg.getRegionContainer().createQuery().testBuild(location, player, (StateFlag[]) null))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (psp != null && respectPreciousStones) {
|
||||
|
|
Loading…
Reference in a new issue