summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorVictorD <victor.danell@gmail.com>2011-01-30 13:51:20 +0100
committerVictorD <victor.danell@gmail.com>2011-01-30 13:51:20 +0100
commit75ba9a0f2570798d9012e4f4377d903cd2904785 (patch)
treecdf3a991a428cfbf83266c8de2a60cc0b0609655 /src/main/java/net/minecraft/server
parent0582ac76930c8dec3a2f90a29856ac73ca0fd5cf (diff)
downloadcraftbukkit-75ba9a0f2570798d9012e4f4377d903cd2904785.tar
craftbukkit-75ba9a0f2570798d9012e4f4377d903cd2904785.tar.gz
craftbukkit-75ba9a0f2570798d9012e4f4377d903cd2904785.tar.lz
craftbukkit-75ba9a0f2570798d9012e4f4377d903cd2904785.tar.xz
craftbukkit-75ba9a0f2570798d9012e4f4377d903cd2904785.zip
Fixed initialization of CraftServer
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java5
-rw-r--r--src/main/java/net/minecraft/server/ServerConfigurationManager.java9
2 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 37b3bd2f..af37abb2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -38,7 +38,8 @@ public class MinecraftServer implements ICommandListener, Runnable {
public boolean m;
public boolean n;
- public MinecraftServer() {
+ // Craftbukkit start - adds argument OptionSet
+ public MinecraftServer(OptionSet options) {
new ThreadSleepForever(this);
// CraftBukkit start
this.options = options;
@@ -496,7 +497,7 @@ public class MinecraftServer implements ICommandListener, Runnable {
// Craftbukkit start - replaces main(String args[])
public static void main(final OptionSet options) {
try {
- MinecraftServer minecraftserver = new MinecraftServer();
+ MinecraftServer minecraftserver = new MinecraftServer(options);
// CraftBukkit - remove gui
diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
index 10de0923..e828c4dd 100644
--- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java
+++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
@@ -36,7 +36,12 @@ public class ServerConfigurationManager {
private File k;
private PlayerNBTManager l;
+ private CraftServer server; // CraftBukkit
+
public ServerConfigurationManager(MinecraftServer minecraftserver) {
+ // CraftBukkit 2 lines!
+ minecraftserver.server = new CraftServer(minecraftserver, this);
+ server = minecraftserver.server;
this.c = minecraftserver;
this.i = minecraftserver.a("banned-players.txt");
this.j = minecraftserver.a("banned-ips.txt");
@@ -84,9 +89,9 @@ public class ServerConfigurationManager {
// CraftBukkit start
server.getPluginManager().callEvent(new PlayerEvent(PlayerEvent.Type.PLAYER_QUIT, server.getPlayer(entityplayer))); // CraftBukkit
+ // CraftBukkit end
}
- private CraftServer server;
- // CraftBukkit end
+
public EntityPlayer a(NetLoginHandler netloginhandler, String s, String s1) {
// CraftBukkit start - note: this entire method needs to be changed