Class MusicQuiz
java.lang.Object
de.presti.ree6.game.impl.musicquiz.MusicQuiz
- All Implemented Interfaces:
IGame
Class representing the game "Music Quiz"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the Game is created.getParticipantByUserId(long userId) Retrieve a participant by his user id.voidjoinGame(GamePlayer user) Called when a User wants to join the Game.voidleaveGame(GamePlayer user) Called when a User wants to leave the Game.voidonButtonInteractionReceive(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent buttonInteractionEvent) Called when a Button is clicked.voidonMessageReceive(net.dv8tion.jda.api.events.message.MessageReceivedEvent messageReceivedEvent) Called when a Reaction is received.voidSelect a new song and play the timer!voidCalled when the Game is started.voidstopGame()Called when the Game is stopped.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.presti.ree6.game.core.base.IGame
onReactionReceive, rewardPlayer
-
Constructor Details
-
MusicQuiz
Constructor.- Parameters:
gameSession- The game session.
-
-
Method Details
-
createGame
public void createGame()Description copied from interface:IGameCalled when the Game is created.- Specified by:
createGamein interfaceIGame
-
startGame
public void startGame()Description copied from interface:IGameCalled when the Game is started. -
joinGame
Description copied from interface:IGameCalled when a User wants to join the Game. -
leaveGame
Description copied from interface:IGameCalled when a User wants to leave the Game. -
onMessageReceive
public void onMessageReceive(net.dv8tion.jda.api.events.message.MessageReceivedEvent messageReceivedEvent) Description copied from interface:IGameCalled when a Reaction is received.- Specified by:
onMessageReceivein interfaceIGame- Parameters:
messageReceivedEvent- The Event.
-
onButtonInteractionReceive
public void onButtonInteractionReceive(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent buttonInteractionEvent) Description copied from interface:IGameCalled when a Button is clicked.- Specified by:
onButtonInteractionReceivein interfaceIGame- Parameters:
buttonInteractionEvent- The Event.
-
stopGame
public void stopGame()Description copied from interface:IGameCalled when the Game is stopped. -
selectNextSong
public void selectNextSong()Select a new song and play the timer! -
getParticipantByUserId
Retrieve a participant by his user id.- Parameters:
userId- The user id.- Returns:
- The participant or null.
-