Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 05:20:07 +01:00
Remove spawn-radius setting in bukkit.yml in favour of spawn-protection in
server.properties. Fixes BUKKIT-2657
Dieser Commit ist enthalten in:
Ursprung
5fe8523023
Commit
784f9e31a8
@ -157,10 +157,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this.propertyManager.properties.containsKey("spawn-protection")) {
|
if (this.server.getBukkitSpawnRadius() > -1) {
|
||||||
log.info("'spawn-protection' in server.properties has been moved to 'settings.spawn-radius' in bukkit.yml. I will move your config for you.");
|
log.info("'settings.spawn-radius' in bukkit.yml has been moved to 'spawn-protection' in server.properties. I will move your config for you.");
|
||||||
this.server.setSpawnRadius(this.propertyManager.getInt("spawn-protection", 16));
|
|
||||||
this.propertyManager.properties.remove("spawn-protection");
|
this.propertyManager.properties.remove("spawn-protection");
|
||||||
|
this.propertyManager.getInt("spawn-protection", this.server.getBukkitSpawnRadius());
|
||||||
|
this.server.removeBukkitSpawnRadius();
|
||||||
this.propertyManager.savePropertiesFile();
|
this.propertyManager.savePropertiesFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -920,8 +920,17 @@ public final class CraftServer implements Server {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeBukkitSpawnRadius() {
|
||||||
|
configuration.set("settings.spawn-radius", null);
|
||||||
|
saveConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBukkitSpawnRadius() {
|
||||||
|
return configuration.getInt("settings.spawn-radius", -1);
|
||||||
|
}
|
||||||
|
|
||||||
public int getSpawnRadius() {
|
public int getSpawnRadius() {
|
||||||
return configuration.getInt("settings.spawn-radius", 16);
|
return ((DedicatedServer) console).propertyManager.getInt("spawn-protection", 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSpawnRadius(int value) {
|
public void setSpawnRadius(int value) {
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
settings:
|
settings:
|
||||||
allow-end: true
|
allow-end: true
|
||||||
warn-on-overload: true
|
warn-on-overload: true
|
||||||
spawn-radius: 16
|
|
||||||
permissions-file: permissions.yml
|
permissions-file: permissions.yml
|
||||||
update-folder: update
|
update-folder: update
|
||||||
ping-packet-limit: 100
|
ping-packet-limit: 100
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren