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:
boy0001
2015-08-21 04:54:42 +10:00
parent ae7eed8a5b
commit b063494955
9 changed files with 245 additions and 72 deletions

View File

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