mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Fixed NPE on Player related methods in CraftServer
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
9b1f8245df
commit
449fb6523a
1 changed files with 5 additions and 7 deletions
|
@ -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<EntityPlayerMP> online = server.b;
|
||||
List<EntityPlayerMP> online = server.b;
|
||||
Player[] players = new Player[online.size()];
|
||||
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
|
|
Loading…
Reference in a new issue