mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fixes #972
This commit is contained in:
parent
9e32ce9885
commit
fe43143bdb
@ -23,7 +23,6 @@ package com.intellectualcrafters.plot.commands;
|
|||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
import com.intellectualcrafters.plot.config.Settings;
|
import com.intellectualcrafters.plot.config.Settings;
|
||||||
import com.intellectualcrafters.plot.flag.FlagManager;
|
import com.intellectualcrafters.plot.flag.FlagManager;
|
||||||
import com.intellectualcrafters.plot.object.Location;
|
|
||||||
import com.intellectualcrafters.plot.object.Plot;
|
import com.intellectualcrafters.plot.object.Plot;
|
||||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||||
import com.intellectualcrafters.plot.util.MainUtil;
|
import com.intellectualcrafters.plot.util.MainUtil;
|
||||||
@ -40,8 +39,7 @@ public class Continue extends SubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(final PlotPlayer plr, final String[] args) {
|
public boolean onCommand(final PlotPlayer plr, final String[] args) {
|
||||||
final Location loc = plr.getLocation();
|
final Plot plot = plr.getCurrentPlot();
|
||||||
final Plot plot = loc.getPlotAbs();
|
|
||||||
if ((plot == null) || !plot.hasOwner()) {
|
if ((plot == null) || !plot.hasOwner()) {
|
||||||
return !sendMessage(plr, C.NOT_IN_PLOT);
|
return !sendMessage(plr, C.NOT_IN_PLOT);
|
||||||
}
|
}
|
||||||
@ -53,7 +51,8 @@ public class Continue extends SubCommand {
|
|||||||
MainUtil.sendMessage(plr, C.DONE_NOT_DONE);
|
MainUtil.sendMessage(plr, C.DONE_NOT_DONE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (Settings.DONE_COUNTS_TOWARDS_LIMIT && (plr.getAllowedPlots() >= plr.getPlotCount())) {
|
int size = plot.getConnectedPlots().size();
|
||||||
|
if (Settings.DONE_COUNTS_TOWARDS_LIMIT && (plr.getAllowedPlots() < plr.getPlotCount() + size)) {
|
||||||
MainUtil.sendMessage(plr, C.NO_PERMISSION, "plots.admin.command.continue");
|
MainUtil.sendMessage(plr, C.NO_PERMISSION, "plots.admin.command.continue");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user