diff options
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/MinecraftServer.java | 2 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/ThreadCommandReader.java | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 704b2a95..0d8a1bd0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -449,7 +449,7 @@ public class MinecraftServer implements ICommandListener, Runnable { } } } else { - a.info("Unknown console command. Type \"#help\" for help."); + a.info("Unknown console command. Type \"help\" for help."); } } while (true); } diff --git a/src/main/java/net/minecraft/server/ThreadCommandReader.java b/src/main/java/net/minecraft/server/ThreadCommandReader.java new file mode 100644 index 00000000..ae357424 --- /dev/null +++ b/src/main/java/net/minecraft/server/ThreadCommandReader.java @@ -0,0 +1,26 @@ +package net.minecraft.server; + +import java.io.*; + +public class ThreadCommandReader extends Thread { + + final MinecraftServer a; /* synthetic field */ + + public ThreadCommandReader(MinecraftServer minecraftserver) { + super(); + a = minecraftserver; + } + + public void run() { + BufferedReader bufferedreader = new BufferedReader(((java.io.Reader) (new InputStreamReader(System.in)))); + String s = null; + + try { + while (!a.g && MinecraftServer.a(a) && (s = bufferedreader.readLine()) != null) { + a.a("#" + s, ((ICommandListener) (a))); + } + } catch (IOException ioexception) { + ioexception.printStackTrace(); + } + } +} |