Interface IGame

All Known Implementing Classes:
Blackjack, MusicQuiz

public interface IGame
Interface for Games to implement.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the Game is created.
    void
    Called when a User wants to join the Game.
    void
    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
    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

      void joinGame(GamePlayer user)
      Called when a User wants to join the Game.
      Parameters:
      user - The User who wants to join.
    • leaveGame

      void leaveGame(GamePlayer user)
      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

      default void rewardPlayer(GameSession gameSession, GamePlayer player, Object parameter)
      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.