diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/ThreadCommandReader.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ThreadCommandReader.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/ThreadCommandReader.java b/src/main/java/net/minecraft/server/ThreadCommandReader.java index f3d36e65..0158e96a 100644 --- a/src/main/java/net/minecraft/server/ThreadCommandReader.java +++ b/src/main/java/net/minecraft/server/ThreadCommandReader.java @@ -19,14 +19,24 @@ public class ThreadCommandReader extends Thread { } public void run() { - // CraftBukkit + // CraftBukkit start ConsoleReader bufferedreader = this.server.reader; String s = null; + String jlineTerminalSetting = org.bukkit.craftbukkit.Main.jlineTerminalSetting; + // CraftBukkit end try { - // CraftBukkit - while (!this.server.isStopped && MinecraftServer.isRunning(this.server) && ((s = bufferedreader.readLine(">", null)) != null)) { - this.server.issueCommand(s, this.server); + while (!this.server.isStopped && MinecraftServer.isRunning(this.server)) { + // CraftBukkit start - JLine disabling compatibility + if (jlineTerminalSetting != null && jlineTerminalSetting.equals("jline.UnsupportedTerminal")) { + s = bufferedreader.readLine(); + } else { + s = bufferedreader.readLine(">", null); + } + if (s != null) { + // CraftBukkit end + this.server.issueCommand(s, this.server); + } } } catch (IOException ioexception) { // CraftBukkit |