Package de.presti.ree6.game.core
Class GameSession
java.lang.Object
de.presti.ree6.game.core.GameSession
Class used to store Information about Games and its related Information.
-
Constructor Summary
ConstructorDescriptionGameSession
(String gameIdentifier, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.Member user, IGame game, net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion messageChannelUnion, ArrayList<net.dv8tion.jda.api.entities.User> participants) Constructor for the GameSession.GameSession
(String gameIdentifier, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.Member user, net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion messageChannelUnion, ArrayList<net.dv8tion.jda.api.entities.User> participants) Constructor for the GameSession. -
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion
Method used to get the Channel where the Game is played.getGame()
Method used to get the Game class.Method used to get the Identifier of the GameSession.Method used to get the current Game-State.net.dv8tion.jda.api.entities.User
Retrieve the current Session Host asUser
ArrayList<net.dv8tion.jda.api.entities.User>
Method used to get the Participants of the Game.void
Method used to set the Game class.void
setGameState
(GameState gameState) Method used to set the current Game-State.
-
Constructor Details
-
GameSession
public GameSession(String gameIdentifier, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.Member user, net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion messageChannelUnion, ArrayList<net.dv8tion.jda.api.entities.User> participants) Constructor for the GameSession.- Parameters:
gameIdentifier
- The Identifier of the GameSession.guild
- The Guild in which this Session originated.user
- The Creator of the Game.messageChannelUnion
- The Channel where the Game is played.participants
- The Participants of the Game.
-
GameSession
public GameSession(String gameIdentifier, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.Member user, IGame game, net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion messageChannelUnion, ArrayList<net.dv8tion.jda.api.entities.User> participants) Constructor for the GameSession.- Parameters:
gameIdentifier
- The Identifier of the GameSession.guild
- The Guild in which this Session originated.user
- The Creator of the Game.game
- The Game class.messageChannelUnion
- The Channel where the Game is played.participants
- The Participants of the Game.
-
-
Method Details
-
getGameIdentifier
Method used to get the Identifier of the GameSession.- Returns:
- The Identifier of the GameSession.
-
getGame
Method used to get the Game class.- Returns:
- The Game class.
-
setGame
Method used to set the Game class.- Parameters:
game
- The Game class.
-
getChannel
public net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion getChannel()Method used to get the Channel where the Game is played.- Returns:
- The Channel where the Game is played.
-
getParticipants
Method used to get the Participants of the Game.- Returns:
- The Participants of the Game.
-
getGameState
Method used to get the current Game-State.- Returns:
- The current Game-State.
-
setGameState
Method used to set the current Game-State.- Parameters:
gameState
- The current Game-State.
-
getHostAsUser
public net.dv8tion.jda.api.entities.User getHostAsUser()Retrieve the current Session Host asUser
- Returns:
- The current Session Host as
User
-