Can now show client and server versions.

This commit is contained in:
Deathsbreed
2014-05-04 20:18:33 -05:00
parent 000d834d42
commit 9d7612cd55
3 changed files with 12 additions and 2 deletions

View File

@ -47,10 +47,16 @@ public class Client implements Runnable {
}
public void run() {
String uinput;
while(thread != null) {
try {
streamOut.writeUTF(console.readLine());
streamOut.flush();
uinput = console.readLine();
if(uinput.equals("/clientVersion")) {
System.out.println(version);
} else {
streamOut.writeUTF(uinput);
streamOut.flush();
}
} catch(IOException e) {
System.out.println("Sending error: " + e.getMessage());
stop();