Adding the option to suppress overload warnings as a bukkit.yml option. Thanks oloflarsson for the PR.

Dieser Commit ist enthalten in:
Erik Broes 2012-01-15 11:11:25 +01:00
Ursprung 25050e38eb
Commit d7cec38c38
3 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -412,6 +412,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
long l = k - i; long l = k - i;
if (l > 2000L) { if (l > 2000L) {
if (this.server.getWarnOnOverload()) // CraftBukkit - Adding an option to suppress these warning messages
log.warning("Can\'t keep up! Did the system time change, or is the server overloaded?"); log.warning("Can\'t keep up! Did the system time change, or is the server overloaded?");
l = 2000L; l = 2000L;
} }

Datei anzeigen

@ -321,6 +321,10 @@ public final class CraftServer implements Server {
return this.getConfigBoolean("allow-nether", true); return this.getConfigBoolean("allow-nether", true);
} }
public boolean getWarnOnOverload() {
return this.configuration.getBoolean("settings.warn-on-overload");
}
public boolean hasWhitelist() { public boolean hasWhitelist() {
return this.getConfigBoolean("white-list", false); return this.getConfigBoolean("white-list", false);
} }

Datei anzeigen

@ -15,6 +15,7 @@
settings: settings:
allow-end: true allow-end: true
warn-on-overload: true
spawn-radius: 16 spawn-radius: 16
permissions-file: permissions.yml permissions-file: permissions.yml
update-folder: update update-folder: update