Interface BattleViewer
- All Known Implementing Classes:
BattleParticipant,EntityParticipant,LogBattleParticipant,PlayerParticipant,RaidPixelmonParticipant,Spectator,TestParticipant,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.EntityGets the entity this is representing.default @Nullable net.minecraft.server.level.ServerPlayerGets the player this is representing.default voidsendBattleMessage(String message) default voidsendBattleMessage(String message, Object... args) default voidsendBattleMessage(net.minecraft.network.chat.Component message) default voidsendDamagePacket(PixelmonWrapper user, int damage) Sends a damage packet to the viewing entitydefault voidsendHealPacket(PixelmonWrapper target, int amount) Sends a heal packet to the viewing entitydefault voidsendPacket(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
-