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