diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java index cb7c3b7a0..323e81446 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/BukkitMain.java @@ -110,8 +110,8 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain { Bukkit.getServer().unloadWorld(world, true); } } - getServer().getPluginManager().registerEvents(new TNTListener(), this); } + @Override public void onDisable() { @@ -371,4 +371,9 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain { public EventUtil initEventUtil() { return new BukkitEventUtil(); } + + @Override + public void registerTNTListener() { + getServer().getPluginManager().registerEvents(new TNTListener(), this); + } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/IPlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/IPlotMain.java index f2387d0b1..fce6ee906 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/IPlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/IPlotMain.java @@ -38,6 +38,8 @@ public interface IPlotMain { public void registerForceFieldEvents(); public void registerWorldEditEvents(); + + public void registerTNTListener(); public Economy getEconomy(); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java index 7be29b885..f2ad55392 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotSquared.java @@ -763,12 +763,10 @@ public class PlotSquared { final Map options = new HashMap<>(); options.put("teleport.delay", 0); options.put("auto_update", false); - options.put("confirmation.clear", Settings.CONFIRM_CLEAR); options.put("confirmation.delete", Settings.CONFIRM_DELETE); options.put("confirmation.unlink", Settings.CONFIRM_UNLINK); - - + options.put("protection.tnt-listener.enabled", Settings.TNT_LISTENER); options.put("clusters.enabled", Settings.ENABLE_CLUSTERS); options.put("clear.fastmode", Settings.ENABLE_CLUSTERS); options.put("plotme-alias", Settings.USE_PLOTME_ALIAS); @@ -788,9 +786,7 @@ public class PlotSquared { options.put("max_plots", Settings.MAX_PLOTS); options.put("schematics.save_path", Settings.SCHEMATIC_SAVE_PATH); options.put("uuid.read-from-disk", Settings.UUID_FROM_DISK); - options.put("cache.permissions", Settings.PERMISSION_CACHING); - options.put("titles", Settings.TITLES); options.put("teleport.on_login", Settings.TELEPORT_ON_LOGIN); options.put("worldedit.require-selection-in-mask", Settings.REQUIRE_SELECTION); @@ -804,13 +800,12 @@ public class PlotSquared { if (Settings.DEBUG) { log(C.PREFIX.s() + "&6Debug Mode Enabled (Default). Edit the config to turn this off."); } - + Settings.TNT_LISTENER = config.getBoolean("protection.tnt-listener.enabled"); Settings.PERMISSION_CACHING = config.getBoolean("cache.permissions"); Settings.CONFIRM_CLEAR = config.getBoolean("confirmation.clear"); Settings.CONFIRM_DELETE = config.getBoolean("confirmation.delete"); Settings.CONFIRM_UNLINK = config.getBoolean("confirmation.unlink"); Settings.FAST_CLEAR = config.getBoolean("clear.fastmode"); - Settings.TELEPORT_DELAY = config.getInt("teleport.delay"); Settings.CONSOLE_COLOR = config.getBoolean("console.color"); Settings.TELEPORT_ON_LOGIN = config.getBoolean("teleport.on_login"); 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 f1bbd125f..8e8e4510a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/Settings.java @@ -36,13 +36,17 @@ public class Settings { public static boolean PERMISSION_CACHING = false; public static boolean UUID_FROM_DISK = false; /** - * + * PlotMe settings */ public static boolean CONVERT_PLOTME = true; public static boolean CACHE_PLOTME = false; public static boolean USE_PLOTME_ALIAS = false; /** - * + * TNT listener + */ + public static boolean TNT_LISTENER = false; + /** + * Max auto claiming size */ public static int MAX_AUTO_SIZE = 4; /** @@ -61,14 +65,6 @@ public class Settings { * Teleport to path on login */ public static boolean TELEPORT_ON_LOGIN = false; - /** - * Mob Cap Enabled - */ - // public static boolean MOB_CAP_ENABLED = false; - /** - * The Mob Cap - */ - // public static int MOB_CAP = 20; /** * Display titles */