Interface BattleViewer

All Known Implementing Classes:
BattleParticipant, EntityParticipant, 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.
  • 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

      default void sendDamagePacket(PixelmonWrapper user, int damage)
      Sends a damage packet to the viewing entity
      Parameters:
      user - The Pokemon being damaged
      damage - The amount of health damaged by the Pokemon
    • sendHealPacket

      default void sendHealPacket(PixelmonWrapper target, int amount)
      Sends a heal packet to the viewing entity
      Parameters:
      target - The Pokemon being healed
      amount - The amount of health healed by the Pokemon
    • sendBattleMessage

      default void sendBattleMessage(String message)
    • sendBattleMessage

      default void sendBattleMessage(String message, Object... args)
    • sendBattleMessage

      default void sendBattleMessage(net.minecraft.network.chat.Component message)
    • sendPacket

      default void sendPacket(PixelmonPacket packet)