Fix you are not in a plot area for single plot worlds

This commit is contained in:
Jesse Boyd 2019-04-10 11:34:21 +10:00
parent d571f54c65
commit 97903f3870
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -70,13 +70,12 @@ public class SinglePlotAreaManager extends DefaultPlotAreaManager {
@Override public PlotArea getApplicablePlotArea(Location location) { @Override public PlotArea getApplicablePlotArea(Location location) {
PlotArea found = super.getApplicablePlotArea(location); PlotArea found = super.getApplicablePlotArea(location);
if (found != null) { if (found != null)
return found; return found;
}
String world = location.getWorld(); String world = location.getWorld();
return isWorld(world) || world.equals("*") ? return isWorld(world) || world.equals("*") || super.getAllPlotAreas().length == 0 ?
area : area :
super.getApplicablePlotArea(location); null;
} }
@Override public PlotArea getPlotArea(String world, String id) { @Override public PlotArea getPlotArea(String world, String id) {