summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/MinecraftServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/MinecraftServer.java')
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java298
1 files changed, 146 insertions, 152 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4bdf8aaa..d3f3f86e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -28,51 +28,50 @@ import org.bukkit.event.world.WorldSaveEvent;
public abstract class MinecraftServer implements ICommandListener, Runnable, IMojangStatistics {
- public static Logger log = Logger.getLogger("Minecraft");
- private static MinecraftServer l = null;
+ private static MinecraftServer k = null;
public Convertable convertable; // CraftBukkit - private final -> public
- private final MojangStatisticsGenerator n = new MojangStatisticsGenerator("server", this);
+ private final MojangStatisticsGenerator m = new MojangStatisticsGenerator("server", this);
public File universe; // CraftBukkit - private final -> public
- private final List p = new ArrayList();
- private final ICommandHandler q;
+ private final List o = new ArrayList();
+ private final ICommandHandler p;
public final MethodProfiler methodProfiler = new MethodProfiler();
private String serverIp;
- private int s = -1;
- // public WorldServer[] worldServer; // CraftBukkit - removed!
- private PlayerList t;
+ private int r = -1;
+ public WorldServer[] worldServer;
+ private PlayerList s;
private boolean isRunning = true;
private boolean isStopped = false;
private int ticks = 0;
- public String d;
- public int e;
+ public String c;
+ public int d;
private boolean onlineMode;
private boolean spawnAnimals;
private boolean spawnNPCs;
private boolean pvpMode;
private boolean allowFlight;
private String motd;
- private int D;
+ private int C;
+ private long D;
private long E;
private long F;
private long G;
- private long H;
+ public final long[] e = new long[100];
public final long[] f = new long[100];
public final long[] g = new long[100];
public final long[] h = new long[100];
public final long[] i = new long[100];
- public final long[] j = new long[100];
- public long[][] k;
- private KeyPair I;
+ public long[][] j;
+ private KeyPair H;
+ private String I;
private String J;
- private String K;
private boolean demoMode;
+ private boolean M;
private boolean N;
- private boolean O;
- private String P = "";
- private boolean Q = false;
- private long R;
- private String S;
- private boolean T;
+ private String O = "";
+ private boolean P = false;
+ private long Q;
+ private String R;
+ private boolean S;
// CraftBukkit start
public List<WorldServer> worlds = new ArrayList<WorldServer>();
@@ -88,11 +87,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
// CraftBukkit end
public MinecraftServer(OptionSet options) { // CraftBukkit - signature file -> OptionSet
- l = this;
+ k = this;
// this.universe = file1; // CraftBukkit
- this.q = new CommandDispatcher();
+ this.p = new CommandDispatcher();
// this.convertable = new WorldLoaderServer(server.getWorldContainer()); // CraftBukkit - moved to DedicatedServer.init
- this.al();
+ this.am();
// CraftBukkit start
this.options = options;
@@ -119,46 +118,29 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
public abstract PropertyManager getPropertyManager();
// CraftBukkit end
- private void al() {
- BlockDispenser.a.a(Item.ARROW, new DispenseBehaviorArrow(this));
- BlockDispenser.a.a(Item.EGG, new DispenseBehaviorEgg(this));
- BlockDispenser.a.a(Item.SNOW_BALL, new DispenseBehaviorSnowBall(this));
- BlockDispenser.a.a(Item.EXP_BOTTLE, new DispenseBehaviorExpBottle(this));
- BlockDispenser.a.a(Item.POTION, new DispenseBehaviorPotion(this));
- BlockDispenser.a.a(Item.MONSTER_EGG, new DispenseBehaviorMonsterEgg(this));
- BlockDispenser.a.a(Item.FIREWORKS, new DispenseBehaviorFireworks(this));
- BlockDispenser.a.a(Item.FIREBALL, new DispenseBehaviorFireball(this));
- DispenseBehaviorMinecart dispensebehaviorminecart = new DispenseBehaviorMinecart(this);
-
- BlockDispenser.a.a(Item.MINECART, dispensebehaviorminecart);
- BlockDispenser.a.a(Item.STORAGE_MINECART, dispensebehaviorminecart);
- BlockDispenser.a.a(Item.POWERED_MINECART, dispensebehaviorminecart);
- BlockDispenser.a.a(Item.BOAT, new DispenseBehaviorBoat(this));
- DispenseBehaviorFilledBucket dispensebehaviorfilledbucket = new DispenseBehaviorFilledBucket(this);
-
- BlockDispenser.a.a(Item.LAVA_BUCKET, dispensebehaviorfilledbucket);
- BlockDispenser.a.a(Item.WATER_BUCKET, dispensebehaviorfilledbucket);
- BlockDispenser.a.a(Item.BUCKET, new DispenseBehaviorEmptyBucket(this));
+ private void am() {
+ DispenserRegistry.a();
}
protected abstract boolean init() throws java.net.UnknownHostException; // CraftBukkit - throws UnknownHostException
protected void b(String s) {
if (this.getConvertable().isConvertable(s)) {
- log.info("Converting map!");
+ this.getLogger().info("Converting map!");
this.c("menu.convertingLevel");
this.getConvertable().convert(s, new ConvertProgressUpdater(this));
}
}
protected synchronized void c(String s) {
- this.S = s;
+ this.R = s;
}
protected void a(String s, String s1, long i, WorldType worldtype, String s2) {
this.b(s);
this.c("menu.loadingLevel");
- // CraftBukkit - removed world and ticktime arrays
+ this.worldServer = new WorldServer[3];
+ // CraftBukkit - removed ticktime arrays
IDataManager idatamanager = this.convertable.a(s, true);
WorldData worlddata = idatamanager.getWorldData();
// CraftBukkit start - removed worldsettings
@@ -194,10 +176,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
if (j == 0) {
if (this.M()) { // Strip out DEMO?
// CraftBukkit
- world = new DemoWorldServer(this, new ServerNBTManager(server.getWorldContainer(), s1, true), s1, dimension, this.methodProfiler);
+ world = new DemoWorldServer(this, new ServerNBTManager(server.getWorldContainer(), s1, true), s1, dimension, this.methodProfiler, this.getLogger());
} else {
// CraftBukkit
- world = new WorldServer(this, new ServerNBTManager(server.getWorldContainer(), s1, true), s1, dimension, worldsettings, this.methodProfiler, Environment.getEnvironment(dimension), gen);
+ world = new WorldServer(this, new ServerNBTManager(server.getWorldContainer(), s1, true), s1, dimension, worldsettings, this.methodProfiler, this.getLogger(), Environment.getEnvironment(dimension), gen);
}
} else {
String dim = "DIM" + dimension;
@@ -206,6 +188,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
File oldWorld = new File(new File(s), dim);
if ((!newWorld.isDirectory()) && (oldWorld.isDirectory())) {
+ final IConsoleLogManager log = this.getLogger();
log.info("---- Migration of old " + worldType + " folder required ----");
log.info("Unfortunately due to the way that Minecraft implemented multiworld support in 1.6, Bukkit requires that you move your " + worldType + " folder to a new location in order to operate correctly.");
log.info("We will move this folder for you, but it will mean that you need to move it back should you wish to stop using Bukkit in the future.");
@@ -237,7 +220,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.c(name);
// CraftBukkit
- world = new SecondaryWorldServer(this, new ServerNBTManager(server.getWorldContainer(), name, true), name, dimension, worldsettings, this.worlds.get(0), this.methodProfiler, Environment.getEnvironment(dimension), gen);
+ world = new SecondaryWorldServer(this, new ServerNBTManager(server.getWorldContainer(), name, true), name, dimension, worldsettings, this.worlds.get(0), this.methodProfiler, this.getLogger(), Environment.getEnvironment(dimension), gen);
}
if (gen != null) {
@@ -251,7 +234,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
world.getWorldData().setGameType(this.getGamemode());
}
this.worlds.add(world);
- this.t.setPlayerFileData(this.worlds.toArray(new WorldServer[this.worlds.size()]));
+ this.s.setPlayerFileData(this.worlds.toArray(new WorldServer[this.worlds.size()]));
// CraftBukkit end
}
@@ -260,8 +243,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
protected void e() {
- short short1 = 196;
- long i = System.currentTimeMillis();
+ long i = System.currentTimeMillis(); // CraftBukkit - current time
this.c("menu.generatingTerrain");
byte b0 = 0;
@@ -269,15 +251,15 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
// CraftBukkit start
for (int j = 0; j < this.worlds.size(); ++j) {
WorldServer worldserver = this.worlds.get(j);
- log.info("Preparing start region for level " + j + " (Seed: " + worldserver.getSeed() + ")");
+ this.getLogger().info("Preparing start region for level " + j + " (Seed: " + worldserver.getSeed() + ")");
if (!worldserver.getWorld().getKeepSpawnInMemory()) {
continue;
}
- // CraftBukkit end
+
ChunkCoordinates chunkcoordinates = worldserver.getSpawn();
- for (int k = -short1; k <= short1 && this.isRunning(); k += 16) {
- for (int l = -short1; l <= short1 && this.isRunning(); l += 16) {
+ for (int k = -192; k <= 192 && this.isRunning(); k += 16) {
+ for (int l = -192; l <= 192 && this.isRunning(); l += 16) {
long i1 = System.currentTimeMillis();
if (i1 < i) {
@@ -285,8 +267,8 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
if (i1 > i + 1000L) {
- int j1 = (short1 * 2 + 1) * (short1 * 2 + 1);
- int k1 = (k + short1) * (short1 * 2 + 1) + l + 1;
+ int j1 = (192 * 2 + 1) * (192 * 2 + 1);
+ int k1 = (k + 192) * (192 * 2 + 1) + l + 1;
this.a_("Preparing spawn area", k1 * 100 / j1);
i = i1;
@@ -296,7 +278,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
}
}
-
+ // CraftBukkit end
this.j();
}
@@ -309,27 +291,27 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
public abstract boolean isHardcore();
protected void a_(String s, int i) {
- this.d = s;
- this.e = i;
- log.info(s + ": " + i + "%");
+ this.c = s;
+ this.d = i;
+ this.getLogger().info(s + ": " + i + "%");
}
protected void j() {
- this.d = null;
- this.e = 0;
+ this.c = null;
+ this.d = 0;
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD); // CraftBukkit
}
protected void saveChunks(boolean flag) throws ExceptionWorldConflict { // CraftBukkit - added throws
- if (!this.O) {
+ if (!this.N) {
// CraftBukkit start
for (int j = 0; j < this.worlds.size(); ++j) {
WorldServer worldserver = this.worlds.get(j);
if (worldserver != null) {
if (!flag) {
- log.info("Saving chunks for level \'" + worldserver.getWorldData().getName() + "\'/" + worldserver.worldProvider.getName());
+ this.getLogger().info("Saving chunks for level \'" + worldserver.getWorldData().getName() + "\'/" + worldserver.worldProvider.getName());
}
worldserver.save(true, (IProgressUpdate) null);
@@ -344,8 +326,8 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public void stop() throws ExceptionWorldConflict { // CraftBukkit - added throws
- if (!this.O) {
- log.info("Stopping server");
+ if (!this.N) {
+ this.getLogger().info("Stopping server");
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -356,13 +338,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.ae().a();
}
- if (this.t != null) {
- log.info("Saving players");
- this.t.savePlayers();
- this.t.r();
+ if (this.s != null) {
+ this.getLogger().info("Saving players");
+ this.s.savePlayers();
+ this.s.r();
}
- log.info("Saving worlds");
+ this.getLogger().info("Saving worlds");
this.saveChunks(false);
/* CraftBukkit start - handled in saveChunks
@@ -372,8 +354,8 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
worldserver.saveLevel();
}
// CraftBukkit end */
- if (this.n != null && this.n.d()) {
- this.n.e();
+ if (this.m != null && this.m.d()) {
+ this.m.e();
}
}
}
@@ -399,19 +381,19 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
if (this.init()) {
long i = System.currentTimeMillis();
- for (long j = 0L; this.isRunning; this.Q = true) {
+ for (long j = 0L; this.isRunning; this.P = true) {
long k = System.currentTimeMillis();
long l = k - i;
- if (l > 2000L && i - this.R >= 15000L) {
+ if (l > 2000L && i - this.Q >= 15000L) {
if (this.server.getWarnOnOverload()) // CraftBukkit - Added option to suppress warning messages
- log.warning("Can\'t keep up! Did the system time change, or is the server overloaded?");
+ this.getLogger().warning("Can\'t keep up! Did the system time change, or is the server overloaded?");
l = 2000L;
- this.R = i;
+ this.Q = i;
}
if (l < 0L) {
- log.warning("Time ran backwards! Did the system time change?");
+ this.getLogger().warning("Time ran backwards! Did the system time change?");
l = 0L;
}
@@ -435,7 +417,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
} catch (Throwable throwable) {
throwable.printStackTrace();
- log.log(Level.SEVERE, "Encountered an unexpected exception " + throwable.getClass().getSimpleName(), throwable);
+ this.getLogger().severe("Encountered an unexpected exception " + throwable.getClass().getSimpleName(), throwable);
CrashReport crashreport = null;
if (throwable instanceof ReportedException) {
@@ -446,10 +428,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
File file1 = new File(new File(this.o(), "crash-reports"), "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-server.txt");
- if (crashreport.a(file1)) {
- log.severe("This crash report has been saved to: " + file1.getAbsolutePath());
+ if (crashreport.a(file1, this.getLogger())) {
+ this.getLogger().severe("This crash report has been saved to: " + file1.getAbsolutePath());
} else {
- log.severe("We were unable to save this crash report to disk.");
+ this.getLogger().severe("We were unable to save this crash report to disk.");
}
this.a(crashreport);
@@ -484,8 +466,8 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
AxisAlignedBB.a().a();
++this.ticks;
- if (this.T) {
- this.T = false;
+ if (this.S) {
+ this.S = false;
this.methodProfiler.a = true;
this.methodProfiler.a();
}
@@ -494,29 +476,29 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.r();
if ((this.autosavePeriod > 0) && ((this.ticks % this.autosavePeriod) == 0)) { // CraftBukkit
this.methodProfiler.a("save");
- this.t.savePlayers();
+ this.s.savePlayers();
this.saveChunks(true);
this.methodProfiler.b();
}
this.methodProfiler.a("tallying");
- this.j[this.ticks % 100] = System.nanoTime() - i;
- this.f[this.ticks % 100] = Packet.p - this.E;
- this.E = Packet.p;
- this.g[this.ticks % 100] = Packet.q - this.F;
- this.F = Packet.q;
- this.h[this.ticks % 100] = Packet.n - this.G;
- this.G = Packet.n;
- this.i[this.ticks % 100] = Packet.o - this.H;
- this.H = Packet.o;
+ this.i[this.ticks % 100] = System.nanoTime() - i;
+ this.e[this.ticks % 100] = Packet.q - this.D;
+ this.D = Packet.q;
+ this.f[this.ticks % 100] = Packet.r - this.E;
+ this.E = Packet.r;
+ this.g[this.ticks % 100] = Packet.o - this.F;
+ this.F = Packet.o;
+ this.h[this.ticks % 100] = Packet.p - this.G;
+ this.G = Packet.p;
this.methodProfiler.b();
this.methodProfiler.a("snooper");
- if (!this.n.d() && this.ticks > 100) {
- this.n.a();
+ if (!this.m.d() && this.ticks > 100) {
+ this.m.a();
}
if (this.ticks % 6000 == 0) {
- this.n.b();
+ this.m.b();
}
this.methodProfiler.b();
@@ -559,7 +541,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
/* Drop global time updates
if (this.ticks % 20 == 0) {
this.methodProfiler.a("timeSync");
- this.t.a(new Packet4UpdateTime(worldserver.getTime(), worldserver.getDayTime()), worldserver.worldProvider.dimension);
+ this.s.a(new Packet4UpdateTime(worldserver.getTime(), worldserver.getDayTime()), worldserver.worldProvider.dimension);
this.methodProfiler.b();
}
// CraftBukkit end */
@@ -591,17 +573,17 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.methodProfiler.b();
// } // CraftBukkit
- // this.k[i][this.ticks % 100] = System.nanoTime() - j; // CraftBukkit
+ // this.j[i][this.ticks % 100] = System.nanoTime() - j; // CraftBukkit
}
this.methodProfiler.c("connection");
this.ae().b();
this.methodProfiler.c("players");
- this.t.tick();
+ this.s.tick();
this.methodProfiler.c("tickables");
- for (i = 0; i < this.p.size(); ++i) {
- ((IUpdatePlayerListBox) this.p.get(i)).a();
+ for (i = 0; i < this.o.size(); ++i) {
+ ((IUpdatePlayerListBox) this.o.get(i)).a();
}
this.methodProfiler.b();
@@ -612,11 +594,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public void a(IUpdatePlayerListBox iupdateplayerlistbox) {
- this.p.add(iupdateplayerlistbox);
+ this.o.add(iupdateplayerlistbox);
}
public static void main(final OptionSet options) { // CraftBukkit - replaces main(String[] astring)
StatisticList.a();
+ IConsoleLogManager iconsolelogmanager = null;
try {
/* CraftBukkit start - replace everything
@@ -668,6 +651,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
DedicatedServer dedicatedserver = new DedicatedServer(options);
+ iconsolelogmanager = dedicatedserver.getLogger();
if (options.has("port")) {
int port = (Integer) options.valueOf("port");
if (port > 0) {
@@ -705,7 +689,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
if (flag) {
- dedicatedserver.an();
+ dedicatedserver.ao();
}
*/
@@ -713,7 +697,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
// Runtime.getRuntime().addShutdownHook(new ThreadShutdown(dedicatedserver));
// CraftBukkit end
} catch (Exception exception) {
- log.log(Level.SEVERE, "Failed to start the minecraft server", exception);
+ if (iconsolelogmanager != null) {
+ iconsolelogmanager.severe("Failed to start the minecraft server", exception);
+ } else {
+ Logger.getAnonymousLogger().log(Level.SEVERE, "Failed to start the minecraft server", exception);
+ }
}
}
@@ -726,11 +714,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public void info(String s) {
- log.info(s);
+ this.getLogger().info(s);
}
public void warning(String s) {
- log.warning(s);
+ this.getLogger().warning(s);
}
public WorldServer getWorldServer(int i) {
@@ -750,7 +738,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public int v() {
- return this.s;
+ return this.r;
}
public String w() {
@@ -758,19 +746,19 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public String getVersion() {
- return "1.4.7";
+ return "1.5";
}
public int y() {
- return this.t.getPlayerCount();
+ return this.s.getPlayerCount();
}
public int z() {
- return this.t.getMaxPlayers();
+ return this.s.getMaxPlayers();
}
public String[] getPlayers() {
- return this.t.d();
+ return this.s.d();
}
public String getPlugins() {
@@ -811,7 +799,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
MinecraftServer.this.server.getPluginManager().callEvent(event);
// Event changes end
ServerCommand servercommand = new ServerCommand(event.getCommand(), RemoteControlCommandListener.instance);
- // this.q.a(RemoteControlCommandListener.instance, s);
+ // this.p.a(RemoteControlCommandListener.instance, s);
MinecraftServer.this.server.dispatchServerCommand(MinecraftServer.this.remoteConsole, servercommand); // CraftBukkit
return RemoteControlCommandListener.instance.d();
}};
@@ -832,12 +820,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public void i(String s) {
- log.log(Level.SEVERE, s);
+ this.getLogger().severe(s);
}
public void j(String s) {
if (this.isDebugging()) {
- log.log(Level.INFO, s);
+ this.getLogger().info(s);
}
}
@@ -851,7 +839,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
crashreport.g().a("Vec3 Pool Size", (Callable) (new CrashReportVec3DPoolSize(this)));
}
- if (this.t != null) {
+ if (this.s != null) {
crashreport.g().a("Player Count", (Callable) (new CrashReportPlayerCount(this)));
}
@@ -866,7 +854,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
if (s.startsWith("/")) {
s = s.substring(1);
boolean flag = !s.contains(" ");
- List list = this.q.b(icommandlistener, s);
+ List list = this.p.b(icommandlistener, s);
if (list != null) {
Iterator iterator = list.iterator();
@@ -886,7 +874,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
} else {
String[] astring = s.split(" ", -1);
String s2 = astring[astring.length - 1];
- String[] astring1 = this.t.d();
+ String[] astring1 = this.s.d();
int i = astring1.length;
for (int j = 0; j < i; ++j) {
@@ -905,7 +893,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public static MinecraftServer getServer() {
- return l;
+ return k;
}
public String getName() {
@@ -913,7 +901,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public void sendMessage(String s) {
- log.info(StripColor.a(s));
+ this.getLogger().info(StripColor.a(s));
}
public boolean a(int i, String s) {
@@ -925,43 +913,43 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public ICommandHandler getCommandHandler() {
- return this.q;
+ return this.p;
}
public KeyPair F() {
- return this.I;
+ return this.H;
}
public int G() {
- return this.s;
+ return this.r;
}
public void setPort(int i) {
- this.s = i;
+ this.r = i;
}
public String H() {
- return this.J;
+ return this.I;
}
public void k(String s) {
- this.J = s;
+ this.I = s;
}
public boolean I() {
- return this.J != null;
+ return this.I != null;
}
public String J() {
- return this.K;
+ return this.J;
}
public void l(String s) {
- this.K = s;
+ this.J = s;
}
public void a(KeyPair keypair) {
- this.I = keypair;
+ this.H = keypair;
}
public void c(int i) {
@@ -998,7 +986,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public void c(boolean flag) {
- this.N = flag;
+ this.M = flag;
}
public Convertable getConvertable() {
@@ -1006,7 +994,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public void P() {
- this.O = true;
+ this.N = true;
this.getConvertable().d();
// CraftBukkit start - This needs review, what does it do? (it's new)
@@ -1024,11 +1012,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public String getTexturePack() {
- return this.P;
+ return this.O;
}
public void setTexturePack(String s) {
- this.P = s;
+ this.O = s;
}
public void a(MojangStatisticsGenerator mojangstatisticsgenerator) {
@@ -1036,14 +1024,14 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(0));
mojangstatisticsgenerator.a("players_current", Integer.valueOf(this.y()));
mojangstatisticsgenerator.a("players_max", Integer.valueOf(this.z()));
- mojangstatisticsgenerator.a("players_seen", Integer.valueOf(this.t.getSeenPlayers().length));
+ mojangstatisticsgenerator.a("players_seen", Integer.valueOf(this.s.getSeenPlayers().length));
mojangstatisticsgenerator.a("uses_auth", Boolean.valueOf(this.onlineMode));
mojangstatisticsgenerator.a("gui_state", this.ag() ? "enabled" : "disabled");
- mojangstatisticsgenerator.a("avg_tick_ms", Integer.valueOf((int) (MathHelper.a(this.j) * 1.0E-6D)));
- mojangstatisticsgenerator.a("avg_sent_packet_count", Integer.valueOf((int) MathHelper.a(this.f)));
- mojangstatisticsgenerator.a("avg_sent_packet_size", Integer.valueOf((int) MathHelper.a(this.g)));
- mojangstatisticsgenerator.a("avg_rec_packet_count", Integer.valueOf((int) MathHelper.a(this.h)));
- mojangstatisticsgenerator.a("avg_rec_packet_size", Integer.valueOf((int) MathHelper.a(this.i)));
+ mojangstatisticsgenerator.a("avg_tick_ms", Integer.valueOf((int) (MathHelper.a(this.i) * 1.0E-6D)));
+ mojangstatisticsgenerator.a("avg_sent_packet_count", Integer.valueOf((int) MathHelper.a(this.e)));
+ mojangstatisticsgenerator.a("avg_sent_packet_size", Integer.valueOf((int) MathHelper.a(this.f)));
+ mojangstatisticsgenerator.a("avg_rec_packet_count", Integer.valueOf((int) MathHelper.a(this.g)));
+ mojangstatisticsgenerator.a("avg_rec_packet_size", Integer.valueOf((int) MathHelper.a(this.h)));
int i = 0;
// CraftBukkit start
@@ -1059,8 +1047,8 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
mojangstatisticsgenerator.a("world[" + i + "][hardcore]", Boolean.valueOf(worlddata.isHardcore()));
mojangstatisticsgenerator.a("world[" + i + "][generator_name]", worlddata.getType().name());
mojangstatisticsgenerator.a("world[" + i + "][generator_version]", Integer.valueOf(worlddata.getType().getVersion()));
- mojangstatisticsgenerator.a("world[" + i + "][height]", Integer.valueOf(this.D));
- mojangstatisticsgenerator.a("world[" + i + "][chunks_loaded]", Integer.valueOf(worldserver.I().getLoadedChunks()));
+ mojangstatisticsgenerator.a("world[" + i + "][height]", Integer.valueOf(this.C));
+ mojangstatisticsgenerator.a("world[" + i + "][chunks_loaded]", Integer.valueOf(worldserver.J().getLoadedChunks()));
++i;
// } // CraftBukkit
}
@@ -1136,11 +1124,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public int getMaxBuildHeight() {
- return this.D;
+ return this.C;
}
public void d(int i) {
- this.D = i;
+ this.C = i;
}
public boolean isStopped() {
@@ -1148,11 +1136,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public PlayerList getPlayerList() {
- return this.t;
+ return this.s;
}
public void a(PlayerList playerlist) {
- this.t = playerlist;
+ this.s = playerlist;
}
public void a(EnumGamemode enumgamemode) {
@@ -1176,7 +1164,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public void ai() {
- this.T = true;
+ this.S = true;
}
public ChunkCoordinates b() {
@@ -1187,7 +1175,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
return 16;
}
+ public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) {
+ return false;
+ }
+
+ public abstract IConsoleLogManager getLogger();
+
public static PlayerList a(MinecraftServer minecraftserver) {
- return minecraftserver.t;
+ return minecraftserver.s;
}
}