mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +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.C;
|
||||||
import com.intellectualcrafters.plot.PlayerFunctions;
|
import com.intellectualcrafters.plot.PlayerFunctions;
|
||||||
import com.intellectualcrafters.plot.PlotMain;
|
import com.intellectualcrafters.plot.PlotMain;
|
||||||
|
import com.intellectualcrafters.plot.PlotWorld;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Deprecated
|
* @Deprecated
|
||||||
@ -30,6 +31,13 @@ public class Reload extends SubCommand {
|
|||||||
public boolean execute(Player plr, String... args) {
|
public boolean execute(Player plr, String... args) {
|
||||||
try {
|
try {
|
||||||
PlotMain.reloadTranslations();
|
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);
|
PlotMain.BroadcastWithPerms(C.RELOADED_CONFIGS);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
@ -634,6 +634,8 @@ public class DBFunc {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
ArrayList<Integer> ids = new ArrayList<Integer>();
|
ArrayList<Integer> ids = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
// Fetching a list of plot IDs for a world
|
||||||
try {
|
try {
|
||||||
PreparedStatement stmt = connection.prepareStatement("SELECT `id`, FROM `plot` WHERE `world` = ?");
|
PreparedStatement stmt = connection.prepareStatement("SELECT `id`, FROM `plot` WHERE `world` = ?");
|
||||||
stmt.setString(1, world);
|
stmt.setString(1, world);
|
||||||
@ -678,7 +680,7 @@ public class DBFunc {
|
|||||||
}
|
}
|
||||||
catch (SQLException e) {
|
catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Logger.add(LogLevel.WARNING, "FAILED TO PURGE WORLD '"+world+"'!");
|
Logger.add(LogLevel.DANGER, "FAILED TO PURGE WORLD '"+world+"'!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Logger.add(LogLevel.GENERAL, "SUCCESSFULLY PURGED WORLD '"+world+"'!");
|
Logger.add(LogLevel.GENERAL, "SUCCESSFULLY PURGED WORLD '"+world+"'!");
|
||||||
|
Loading…
Reference in New Issue
Block a user