mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Much better console interaction. History, no more losing the command, colours, inline editing, etc. Shorter log output to console (but not to file).
This commit is contained in:
1 parent
659fa9eaf9
commit
57338bee52
9 files changed
+181
-7
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import jline.ConsoleReader;
|
||||
|
||||
public class ThreadCommandReader extends Thread {
|
||||
|
||||
final MinecraftServer a;
|
||||
|
||||
public ThreadCommandReader(MinecraftServer minecraftserver) {
|
||||
this.a = minecraftserver;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
// Craftbukkit start - whole method, nuked to oblivion! :o
|
||||
|
||||
try {
|
||||
ConsoleReader reader = a.reader;
|
||||
String line = null;
|
||||
|
||||
while ((!this.a.g) && (MinecraftServer.a(this.a)) && ((line = reader.readLine()) != null)) {
|
||||
this.a.a(line, (ICommandListener) this.a);
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(ThreadCommandReader.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
// Craftbukkit end
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user