Class BattleQueryPlayer

java.lang.Object
com.pixelmonmod.pixelmon.battles.BattleQueryPlayer

public class BattleQueryPlayer extends Object
Holds information about a player in a battle query.
  • 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

      public BattleQueryPlayer(net.minecraft.server.level.ServerPlayer player, Pokemon pokemon)
      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

      public void setResponse(EnumBattleQueryResponse response)
      Sets the response from the player.
      Parameters:
      response - The response
    • getResponse

      @Nullable public EnumBattleQueryResponse getResponse()
      Gets the response from the player.
      Returns:
      The response
    • getPokemon

      public Pokemon getPokemon()
      Gets the selected Pokémon from the player that they will start the battle with.
      Returns:
      The selected Pokémon
    • setPokemon

      public void setPokemon(Pokemon pokemon)
      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

      public PlayerParticipant[] getParticipant()
      Creates a single battle player participant from the query player.
      Returns:
      A single battle player participant from the query player.
    • getParticipant

      public PlayerParticipant[] getParticipant(PixelmonEntity second)
      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.