Package com.pixelmonmod.pixelmon.battles
Class BattleQueryPlayer
java.lang.Object
com.pixelmonmod.pixelmon.battles.BattleQueryPlayer
Holds information about a player in a battle query.
-
Constructor Summary
ConstructorDescriptionBattleQueryPlayer
(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon) Initializes a query player object with Pokémon instead of a PixelmonEntity.BattleQueryPlayer
(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmonEntity) Initializes a query player object. -
Method Summary
Modifier and TypeMethodDescriptionCreates a single battle player participant from the query player.getParticipant
(PixelmonEntity second) Creates a double battle player participant from the query player.net.minecraft.server.level.ServerPlayer
Gets the player that is represented by the container.Gets the selected Pokémon from the player that they will start the battle with.Gets the response from the player.void
setPokemon
(Pokemon pokemon) Sets the selected Pokémon from the player.void
setResponse
(EnumBattleQueryResponse response) Sets the response from the player.
-
Constructor Details
-
BattleQueryPlayer
public BattleQueryPlayer(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmonEntity) Initializes a query player object.- Parameters:
player
- The player represented by the container.pixelmonEntity
- The Pokémon sent out by the player to start the battle.
-
BattleQueryPlayer
Initializes a query player object with Pokémon instead of a PixelmonEntity.- Parameters:
player
- The player represented by the container.pokemon
- The Pokémon sent out by the player to start the battle.
-
-
Method Details
-
setResponse
Sets the response from the player.- Parameters:
response
- The response
-
getResponse
Gets the response from the player.- Returns:
- The response
-
getPokemon
Gets the selected Pokémon from the player that they will start the battle with.- Returns:
- The selected Pokémon
-
setPokemon
Sets the selected Pokémon from the player.- Parameters:
pokemon
- The selected Pokémon
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer()Gets the player that is represented by the container.- Returns:
- The player
-
getParticipant
Creates a single battle player participant from the query player.- Returns:
- A single battle player participant from the query player.
-
getParticipant
Creates a double battle player participant from the query player.- Parameters:
second
- The second Pokémon that the player will lead with in battle.- Returns:
- A double battle player participant from the query player.
-