diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java index 9cc77370b..4bf999aae 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java @@ -765,6 +765,7 @@ import java.util.concurrent.TimeUnit; config.set("version", config_ver); final Map options = new HashMap<>(); options.put("auto_update", false); + options.put("plotme-convert.enabled", Settings.CONVERT_PLOTME); options.put("claim.max-auto-area", Settings.MAX_AUTO_SIZE); options.put("UUID.offline", Settings.OFFLINE_MODE); options.put("worldguard.enabled", Settings.WORLDGUARD); @@ -797,6 +798,7 @@ import java.util.concurrent.TimeUnit; sendConsoleSenderMessage(C.PREFIX.s() + "&6Debug Mode Enabled (Default). Edit the config to turn this off."); } Settings.TELEPORT_ON_LOGIN = config.getBoolean("teleport.on_login"); + Settings.CONVERT_PLOTME = config.getBoolean("plotme-convert.enabled"); Settings.KILL_ROAD_MOBS = config.getBoolean("kill_road_mobs"); Settings.WORLDGUARD = config.getBoolean("worldguard.enabled"); Settings.MOB_PATHFINDING = config.getBoolean("mob_pathfinding"); @@ -1247,9 +1249,13 @@ import java.util.concurrent.TimeUnit; } public static boolean enablePlotMe() { + if (!Settings.CONVERT_PLOTME) { + return false; + } File file = new File(new File("").getAbsolutePath() + File.separator + "plugins" + File.separator + "PlotMe-Core.jar"); if (file.exists()) { sendConsoleSenderMessage("&b==== Copying 'PlotMe-Core.jar' to 'PlotMe_JAR_relocated' for conversion purposes ==="); + sendConsoleSenderMessage("&c - If you do not wish to convert, please stop the server now and set 'plotme-convert.enabled' to false"); sendConsoleSenderMessage("&3 - Please ignore the below stacktrace..."); try { File to = new File(new File(".").getAbsolutePath() + File.separator + "plugins" + File.separator + "PlotMe_JAR_relocated" + File.separator + "PlotMe-Core.jar"); @@ -1264,6 +1270,11 @@ import java.util.concurrent.TimeUnit; // TODO Auto-generated catch block e.printStackTrace(); } + try { + Thread.sleep(5000); + } catch(InterruptedException ex) { + Thread.currentThread().interrupt(); + } return true; } file = new File(new File(".").getAbsolutePath() + File.separator + "plugins" + File.separator + "PlotMe.jar"); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java index 17df80878..11589cd00 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java @@ -35,6 +35,10 @@ public class Settings { */ public static boolean UUID_FECTHING = false; public static boolean UUID_FROM_DISK = false; + /** + * + */ + public static boolean CONVERT_PLOTME = true; /** * */ diff --git a/PlotSquared/src/main/resources/plugin.yml b/PlotSquared/src/main/resources/plugin.yml index 963e57539..b23508692 100644 --- a/PlotSquared/src/main/resources/plugin.yml +++ b/PlotSquared/src/main/resources/plugin.yml @@ -10,7 +10,7 @@ database: false commands: plots: description: PlotMain PlotSquared command. - aliases: [p,plotme,plot,ps,plotsquared,p2] + aliases: [p,plot,ps,plotsquared,p2] permission: plots.use permission-message: "You are lacking the permission node 'plots.use'" permissions: