diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-05 20:14:26 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-05 20:15:19 +0000 |
commit | 589f66bd1b766dc1fdd737ee885304196a2ed86a (patch) | |
tree | 5457f9727418f5847c63712bcf71a427e1733106 /src/main/java/net/minecraft/server | |
parent | 13561bca9c7c6d99ff2c0272c83f2949842e879e (diff) | |
download | craftbukkit-589f66bd1b766dc1fdd737ee885304196a2ed86a.tar craftbukkit-589f66bd1b766dc1fdd737ee885304196a2ed86a.tar.gz craftbukkit-589f66bd1b766dc1fdd737ee885304196a2ed86a.tar.lz craftbukkit-589f66bd1b766dc1fdd737ee885304196a2ed86a.tar.xz craftbukkit-589f66bd1b766dc1fdd737ee885304196a2ed86a.zip |
Added new --noconsole command argument, thanks to mkurzeja for the idea
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/ThreadCommandReader.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ThreadCommandReader.java b/src/main/java/net/minecraft/server/ThreadCommandReader.java index 821cf660..09505ff6 100644 --- a/src/main/java/net/minecraft/server/ThreadCommandReader.java +++ b/src/main/java/net/minecraft/server/ThreadCommandReader.java @@ -4,6 +4,8 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; +import static org.bukkit.craftbukkit.Main.*; + public class ThreadCommandReader extends Thread { final MinecraftServer server; @@ -13,13 +15,19 @@ public class ThreadCommandReader extends Thread { } public void run() { + // CraftBukkit start + if (!useConsole) { + return; + } + // CraftBukkit end + jline.ConsoleReader bufferedreader = this.server.reader; // CraftBukkit String s = null; try { // CraftBukkit start - JLine disabling compatibility while (!this.server.isStopped && MinecraftServer.isRunning(this.server)) { - if (org.bukkit.craftbukkit.Main.useJline) { + if (useJline) { s = bufferedreader.readLine(">", null); } else { s = bufferedreader.readLine(); |