mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
reverted # from server console
This commit is contained in:
parent
eace2d0f8a
commit
abb3c5eee6
3 changed files with 29 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -14,3 +14,5 @@
|
||||||
|
|
||||||
# vim
|
# vim
|
||||||
.*.sw[a-p]
|
.*.sw[a-p]
|
||||||
|
|
||||||
|
/world
|
|
@ -449,7 +449,7 @@ public class MinecraftServer implements ICommandListener, Runnable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
a.info("Unknown console command. Type \"#help\" for help.");
|
a.info("Unknown console command. Type \"help\" for help.");
|
||||||
}
|
}
|
||||||
} while (true);
|
} while (true);
|
||||||
}
|
}
|
||||||
|
|
26
src/main/java/net/minecraft/server/ThreadCommandReader.java
Normal file
26
src/main/java/net/minecraft/server/ThreadCommandReader.java
Normal file
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue