mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Download requires done
This commit is contained in:
		@@ -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
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user