summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/MinecraftServer.java
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2013-03-24 23:22:32 -0500
committerTravis Watkins <amaranth@ubuntu.com>2013-03-25 00:51:36 -0500
commit5f089137ee63505b85ee7ddf0e75cb797c835d41 (patch)
tree1a73488a61ae3bec6ae237b7c1d83652f211cdac /src/main/java/net/minecraft/server/MinecraftServer.java
parent7c40a073d8b173dde3f7c13985b5b587e6158894 (diff)
downloadcraftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.tar
craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.tar.gz
craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.tar.lz
craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.tar.xz
craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.zip
Cleanup comments, formatting, etc
Diffstat (limited to 'src/main/java/net/minecraft/server/MinecraftServer.java')
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5c535cc6..5bf5fdc2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -13,10 +13,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
// CraftBukkit start
-import java.util.concurrent.ExecutionException;
import java.io.IOException;
-import com.google.common.io.Files;
import jline.console.ConsoleReader;
import joptsimple.OptionSet;
@@ -106,7 +104,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
org.bukkit.craftbukkit.Main.useJline = false;
this.reader = new ConsoleReader(System.in, System.out);
this.reader.setExpandEvents(false);
- } catch (java.io.IOException ex) {
+ } catch (IOException ex) {
Logger.getLogger(MinecraftServer.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -140,10 +138,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.b(s);
this.c("menu.loadingLevel");
this.worldServer = new WorldServer[3];
- // CraftBukkit - removed ticktime arrays
+ // CraftBukkit - Removed ticktime arrays
IDataManager idatamanager = this.convertable.a(s, true);
WorldData worlddata = idatamanager.getWorldData();
- // CraftBukkit start - removed worldsettings
+ // CraftBukkit start - Removed worldsettings
int worldCount = 3;
for (int j = 0; j < worldCount; ++j) {
@@ -202,7 +200,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
log.info("Success! To restore " + worldType + " in the future, simply move " + newWorld + " to " + oldWorld);
// Migrate world data too.
try {
- Files.copy(new File(new File(s), "level.dat"), new File(new File(name), "level.dat"));
+ com.google.common.io.Files.copy(new File(new File(s), "level.dat"), new File(new File(name), "level.dat"));
} catch (IOException exception) {
log.severe("Unable to migrate world data.");
}
@@ -347,7 +345,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
this.getLogger().info("Saving worlds");
this.saveChunks(false);
- /* CraftBukkit start - handled in saveChunks
+ /* CraftBukkit start - Handled in saveChunks
for (int i = 0; i < this.worldServer.length; ++i) {
WorldServer worldserver = this.worldServer[i];
@@ -442,7 +440,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
} catch (Throwable throwable1) {
throwable1.printStackTrace();
} finally {
- // CraftBukkit start - restore terminal to original settings
+ // CraftBukkit start - Restore terminal to original settings
try {
this.reader.getTerminal().restore();
} catch (Exception e) {
@@ -508,7 +506,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
public void r() {
this.methodProfiler.a("levels");
- // CraftBukkit start - only send timeupdates to the people in that world
+ // CraftBukkit start
this.server.getScheduler().mainThreadHeartbeat(this.ticks);
// Run tasks that are waiting on processing
@@ -518,7 +516,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
org.bukkit.craftbukkit.chunkio.ChunkIOExecutor.tick();
- // Send timeupdates to everyone, it will get the right time from the world the player is in.
+ // Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
EntityPlayer entityplayer = (EntityPlayer) this.getPlayerList().players.get(i);
@@ -602,7 +600,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
IConsoleLogManager iconsolelogmanager = null;
try {
- /* CraftBukkit start - replace everything
+ /* CraftBukkit start - Replace everything
boolean flag = false;
String s = null;
String s1 = ".";
@@ -762,7 +760,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
}
public String getPlugins() {
- // CraftBukkit start - whole method
+ // CraftBukkit start - Whole method
StringBuilder result = new StringBuilder();
org.bukkit.plugin.Plugin[] plugins = server.getPluginManager().getPlugins();
@@ -806,7 +804,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
processQueue.add(waitable);
try {
return waitable.get();
- } catch (ExecutionException e) {
+ } catch (java.util.concurrent.ExecutionException e) {
throw new RuntimeException("Exception processing rcon command " + s, e.getCause());
} catch (InterruptedException e) {
Thread.currentThread().interrupt(); // Maintain interrupted state