diff --git a/.gitignore b/.gitignore index 9c628f5f76..cc7ca79fd0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ # vim .*.sw[a-p] + +/world \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 704b2a9505..0d8a1bd03e 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 0000000000..ae3574247b --- /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(); + } + } +}