Package de.presti.ree6.game.core.base
Interface IGame
public interface IGame
Interface for Games to implement.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the Game is created.voidjoinGame(GamePlayer user) Called when a User wants to join the Game.voidleaveGame(GamePlayer user) Called when a User wants to leave the Game.default voidonButtonInteractionReceive(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent buttonInteractionEvent) Called when a Button is clicked.default voidonMessageReceive(net.dv8tion.jda.api.events.message.MessageReceivedEvent messageReceivedEvent) Called when a Reaction is received.default voidonReactionReceive(net.dv8tion.jda.api.events.message.react.GenericMessageReactionEvent messageReactionEvent) Called when a Message is received.default voidrewardPlayer(GameSession gameSession, GamePlayer player, Object parameter) Called when a User should be rewarded.voidCalled when the Game is started.voidstopGame()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.
-