mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 11:44:42 +02:00
Redstone, chunk sending, reload fix, chunk unloader,
- Added redstone disabler when no players are in the plot - Fixed chunk sending leaving ghost blocks - Fixed reloading not populating new values - Added chunk unloader to chunk processor (decreases memory usage)
This commit is contained in:
@ -1743,6 +1743,7 @@ public class PS {
|
||||
|
||||
// Protection
|
||||
options.put("protection.redstone.disable-offline", Settings.REDSTONE_DISABLER);
|
||||
options.put("protection.redstone.disable-unoccupied", Settings.REDSTONE_DISABLER_UNOCCUPIED);
|
||||
options.put("protection.tnt-listener.enabled", Settings.TNT_LISTENER);
|
||||
options.put("protection.piston.falling-blocks", Settings.PISTON_FALLING_BLOCK_CHECK);
|
||||
|
||||
@ -1837,6 +1838,7 @@ public class PS {
|
||||
|
||||
// Chunk processor
|
||||
options.put("chunk-processor.enabled", Settings.CHUNK_PROCESSOR);
|
||||
options.put("chunk-processor.random-chunk-unloads", Settings.CHUNK_PROCESSOR_RANDOM_CHUNK_UNLOADS);
|
||||
options.put("chunk-processor.max-blockstates", Settings.CHUNK_PROCESSOR_MAX_BLOCKSTATES);
|
||||
options.put("chunk-processor.max-entities", Settings.CHUNK_PROCESSOR_MAX_ENTITIES);
|
||||
options.put("chunk-processor.disable-physics", Settings.CHUNK_PROCESSOR_DISABLE_PHYSICS);
|
||||
@ -1869,6 +1871,8 @@ public class PS {
|
||||
|
||||
// Protection
|
||||
Settings.REDSTONE_DISABLER = config.getBoolean("protection.redstone.disable-offline");
|
||||
Settings.REDSTONE_DISABLER_UNOCCUPIED = config.getBoolean("protection.redstone.disable-unoccupied");
|
||||
|
||||
Settings.TNT_LISTENER = config.getBoolean("protection.tnt-listener.enabled");
|
||||
Settings.PISTON_FALLING_BLOCK_CHECK = config.getBoolean("protection.piston.falling-blocks");
|
||||
|
||||
@ -1948,6 +1952,7 @@ public class PS {
|
||||
|
||||
// Chunk processor
|
||||
Settings.CHUNK_PROCESSOR = config.getBoolean("chunk-processor.enabled");
|
||||
Settings.CHUNK_PROCESSOR_RANDOM_CHUNK_UNLOADS = config.getInt("chunk-processor.random-chunk-unloads");
|
||||
Settings.CHUNK_PROCESSOR_MAX_BLOCKSTATES = config.getInt("chunk-processor.max-blockstates");
|
||||
Settings.CHUNK_PROCESSOR_MAX_ENTITIES = config.getInt("chunk-processor.max-entities");
|
||||
Settings.CHUNK_PROCESSOR_DISABLE_PHYSICS = config.getBoolean("chunk-processor.disable-physics");
|
||||
|
@ -20,6 +20,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.configuration.ConfigurationSection;
|
||||
import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
@ -46,10 +47,13 @@ public class Reload extends SubCommand {
|
||||
C.load(PS.get().translationFile);
|
||||
for (final String pw : PS.get().getPlotWorlds()) {
|
||||
final PlotWorld plotworld = PS.get().getPlotWorld(pw);
|
||||
plotworld.loadDefaultConfiguration(PS.get().config.getConfigurationSection("worlds." + pw));
|
||||
ConfigurationSection section = PS.get().config.getConfigurationSection("worlds." + pw);
|
||||
plotworld.saveConfiguration(section);
|
||||
plotworld.loadDefaultConfiguration(section);
|
||||
}
|
||||
MainUtil.sendMessage(plr, C.RELOADED_CONFIGS);
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
MainUtil.sendMessage(plr, C.RELOAD_FAILED);
|
||||
}
|
||||
return true;
|
||||
|
@ -69,6 +69,7 @@ public class Settings {
|
||||
*/
|
||||
public static boolean CHUNK_PROCESSOR = false;
|
||||
public static int CHUNK_PROCESSOR_MAX_BLOCKSTATES = 4096;
|
||||
public static int CHUNK_PROCESSOR_RANDOM_CHUNK_UNLOADS = 1;
|
||||
public static int CHUNK_PROCESSOR_MAX_ENTITIES = 512;
|
||||
public static boolean CHUNK_PROCESSOR_DISABLE_PHYSICS = false;
|
||||
/**
|
||||
@ -79,6 +80,7 @@ public class Settings {
|
||||
* Redstone disabler
|
||||
*/
|
||||
public static boolean REDSTONE_DISABLER = false;
|
||||
public static boolean REDSTONE_DISABLER_UNOCCUPIED = false;
|
||||
/**
|
||||
* Check for falling blocks when pistons extend?
|
||||
*/
|
||||
|
Reference in New Issue
Block a user