public class BattleQuery
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
BattleRules |
battleRules
The type of battle to initiate.
|
int |
queryIndex
The index of the query.
|
| Constructor and Description |
|---|
BattleQuery(net.minecraft.entity.player.ServerPlayerEntity player1,
PixelmonEntity pokemon1,
net.minecraft.entity.player.ServerPlayerEntity player2,
PixelmonEntity pokemon2)
Initializes a battle query.
|
BattleQuery(net.minecraft.entity.player.ServerPlayerEntity player1,
Pokemon pokemon1,
net.minecraft.entity.player.ServerPlayerEntity player2,
Pokemon pokemon2)
Initializes a battle query with Pokémon instead of PixelmonEntities
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptQuery(net.minecraft.entity.player.ServerPlayerEntity player,
EnumBattleQueryResponse response)
Handles event where a player accepts the challenge.
|
void |
changeRules(net.minecraft.entity.player.ServerPlayerEntity player)
Requests that the battle rules be changed.
|
void |
declineQuery(net.minecraft.entity.player.ServerPlayerEntity player)
Closes the GUI if a player declines the battle.
|
static BattleQuery |
getQuery(int index)
Finds a specific battle query instance.
|
static BattleQuery |
getQuery(net.minecraft.entity.player.ServerPlayerEntity player)
Finds the battle query involving a certain player.
|
void |
proposeRules(net.minecraft.entity.player.ServerPlayerEntity player,
BattleRules rules)
Proposes a set of rules to use for the battle.
|
public int queryIndex
public BattleRules battleRules
public BattleQuery(net.minecraft.entity.player.ServerPlayerEntity player1,
PixelmonEntity pokemon1,
net.minecraft.entity.player.ServerPlayerEntity player2,
PixelmonEntity pokemon2)
player1 - The first player in the query.pokemon1 - The first player's lead Pokémon.player2 - The second player in the query.pokemon2 - The second player's lead Pokémon.public BattleQuery(net.minecraft.entity.player.ServerPlayerEntity player1,
Pokemon pokemon1,
net.minecraft.entity.player.ServerPlayerEntity player2,
Pokemon pokemon2)
player1 - The first player in the query.pokemon1 - The first player's lead Pokémon.player2 - The second player in the query.pokemon2 - The second player's lead Pokémon.public void acceptQuery(net.minecraft.entity.player.ServerPlayerEntity player,
EnumBattleQueryResponse response)
player - The player who accepted the challenge.response - The player's response to the challenge.public void declineQuery(net.minecraft.entity.player.ServerPlayerEntity player)
player - The player who declined the battle.public void proposeRules(net.minecraft.entity.player.ServerPlayerEntity player,
BattleRules rules)
player - The player proposing the rules.rules - The rules being proposed.public void changeRules(net.minecraft.entity.player.ServerPlayerEntity player)
player - The player requesting to change the rules.public static BattleQuery getQuery(int index)
index - The index of the battle query.public static BattleQuery getQuery(net.minecraft.entity.player.ServerPlayerEntity player)
player - The player to find a battle query for.