mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Option for building restriction on finished plots
This commit is contained in:
		@@ -1795,8 +1795,9 @@ public class PS {
 | 
			
		||||
        config.set("clear.ignore-if-modified", null);
 | 
			
		||||
        
 | 
			
		||||
        // Done
 | 
			
		||||
        config.set("approval.ratings.require-done", Settings.REQUIRE_DONE);
 | 
			
		||||
        config.set("approval.done.counts-towards-limit", Settings.DONE_COUNTS_TOWARDS_LIMIT);
 | 
			
		||||
        options.put("approval.ratings.require-done", Settings.REQUIRE_DONE);
 | 
			
		||||
        options.put("approval.done.counts-towards-limit", Settings.DONE_COUNTS_TOWARDS_LIMIT);
 | 
			
		||||
        options.put("approval.done.restrict-building", Settings.DONE_RESTRICTS_BUILDING);
 | 
			
		||||
 | 
			
		||||
        // Schematics
 | 
			
		||||
        options.put("schematics.save_path", Settings.SCHEMATIC_SAVE_PATH);
 | 
			
		||||
@@ -1905,6 +1906,7 @@ public class PS {
 | 
			
		||||
        // Done
 | 
			
		||||
        Settings.REQUIRE_DONE = config.getBoolean("approval.ratings.require-done");
 | 
			
		||||
        Settings.DONE_COUNTS_TOWARDS_LIMIT = config.getBoolean("approval.done.counts-towards-limit");
 | 
			
		||||
        Settings.DONE_RESTRICTS_BUILDING = config.getBoolean("approval.done.restrict-building");
 | 
			
		||||
        
 | 
			
		||||
        // Schematics
 | 
			
		||||
        Settings.SCHEMATIC_SAVE_PATH = config.getString("schematics.save_path");
 | 
			
		||||
 
 | 
			
		||||
@@ -88,7 +88,7 @@ public class Clear extends SubCommand {
 | 
			
		||||
            MainUtil.sendMessage(plr, C.WAIT_FOR_TIMER);
 | 
			
		||||
            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_RESTRICTS_BUILDING && 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);
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -46,13 +46,14 @@ public class Settings {
 | 
			
		||||
     */
 | 
			
		||||
    public static String WEB_URL = "http://empcraft.com/plots/";
 | 
			
		||||
    public static String WEB_IP = "your.ip.here";
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * Ratings
 | 
			
		||||
     */
 | 
			
		||||
    public static List<String> RATING_CATEGORIES = null;
 | 
			
		||||
    public static boolean REQUIRE_DONE = false;
 | 
			
		||||
    public static boolean DONE_COUNTS_TOWARDS_LIMIT = false;
 | 
			
		||||
    public static boolean DONE_RESTRICTS_BUILDING = false;
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * PlotMe settings
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user