mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-05 09:20:52 +01:00
Fix #3532
This commit is contained in:
parent
b46f486680
commit
5c7bfb988c
@ -25,7 +25,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.plotsquared.core.util;
|
package com.plotsquared.core.util;
|
||||||
|
|
||||||
import com.fastasyncworldedit.core.regions.RegionWrapper;
|
|
||||||
import com.plotsquared.core.PlotSquared;
|
import com.plotsquared.core.PlotSquared;
|
||||||
import com.plotsquared.core.configuration.Settings;
|
import com.plotsquared.core.configuration.Settings;
|
||||||
import com.plotsquared.core.location.Location;
|
import com.plotsquared.core.location.Location;
|
||||||
@ -45,6 +44,9 @@ import java.util.UUID;
|
|||||||
|
|
||||||
public class WEManager {
|
public class WEManager {
|
||||||
|
|
||||||
|
private static final BlockVector3 MIN = BlockVector3.at(Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE);
|
||||||
|
private static final BlockVector3 MAX = BlockVector3.at(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
|
||||||
|
|
||||||
public static boolean maskContains(Set<CuboidRegion> mask, int x, int y, int z) {
|
public static boolean maskContains(Set<CuboidRegion> mask, int x, int y, int z) {
|
||||||
for (CuboidRegion region : mask) {
|
for (CuboidRegion region : mask) {
|
||||||
if (RegionUtil.contains(region, x, y, z)) {
|
if (RegionUtil.contains(region, x, y, z)) {
|
||||||
@ -92,7 +94,7 @@ public class WEManager {
|
|||||||
Location location = player.getLocation();
|
Location location = player.getLocation();
|
||||||
String world = location.getWorldName();
|
String world = location.getWorldName();
|
||||||
if (!PlotSquared.get().getPlotAreaManager().hasPlotArea(world)) {
|
if (!PlotSquared.get().getPlotAreaManager().hasPlotArea(world)) {
|
||||||
regions.add(RegionWrapper.GLOBAL());
|
regions.add(new CuboidRegion(MIN, MAX));
|
||||||
return regions;
|
return regions;
|
||||||
}
|
}
|
||||||
PlotArea area = player.getApplicablePlotArea();
|
PlotArea area = player.getApplicablePlotArea();
|
||||||
|
Loading…
Reference in New Issue
Block a user