Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1ca99e5fe8
@ -14,9 +14,14 @@ Votes are held in the night for the ghosts to decide who will be next and during
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
* 1 - 6 Players
|
* 1 - 6 Players
|
||||||
* In Game Chat
|
* In-Game Chat
|
||||||
* ...
|
* ...
|
||||||
|
|
||||||
|
## Console Commands
|
||||||
|
* /c "message" - sends a chat message to all connected players
|
||||||
|
* /n "name" - changes player name
|
||||||
|
* /q - quit
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|||||||
@ -12,12 +12,12 @@ public class AllClientNames {
|
|||||||
static StringBuilder names = new StringBuilder();
|
static StringBuilder names = new StringBuilder();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Safes a new name to the List of all Names
|
* Saves a new name to the List of all Names
|
||||||
*
|
*
|
||||||
* @param currentName the new name to be added
|
* @param currentName the new name to be added
|
||||||
* @return All names adding the new currentName
|
* @return All names adding the new currentName
|
||||||
*/
|
*/
|
||||||
public static String allNames(String currentName) {
|
public static String allNames(String currentName) {
|
||||||
return names.append(currentName).toString();
|
return names.append(currentName).toString(); //todo: might use a String<> instead.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ public class JServerProtocolParser {
|
|||||||
} catch (IndexOutOfBoundsException e) {
|
} catch (IndexOutOfBoundsException e) {
|
||||||
System.out.println("Received unknown command");
|
System.out.println("Received unknown command");
|
||||||
}
|
}
|
||||||
//System.out.println(header); helpful for debugging
|
//System.out.println(header); //helpful for debugging
|
||||||
switch (header) {
|
switch (header) {
|
||||||
case "CHATA":
|
case "CHATA":
|
||||||
h.broadcastMessage(msg.substring(6));
|
h.broadcastMessage(msg.substring(6));
|
||||||
|
|||||||
Reference in New Issue
Block a user