Class TeamSelection
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.teamselection.TeamSelection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Consumer
<BattleController> protected final Consumer
<TeamSelection> protected boolean
protected ParticipantSelection[]
protected final net.minecraft.core.Holder
<BattleRuleSet> protected boolean
protected UUID
-
Constructor Summary
ConstructorsConstructorDescriptionTeamSelection
(boolean showOpponentTeam, boolean closeable, net.minecraft.core.Holder<BattleRuleSet> rules, Consumer<TeamSelection> cancelConsumer, Consumer<BattleController> battleStartConsumer, PartyStorage... participants) -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
hasPlayer
(net.minecraft.server.level.ServerPlayer player) void
registerTeamSelect
(net.minecraft.server.level.ServerPlayer player, it.unimi.dsi.fastutil.ints.IntList selection) Registers a selection that a player has made.void
unregisterTeamSelect
(net.minecraft.server.level.ServerPlayer player, it.unimi.dsi.fastutil.ints.IntList selection) Marks a player's selection as unconfirmed.
-
Field Details
-
uniqueId
-
participants
-
showOpponentTeam
protected boolean showOpponentTeam -
closeable
protected boolean closeable -
rules
-
cancelConsumer
-
battleStartConsumer
-
-
Constructor Details
-
TeamSelection
public TeamSelection(boolean showOpponentTeam, boolean closeable, net.minecraft.core.Holder<BattleRuleSet> rules, Consumer<TeamSelection> cancelConsumer, Consumer<BattleController> battleStartConsumer, PartyStorage... participants)
-
-
Method Details
-
hasPlayer
public boolean hasPlayer(net.minecraft.server.level.ServerPlayer player) -
handleCancel
public void handleCancel() -
registerTeamSelect
public void registerTeamSelect(net.minecraft.server.level.ServerPlayer player, it.unimi.dsi.fastutil.ints.IntList selection) Registers a selection that a player has made.- Parameters:
player
- The player making the selection.selection
- The selection the player made.
-
unregisterTeamSelect
public void unregisterTeamSelect(net.minecraft.server.level.ServerPlayer player, it.unimi.dsi.fastutil.ints.IntList selection) Marks a player's selection as unconfirmed.- Parameters:
player
- The player to mark as unconfirmed.
-