Update CraftBukkit to Minecraft 1.5.2

This commit is contained in:
Travis Watkins
2013-04-27 04:40:05 -05:00
parent 83c3aa188b
commit 799779e4b1
53 changed files with 317 additions and 268 deletions

View File

@@ -48,7 +48,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
System.setErr(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.SEVERE), true));
// CraftBukkit end
this.getLogger().info("Starting minecraft server version 1.5.1");
this.getLogger().info("Starting minecraft server version 1.5.2");
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
this.getLogger().warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
@@ -68,6 +68,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
this.setAllowFlight(this.propertyManager.getBoolean("allow-flight", false));
this.setTexturePack(this.propertyManager.getString("texture-pack", ""));
this.setMotd(this.propertyManager.getString("motd", "A Minecraft Server"));
this.setForceGamemode(this.propertyManager.getBoolean("force-gamemode", false));
if (this.propertyManager.getInt("difficulty", 1) < 0) {
this.propertyManager.a("difficulty", Integer.valueOf(0));
} else if (this.propertyManager.getInt("difficulty", 1) > 3) {
@@ -200,7 +201,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
protected void a(CrashReport crashreport) {
while (this.isRunning()) {
this.am();
this.an();
try {
Thread.sleep(10L);
@@ -223,7 +224,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
public void r() { // CraftBukkit - protected -> public
super.r();
this.am();
this.an();
}
public boolean getAllowNether() {
@@ -235,8 +236,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public void a(MojangStatisticsGenerator mojangstatisticsgenerator) {
mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.an().getHasWhitelist()));
mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.an().getWhitelisted().size()));
mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.ao().getHasWhitelist()));
mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.ao().getWhitelisted().size()));
super.a(mojangstatisticsgenerator);
}
@@ -248,7 +249,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
this.k.add(new ServerCommand(s, icommandlistener));
}
public void am() {
public void an() {
while (!this.k.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.k.remove(0);
@@ -267,7 +268,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return true;
}
public DedicatedPlayerList an() {
public DedicatedPlayerList ao() {
return (DedicatedPlayerList) super.getPlayerList();
}
@@ -301,7 +302,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return file1 != null ? file1.getAbsolutePath() : "No settings file";
}
public void ao() {
public void ap() {
ServerGUI.a(this);
this.s = true;
}
@@ -325,9 +326,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) {
if (world.worldProvider.dimension != 0) {
return false;
} else if (this.an().getOPs().isEmpty()) {
} else if (this.ao().getOPs().isEmpty()) {
return false;
} else if (this.an().isOp(entityhuman.name)) {
} else if (this.ao().isOp(entityhuman.name)) {
return false;
} else if (this.getSpawnProtection() <= 0) {
return false;
@@ -346,6 +347,6 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
}
public PlayerList getPlayerList() {
return this.an();
return this.ao();
}
}