Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 21:40:06 +01:00
Made bukkit settings reload on reload().
Dieser Commit ist enthalten in:
Ursprung
ebfd973d09
Commit
6e746ef79a
@ -85,14 +85,13 @@ public final class CraftServer implements Server {
|
|||||||
Logger.getLogger("Minecraft").log(Level.INFO, "This server is running " + getName() + " version " + getVersion());
|
Logger.getLogger("Minecraft").log(Level.INFO, "This server is running " + getName() + " version " + getVersion());
|
||||||
|
|
||||||
configuration = new Configuration((File) console.options.valueOf("bukkit-settings"));
|
configuration = new Configuration((File) console.options.valueOf("bukkit-settings"));
|
||||||
configuration.load();
|
loadConfig();
|
||||||
loadConfigDefaults();
|
|
||||||
configuration.save();
|
|
||||||
loadPlugins();
|
loadPlugins();
|
||||||
enablePlugins(PluginLoadOrder.STARTUP);
|
enablePlugins(PluginLoadOrder.STARTUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadConfigDefaults() {
|
private void loadConfig() {
|
||||||
|
configuration.load();
|
||||||
configuration.getString("database.url", "jdbc:sqlite:{DIR}{NAME}.db");
|
configuration.getString("database.url", "jdbc:sqlite:{DIR}{NAME}.db");
|
||||||
configuration.getString("database.username", "bukkit");
|
configuration.getString("database.username", "bukkit");
|
||||||
configuration.getString("database.password", "walrus");
|
configuration.getString("database.password", "walrus");
|
||||||
@ -107,6 +106,7 @@ public final class CraftServer implements Server {
|
|||||||
icanhasbukkit.add("version");
|
icanhasbukkit.add("version");
|
||||||
configuration.setProperty("aliases.icanhasbukkit", icanhasbukkit);
|
configuration.setProperty("aliases.icanhasbukkit", icanhasbukkit);
|
||||||
}
|
}
|
||||||
|
configuration.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadPlugins() {
|
public void loadPlugins() {
|
||||||
@ -311,6 +311,7 @@ public final class CraftServer implements Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void reload() {
|
public void reload() {
|
||||||
|
loadConfig();
|
||||||
PropertyManager config = new PropertyManager(console.options);
|
PropertyManager config = new PropertyManager(console.options);
|
||||||
|
|
||||||
console.propertyManager = config;
|
console.propertyManager = config;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren