Package de.presti.ree6.game.core.base
Interface IGame
public interface IGame
Interface for Games to implement.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when the Game is created.void
joinGame
(GamePlayer user) Called when a User wants to join the Game.void
leaveGame
(GamePlayer user) Called when a User wants to leave the Game.default void
onButtonInteractionReceive
(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent buttonInteractionEvent) Called when a Button is clicked.default void
onMessageReceive
(net.dv8tion.jda.api.events.message.MessageReceivedEvent messageReceivedEvent) Called when a Reaction is received.default void
onReactionReceive
(net.dv8tion.jda.api.events.message.react.GenericMessageReactionEvent messageReactionEvent) Called when a Message is received.default void
rewardPlayer
(GameSession gameSession, GamePlayer player, Object parameter) Called when a User should be rewarded.void
Called when the Game is started.void
stopGame()
Called when the Game is stopped.
-
Method Details
-
createGame
void createGame()Called when the Game is created. -
startGame
void startGame()Called when the Game is started. -
joinGame
Called when a User wants to join the Game.- Parameters:
user
- The User who wants to join.
-
leaveGame
Called when a User wants to leave the Game.- Parameters:
user
- The User who wants to leave.
-
onReactionReceive
default void onReactionReceive(net.dv8tion.jda.api.events.message.react.GenericMessageReactionEvent messageReactionEvent) Called when a Message is received.- Parameters:
messageReactionEvent
- The Event.
-
onMessageReceive
default void onMessageReceive(net.dv8tion.jda.api.events.message.MessageReceivedEvent messageReceivedEvent) Called when a Reaction is received.- Parameters:
messageReceivedEvent
- The Event.
-
onButtonInteractionReceive
default void onButtonInteractionReceive(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent buttonInteractionEvent) Called when a Button is clicked.- Parameters:
buttonInteractionEvent
- The Event.
-
rewardPlayer
Called when a User should be rewarded.- Parameters:
gameSession
- The current Session.player
- The Player who should be rewarded.parameter
- Any additional Parameter.
-
stopGame
void stopGame()Called when the Game is stopped.
-