Class MusicQuiz
java.lang.Object
de.presti.ree6.game.impl.musicquiz.MusicQuiz
- All Implemented Interfaces:
IGame
Class representing the game "Music Quiz"
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when the Game is created.getParticipantByUserId
(long userId) Retrieve a participant by his user id.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.void
onButtonInteractionReceive
(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent buttonInteractionEvent) Called when a Button is clicked.void
onMessageReceive
(net.dv8tion.jda.api.events.message.MessageReceivedEvent messageReceivedEvent) Called when a Reaction is received.void
Select a new song and play the timer!void
Called when the Game is started.void
stopGame()
Called when the Game is stopped.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:IGame
Called when the Game is created.- Specified by:
createGame
in interfaceIGame
-
startGame
public void startGame()Description copied from interface:IGame
Called when the Game is started. -
joinGame
Description copied from interface:IGame
Called when a User wants to join the Game. -
leaveGame
Description copied from interface:IGame
Called when a User wants to leave the Game. -
onMessageReceive
public void onMessageReceive(net.dv8tion.jda.api.events.message.MessageReceivedEvent messageReceivedEvent) Description copied from interface:IGame
Called when a Reaction is received.- Specified by:
onMessageReceive
in interfaceIGame
- Parameters:
messageReceivedEvent
- The Event.
-
onButtonInteractionReceive
public void onButtonInteractionReceive(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent buttonInteractionEvent) Description copied from interface:IGame
Called when a Button is clicked.- Specified by:
onButtonInteractionReceive
in interfaceIGame
- Parameters:
buttonInteractionEvent
- The Event.
-
stopGame
public void stopGame()Description copied from interface:IGame
Called 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.
-