Interface TictactoeModule
- All Superinterfaces:
org.incendo.cloud.execution.CommandExecutionHandler<FPlayer>, ModuleCommand, ModuleLocalization, ModuleSimple
The /tictactoe command, which plays a round against another player.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumHow far a round has got.Nested classes/interfaces inherited from interface org.incendo.cloud.execution.CommandExecutionHandler
org.incendo.cloud.execution.CommandExecutionHandler.FutureCommandExecutionHandler<C> -
Method Summary
Modifier and TypeMethodDescriptionconfig()The config section for this command, which also holds its aliases.voidexecuteMove(FPlayer fPlayer, org.incendo.cloud.context.CommandContext<FPlayer> commandContext) Runs the move form of the command.getMoveMessage(FPlayer fPlayer, FPlayer fResolver, TicTacToe ticTacToe, int typeTile, String move) The rendered board plus its heading.localization(FPlayer fPlayer) The localization section for a player, picked from their chosen language.The permission that gates this module.voidsendCreateMessage(FPlayer fPlayer, FPlayer fReceiver, TicTacToe ticTacToe, UUID metadataUUID) Invites a player to a game.voidsendMoveMessage(FPlayer fPlayer, FPlayer fReceiver, TicTacToe ticTacToe, int typeTitle, String move, UUID metadataUUID) Announces a move and redraws the board.Methods inherited from interface org.incendo.cloud.execution.CommandExecutionHandler
executeFutureMethods inherited from interface ModuleCommand
execute, executeMethods inherited from interface ModuleLocalization
cooldown, cooldownOrThrow, permissions, sound, soundOrThrow
-
Method Details
-
config
Command.Tictactoe config()Description copied from interface:ModuleCommandThe config section for this command, which also holds its aliases.- Specified by:
configin interfaceModuleCommand- Specified by:
configin interfaceModuleSimple- Returns:
- the command settings
-
permission
Permission.Command.Tictactoe permission()Description copied from interface:ModuleSimpleThe permission that gates this module.- Specified by:
permissionin interfaceModuleSimple- Returns:
- the permission
-
localization
Description copied from interface:ModuleLocalizationThe localization section for a player, picked from their chosen language.- Specified by:
localizationin interfaceModuleLocalization- Parameters:
fPlayer- the player the text is for- Returns:
- the localization settings
-
sendCreateMessage
-
sendMoveMessage
void sendMoveMessage(FPlayer fPlayer, FPlayer fReceiver, TicTacToe ticTacToe, int typeTitle, String move, UUID metadataUUID) Announces a move and redraws the board.- Parameters:
fPlayer- the player who movedfReceiver- the opponentticTacToe- the gametypeTitle- which heading to showmove- the square playedmetadataUUID- the shared message id
-
executeMove
-
getMoveMessage
String getMoveMessage(FPlayer fPlayer, FPlayer fResolver, TicTacToe ticTacToe, int typeTile, String move) The rendered board plus its heading.- Parameters:
fPlayer- the player who movedfResolver- the readerticTacToe- the gametypeTile- which heading to showmove- the square played- Returns:
- the rendered board
-