Interface BattleViewer
- All Known Implementing Classes:
BattleParticipant,EntityParticipant,LogBattleParticipant,PlayerParticipant,ProxyBattleParticipant,RaidBossPixelmonParticipant,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 TypeMethodDescriptionGets the battle controller this viewer is watching.@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 voidsendPacket(PixelmonPacket packet)
-
Method Details
-
getBattleController
BattleController getBattleController()Gets the battle controller this viewer is watching.- Returns:
- The battle controller this viewer is watching.
-
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.
-
sendBattleMessage
-
sendBattleMessage
-
sendBattleMessage
default void sendBattleMessage(net.minecraft.network.chat.Component message) -
sendPacket
-