From ac67e061636ae2404c7d81370bca285b45a98e7e Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 26 Mar 2011 01:39:23 -0700 Subject: [PATCH] Added Server.getServerId() for ID purposes. By: sk89q --- .../java/org/bukkit/craftbukkit/CraftServer.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java index da3102197d..1ed2b24f49 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -182,21 +182,23 @@ public final class CraftServer implements Server { return this.getConfigString("server-ip", ""); } - public String getServerName() - { + public String getServerName() { return this.getConfigString("server-name", "Unknown Server"); } + public String getServerId() { + return this.getConfigString("server-id", "unnamed"); + } + // NOTE: Temporary calls through to server.properies until its replaced - private String getConfigString(String variable, String defaultValue) - { + private String getConfigString(String variable, String defaultValue) { return this.console.d.a(variable, defaultValue); } - private int getConfigInt(String variable, int defaultValue) - { + private int getConfigInt(String variable, int defaultValue) { return this.console.d.a(variable, defaultValue); } + // End Temporary calls public PluginManager getPluginManager() {