mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Download requires done
This commit is contained in:
parent
56d50bd9e1
commit
5acd9c5143
@ -60,8 +60,8 @@ public class Continue extends SubCommand {
|
||||
MainUtil.sendMessage(plr, C.DONE_NOT_DONE);
|
||||
return false;
|
||||
}
|
||||
if (FlagManager.isPlotFlagTrue(plot, "done" ) && (!Permissions.hasPermission(plr, "plots.continue") || (Settings.DONE_COUNTS_TOWARDS_LIMIT && MainUtil.getAllowedPlots(plr) >= MainUtil.getPlayerPlotCount(plr)))) {
|
||||
MainUtil.sendMessage(plr, C.DONE_ALREADY_DONE);
|
||||
if (Settings.DONE_COUNTS_TOWARDS_LIMIT && MainUtil.getAllowedPlots(plr) >= MainUtil.getPlayerPlotCount(plr)) {
|
||||
MainUtil.sendMessage(plr, C.NO_PERMISSION, "plots.admin.command.continue");
|
||||
return false;
|
||||
}
|
||||
if (MainUtil.runners.containsKey(plot)) {
|
||||
|
@ -66,6 +66,7 @@ public class Done extends SubCommand {
|
||||
return false;
|
||||
}
|
||||
MainUtil.runners.put(plot, 1);
|
||||
MainUtil.sendMessage(plr, C.GENERATING_LINK);
|
||||
HybridUtils.manager.analyzePlot(plot, new RunnableVal<PlotAnalysis>() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -6,6 +6,7 @@ import com.intellectualcrafters.jnbt.CompoundTag;
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.config.Settings;
|
||||
import com.intellectualcrafters.plot.flag.FlagManager;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.object.RunnableVal;
|
||||
@ -44,7 +45,7 @@ public class Download extends SubCommand {
|
||||
MainUtil.sendMessage(plr, C.PLOT_UNOWNED);
|
||||
return false;
|
||||
}
|
||||
if (!plot.isOwner(plr.getUUID()) && !Permissions.hasPermission(plr, "plots.admin.command.download")) {
|
||||
if ((!plot.isOwner(plr.getUUID()) || (Settings.DOWNLOAD_REQUIRES_DONE && FlagManager.getPlotFlag(plot, "done") != null)) && !Permissions.hasPermission(plr, "plots.admin.command.download")) {
|
||||
MainUtil.sendMessage(plr, C.NO_PLOT_PERMS);
|
||||
return false;
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ public class Settings {
|
||||
*/
|
||||
public static String WEB_URL = "http://empcraft.com/plots/";
|
||||
public static String WEB_IP = "your.ip.here";
|
||||
public static boolean DOWNLOAD_REQUIRES_DONE = false;
|
||||
/**
|
||||
* Ratings
|
||||
*/
|
||||
|
@ -82,7 +82,7 @@ public class WESubscriber {
|
||||
reorder = (MultiStageReorder) tmp;
|
||||
}
|
||||
if (hasMask && tmp instanceof MaskingExtent) {
|
||||
maskextent = tmp;
|
||||
maskextent = (MaskingExtent) tmp;
|
||||
}
|
||||
extent = tmp;
|
||||
}
|
||||
@ -103,13 +103,14 @@ public class WESubscriber {
|
||||
event.setExtent(new ExtentWrapper(extent));
|
||||
}
|
||||
else {
|
||||
ExtentWrapper wrapper;
|
||||
if (maskextent != null) {
|
||||
ExtentWrapper wrapper = new ExtentWrapper(maskextent);
|
||||
wrapper = new ExtentWrapper(maskextent);
|
||||
field.set(maskextent, history);
|
||||
event.setExtent(wrapper);
|
||||
}
|
||||
else {
|
||||
ExtentWrapper wrapper = new ExtentWrapper(history);
|
||||
wrapper = new ExtentWrapper(history);
|
||||
event.setExtent(wrapper);
|
||||
}
|
||||
field.set(history, reorder);
|
||||
|
Loading…
Reference in New Issue
Block a user