From 449fb6523ac2a777189981426960a0a337bb76e3 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 3 Jan 2011 19:41:23 +0000 Subject: [PATCH] Fixed NPE on Player related methods in CraftServer By: Dinnerbone --- .../java/org/bukkit/craftbukkit/CraftServer.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 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 811b31435e..e575805136 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -15,17 +15,15 @@ import org.bukkit.plugin.java.JavaPluginLoader; public final class CraftServer implements Server { private final String serverName = "Craftbukkit"; - private final String serverVersion; + private final String serverVersion = "1.1"; private final PluginManager pluginManager = new SimplePluginManager(this); protected final MinecraftServer console; protected final ServerConfigurationManager server; - public CraftServer(MinecraftServer instance, String ver) { - serverVersion = ver; - - console = instance; - server = console.f; + public CraftServer(MinecraftServer console, ServerConfigurationManager server) { + this.console = console; + this.server = server; pluginManager.RegisterInterface(JavaPluginLoader.class); @@ -55,7 +53,7 @@ public final class CraftServer implements Server { } public Player[] getOnlinePlayers() { - List online = server.b; + List online = server.b; Player[] players = new Player[online.size()]; for (int i = 0; i < players.length; i++) {