Some documentation stuff

This commit is contained in:
Jonas 2022-03-27 23:57:06 +02:00
parent 0370bf30b8
commit ae7bff2a6f
3 changed files with 9 additions and 4 deletions

View File

@ -14,9 +14,14 @@ Votes are held in the night for the ghosts to decide who will be next and during
## Features
* 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
...

View File

@ -12,12 +12,12 @@ public class AllClientNames {
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
* @return All names adding the new currentName
*/
public static String allNames(String currentName) {
return names.append(currentName).toString();
return names.append(currentName).toString(); //todo: might use a String<> instead.
}
}

View File

@ -16,7 +16,7 @@ public class JServerProtocolParser {
} catch (IndexOutOfBoundsException e) {
System.out.println("Received unknown command");
}
//System.out.println(header); helpful for debugging
//System.out.println(header); //helpful for debugging
switch (header) {
case "CHATA":
h.broadcastMessage(msg.substring(6));