mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Added -nojline CLI option to emulate vanilla console behaviours. Added JLine disabling compatibility (removes the '>').
-nojline disables JLine, removes the '>', sets the timestamp to vanilla's and sets the language to English. -Djline.terminal=jline.UnsupportedTerminal disables JLine and removes the '>'.
This commit is contained in:
1 parent
cd87e51638
commit
eac5b9623d
3 files changed
+24
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user