Reload now reloads a bit more.

This commit is contained in:
Jesse Boyd 2014-10-18 11:30:25 -07:00
parent a64e4c9578
commit 96fb8cfab9
2 changed files with 11 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import org.bukkit.entity.Player;
import com.intellectualcrafters.plot.C;
import com.intellectualcrafters.plot.PlayerFunctions;
import com.intellectualcrafters.plot.PlotMain;
import com.intellectualcrafters.plot.PlotWorld;
/**
* @Deprecated
@ -30,6 +31,13 @@ public class Reload extends SubCommand {
public boolean execute(Player plr, String... args) {
try {
PlotMain.reloadTranslations();
// The following won't affect world generation, as that has to be loaded during startup unfortunately.
PlotMain.config.load(PlotMain.configFile);
for (String pw: PlotMain.getPlotWorlds()) {
PlotWorld plotworld = PlotMain.getWorldSettings(pw);
plotworld.loadDefaultConfiguration(PlotMain.config.getConfigurationSection("worlds." + pw));
}
PlotMain.BroadcastWithPerms(C.RELOADED_CONFIGS);
}
catch (Exception e) {

View File

@ -634,6 +634,8 @@ public class DBFunc {
@Override
public void run() {
ArrayList<Integer> ids = new ArrayList<Integer>();
// Fetching a list of plot IDs for a world
try {
PreparedStatement stmt = connection.prepareStatement("SELECT `id`, FROM `plot` WHERE `world` = ?");
stmt.setString(1, world);
@ -678,7 +680,7 @@ public class DBFunc {
}
catch (SQLException e) {
e.printStackTrace();
Logger.add(LogLevel.WARNING, "FAILED TO PURGE WORLD '"+world+"'!");
Logger.add(LogLevel.DANGER, "FAILED TO PURGE WORLD '"+world+"'!");
return;
}
Logger.add(LogLevel.GENERAL, "SUCCESSFULLY PURGED WORLD '"+world+"'!");