mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
Reload now reloads a bit more.
This commit is contained in:
parent
a64e4c9578
commit
96fb8cfab9
@ -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) {
|
||||
|
@ -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+"'!");
|
||||
|
Loading…
Reference in New Issue
Block a user