mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Fixed NPE on Player related methods in CraftServer
This commit is contained in:
parent
fd5892db51
commit
b7f7c3ffb5
3 changed files with 6 additions and 9 deletions
|
@ -90,8 +90,6 @@ implements ICommandListener, Runnable {
|
||||||
a.warning("To change this, set \"online-mode\" to \"true\" in the server.settings file.");
|
a.warning("To change this, set \"online-mode\" to \"true\" in the server.settings file.");
|
||||||
}
|
}
|
||||||
|
|
||||||
server = new CraftServer(this, "1.1"); // CraftBukkit
|
|
||||||
|
|
||||||
f = new ServerConfigurationManager(this);
|
f = new ServerConfigurationManager(this);
|
||||||
k = new EntityTracker(this);
|
k = new EntityTracker(this);
|
||||||
String s1 = d.a("level-name", "world");
|
String s1 = d.a("level-name", "world");
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class ServerConfigurationManager {
|
||||||
private CraftServer server; // Craftbukkit
|
private CraftServer server; // Craftbukkit
|
||||||
|
|
||||||
public ServerConfigurationManager(MinecraftServer minecraftserver) {
|
public ServerConfigurationManager(MinecraftServer minecraftserver) {
|
||||||
|
minecraftserver.server = new CraftServer(minecraftserver, this); // CraftBukkit
|
||||||
server = minecraftserver.server; // Craftbukkit
|
server = minecraftserver.server; // Craftbukkit
|
||||||
|
|
||||||
b = new ArrayList<EntityPlayerMP>();
|
b = new ArrayList<EntityPlayerMP>();
|
||||||
|
|
|
@ -15,17 +15,15 @@ import org.bukkit.plugin.java.JavaPluginLoader;
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
private final String serverName = "Craftbukkit";
|
private final String serverName = "Craftbukkit";
|
||||||
private final String serverVersion;
|
private final String serverVersion = "1.1";
|
||||||
private final PluginManager pluginManager = new SimplePluginManager(this);
|
private final PluginManager pluginManager = new SimplePluginManager(this);
|
||||||
|
|
||||||
protected final MinecraftServer console;
|
protected final MinecraftServer console;
|
||||||
protected final ServerConfigurationManager server;
|
protected final ServerConfigurationManager server;
|
||||||
|
|
||||||
public CraftServer(MinecraftServer instance, String ver) {
|
public CraftServer(MinecraftServer console, ServerConfigurationManager server) {
|
||||||
serverVersion = ver;
|
this.console = console;
|
||||||
|
this.server = server;
|
||||||
console = instance;
|
|
||||||
server = console.f;
|
|
||||||
|
|
||||||
pluginManager.RegisterInterface(JavaPluginLoader.class);
|
pluginManager.RegisterInterface(JavaPluginLoader.class);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue