Interface BattleViewer
- All Known Implementing Classes:
BattleParticipant
,EntityParticipant
,PlayerParticipant
,RaidPixelmonParticipant
,Spectator
,TestParticipant
,TrainerParticipant
,WildPixelmonParticipant
public interface BattleViewer
An interface representing an entity that is watching a battle.
Note: this class does not strictly refer to a player entity, but rather any entity that is watching, or participating in, a battle.
Note: this class does not strictly refer to a player entity, but rather any entity that is watching, or participating in, a battle.
-
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.world.entity.Entity
Gets the entity this is representing.default @Nullable net.minecraft.server.level.ServerPlayer
Gets the player this is representing.default void
sendBattleMessage
(String message) default void
sendBattleMessage
(String message, Object... args) default void
sendBattleMessage
(net.minecraft.network.chat.Component message) default void
sendDamagePacket
(PixelmonWrapper user, int damage) Sends a damage packet to the viewing entitydefault void
sendHealPacket
(PixelmonWrapper target, int amount) Sends a heal packet to the viewing entitydefault void
sendPacket
(PixelmonPacket packet)
-
Method Details
-
getPlayer
@Nullable default @Nullable net.minecraft.server.level.ServerPlayer getPlayer()Gets the player this is representing.
Note: this method may return null if the entity is not a player.- Returns:
- The player this is representing.
-
getEntity
@Nullable @Nullable net.minecraft.world.entity.Entity getEntity()Gets the entity this is representing.- Returns:
- The entity this is representing.
-
sendDamagePacket
Sends a damage packet to the viewing entity- Parameters:
user
- The Pokemon being damageddamage
- The amount of health damaged by the Pokemon
-
sendHealPacket
Sends a heal packet to the viewing entity- Parameters:
target
- The Pokemon being healedamount
- The amount of health healed by the Pokemon
-
sendBattleMessage
-
sendBattleMessage
-
sendBattleMessage
default void sendBattleMessage(net.minecraft.network.chat.Component message) -
sendPacket
-