Option for building restriction on finished plots

This commit is contained in:
boy0001
2015-08-19 06:44:32 +10:00
parent be6705241c
commit be94aa53d3
6 changed files with 12 additions and 9 deletions

View File

@ -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");

View File

@ -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;
}

View File

@ -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
*/