Make worldguard region a setter to clear the cache

This commit is contained in:
fullwall 2023-07-08 23:11:48 +08:00
parent ecc5239899
commit e7de8d6b53

View File

@ -50,7 +50,7 @@ public class WanderWaypointProvider implements WaypointProvider {
private final List<Location> regionCentres = Lists.newArrayList();
private PhTreeSolid<Boolean> tree = PhTreeSolid.create(3);
@Persist
public String worldguardRegion;
private String worldguardRegion;
private Object worldguardRegionCache;
@Persist
public int xrange = DEFAULT_XRANGE;
@ -310,6 +310,11 @@ public class WanderWaypointProvider implements WaypointProvider {
}
}
public void setWorldGuardRegion(String region) {
this.worldguardRegion = region;
this.worldguardRegionCache = null;
}
public void setXYRange(int xrange, int yrange) {
this.xrange = xrange;
this.yrange = yrange;