mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixes #1510
This commit is contained in:
parent
a628c5927f
commit
1129a80329
@ -353,6 +353,10 @@ public class PS{
|
||||
return logger;
|
||||
}
|
||||
|
||||
public PlotAreaManager getPlotAreaManager() {
|
||||
return manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Logger.
|
||||
* @see DelegateLogger
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.config.Settings;
|
||||
import com.intellectualcrafters.plot.object.Expression;
|
||||
@ -56,8 +57,21 @@ public class Auto extends SubCommand {
|
||||
public boolean onCommand(PlotPlayer player, String[] args) {
|
||||
PlotArea plotarea = player.getApplicablePlotArea();
|
||||
if (plotarea == null) {
|
||||
MainUtil.sendMessage(player, C.NOT_IN_PLOT_WORLD);
|
||||
return false;
|
||||
if (EconHandler.manager != null) {
|
||||
for (PlotArea area : PS.get().getPlotAreaManager().getAllPlotAreas()) {
|
||||
if (EconHandler.manager.hasPermission(area.worldname, player.getName(), "plots.auto")) {
|
||||
if (plotarea != null) {
|
||||
plotarea = null;
|
||||
break;
|
||||
}
|
||||
plotarea = area;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (plotarea == null) {
|
||||
MainUtil.sendMessage(player, C.NOT_IN_PLOT_WORLD);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
int size_x = 1;
|
||||
int size_z = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user