summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-01-18 19:42:49 -0500
committerTahg <tahgtahv@gmail.com>2011-01-18 19:42:49 -0500
commitabb3c5eee6d06b5746f941cd561be42d9a84ad1e (patch)
tree8d332469dd43eac9deac57e7df64f0b9b25a822f /src/main/java/net/minecraft/server
parenteace2d0f8a29ee629b8254bb5d8ee611e5d3024b (diff)
downloadcraftbukkit-abb3c5eee6d06b5746f941cd561be42d9a84ad1e.tar
craftbukkit-abb3c5eee6d06b5746f941cd561be42d9a84ad1e.tar.gz
craftbukkit-abb3c5eee6d06b5746f941cd561be42d9a84ad1e.tar.lz
craftbukkit-abb3c5eee6d06b5746f941cd561be42d9a84ad1e.tar.xz
craftbukkit-abb3c5eee6d06b5746f941cd561be42d9a84ad1e.zip
reverted # from server console
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java2
-rw-r--r--src/main/java/net/minecraft/server/ThreadCommandReader.java26
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();
+ }
+ }
+}