Module it.polimi.ingsw.am13
Class MenuItemSendChatMessage
java.lang.Object
it.polimi.ingsw.am13.client.view.tui.menu.MenuItem
it.polimi.ingsw.am13.client.view.tui.menu.MenuItemSendChatMessage
Menu item for sending a message to the chatroom currently active.
It uses the arguments string as the text of the message
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<PlayerLobby> List of receivers defining the current shown chat room. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeCommand
(String argsStr, NetworkHandler networkHandler) Executes the action this menu item representsMethods inherited from class it.polimi.ingsw.am13.client.view.tui.menu.MenuItem
getCommandKey, getDescription, toString
-
Field Details
-
chatRoom
List of receivers defining the current shown chat room.
-
-
Constructor Details
-
MenuItemSendChatMessage
Build a new menu item
-
-
Method Details
-
executeCommand
public void executeCommand(String argsStr, NetworkHandler networkHandler) throws InvalidTUICommandException Executes the action this menu item represents- Specified by:
executeCommand
in classMenuItem
- Parameters:
argsStr
- String of parameters for the commandnetworkHandler
- Handler of the network thanks to which the item sends the command to the server- Throws:
InvalidTUICommandException
- If there are no arguments passed via command line
-