diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-05-19 21:46:47 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-05-19 21:46:47 +0100 |
commit | 6319a19073b10bc5f2d16ac7ce104b5ced267cdc (patch) | |
tree | 3ac377816444512a5ef203e0e3a28a76cc49442d /src/main/java/net/minecraft/server | |
parent | 480c1b987704687f0dfe9ae6d4a136b8d2071725 (diff) | |
download | craftbukkit-6319a19073b10bc5f2d16ac7ce104b5ced267cdc.tar craftbukkit-6319a19073b10bc5f2d16ac7ce104b5ced267cdc.tar.gz craftbukkit-6319a19073b10bc5f2d16ac7ce104b5ced267cdc.tar.lz craftbukkit-6319a19073b10bc5f2d16ac7ce104b5ced267cdc.tar.xz craftbukkit-6319a19073b10bc5f2d16ac7ce104b5ced267cdc.zip |
Possible fix for -nojline printing blank lines
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/ThreadCommandReader.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/ThreadCommandReader.java b/src/main/java/net/minecraft/server/ThreadCommandReader.java index 0158e96a..670aff76 100644 --- a/src/main/java/net/minecraft/server/ThreadCommandReader.java +++ b/src/main/java/net/minecraft/server/ThreadCommandReader.java @@ -8,6 +8,7 @@ import java.io.InputStreamReader; import java.util.logging.Level; import java.util.logging.Logger; import jline.ConsoleReader; +import org.bukkit.craftbukkit.Main; // CraftBukkit end public class ThreadCommandReader extends Thread { @@ -22,16 +23,15 @@ public class ThreadCommandReader extends Thread { // CraftBukkit start ConsoleReader bufferedreader = this.server.reader; String s = null; - String jlineTerminalSetting = org.bukkit.craftbukkit.Main.jlineTerminalSetting; // CraftBukkit end try { while (!this.server.isStopped && MinecraftServer.isRunning(this.server)) { // CraftBukkit start - JLine disabling compatibility - if (jlineTerminalSetting != null && jlineTerminalSetting.equals("jline.UnsupportedTerminal")) { - s = bufferedreader.readLine(); - } else { + if (Main.useJline) { s = bufferedreader.readLine(">", null); + } else { + s = bufferedreader.readLine(); } if (s != null) { // CraftBukkit end |