Temporarily disabled world guard compat feature.
Until the WG forums community can find a more efficient way to do this without taking a hard dependency.
This commit is contained in:
parent
c1c7398b71
commit
197609d4ba
|
|
@ -35,7 +35,6 @@ import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
import com.sk89q.worldguard.protection.managers.RegionManager;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
|
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
|
||||||
|
|
||||||
//singleton class which manages all GriefPrevention data (except for config options)
|
//singleton class which manages all GriefPrevention data (except for config options)
|
||||||
public abstract class DataStore
|
public abstract class DataStore
|
||||||
|
|
@ -684,21 +683,25 @@ public abstract class DataStore
|
||||||
//if worldguard is installed, also prevent claims from overlapping any worldguard regions
|
//if worldguard is installed, also prevent claims from overlapping any worldguard regions
|
||||||
if(this.worldGuardHooked && creatingPlayer != null)
|
if(this.worldGuardHooked && creatingPlayer != null)
|
||||||
{
|
{
|
||||||
WorldGuardPlugin worldGuard = (WorldGuardPlugin)GriefPrevention.instance.getServer().getPluginManager().getPlugin("WorldGuard");
|
/*WorldGuardPlugin worldGuard = (WorldGuardPlugin)GriefPrevention.instance.getServer().getPluginManager().getPlugin("WorldGuard");
|
||||||
Location lesser = newClaim.getLesserBoundaryCorner();
|
RegionManager manager = worldGuard.getRegionManager(world);
|
||||||
Location greater = newClaim.getGreaterBoundaryCorner();
|
if(manager != null)
|
||||||
for(int x = lesser.getBlockX(); x <= greater.getBlockX(); x++)
|
{
|
||||||
for(int z = lesser.getBlockZ(); z <= greater.getBlockZ(); z++)
|
Location lesser = newClaim.getLesserBoundaryCorner();
|
||||||
for(int y = 0; y <= lesser.getWorld().getMaxHeight(); y++)
|
Location greater = newClaim.getGreaterBoundaryCorner();
|
||||||
{
|
ProtectedCuboidRegion tempRegion = new ProtectedCuboidRegion(
|
||||||
if(!worldGuard.canBuild(creatingPlayer, new Location(lesser.getWorld(), x, y, z)))
|
"GP_TEMP",
|
||||||
{
|
new BlockVector(lesser.getX(), 0, lesser.getZ()),
|
||||||
//result = fail, return null to indicate a region is in the way
|
new BlockVector(greater.getX(), world.getMaxHeight(), greater.getZ()));
|
||||||
result.succeeded = false;
|
ApplicableRegionSet overlaps = manager.getApplicableRegions(tempRegion);
|
||||||
result.claim = null;
|
LocalPlayer localPlayer = worldGuard.wrapPlayer(creatingPlayer);
|
||||||
return result;
|
if(!overlaps.canBuild(localPlayer))
|
||||||
}
|
{
|
||||||
}
|
result.succeeded = false;
|
||||||
|
result.claim = null;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//otherwise add this new claim to the data store to make it effective
|
//otherwise add this new claim to the data store to make it effective
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user