mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 11:13:45 +01:00 
			
		
		
		
	Optional disable of TNT Listener
This commit is contained in:
		@@ -110,9 +110,9 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
 | 
			
		||||
                Bukkit.getServer().unloadWorld(world, true);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        getServer().getPluginManager().registerEvents(new TNTListener(), this);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void onDisable() {
 | 
			
		||||
        MAIN.disable();
 | 
			
		||||
@@ -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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -39,6 +39,8 @@ public interface IPlotMain {
 | 
			
		||||
 | 
			
		||||
    public void registerWorldEditEvents();
 | 
			
		||||
    
 | 
			
		||||
    public void registerTNTListener();
 | 
			
		||||
 | 
			
		||||
    public Economy getEconomy();
 | 
			
		||||
 | 
			
		||||
    public BlockManager initBlockManager();
 | 
			
		||||
 
 | 
			
		||||
@@ -763,12 +763,10 @@ public class PlotSquared {
 | 
			
		||||
        final Map<String, Object> 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");
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user