public class Spectator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
watchedName
The name of the player who this spectator is watching from.
|
Constructor and Description |
---|
Spectator(net.minecraft.entity.player.ServerPlayerEntity player,
java.lang.String watchedName)
Initializes a spectator.
|
Modifier and Type | Method and Description |
---|---|
net.minecraft.entity.player.ServerPlayerEntity |
getEntity()
Gets the player this spectator is representing.
|
void |
sendBattleMessage(net.minecraft.util.text.TranslationTextComponent message)
Sends a battle message to the spectator.
|
void |
sendDamagePacket(PixelmonWrapper user,
int damage)
Updates the spectator about damage dealt to a Pokémon.
|
void |
sendHealPacket(PixelmonWrapper target,
int amount)
Updates the spectator about a Pokémon healing.
|
void |
sendMessage(PixelmonPacket message)
Sends a battle update message to the spectator.
|
public java.lang.String watchedName
public Spectator(net.minecraft.entity.player.ServerPlayerEntity player, java.lang.String watchedName)
player
- The player this spectator is representing.public net.minecraft.entity.player.ServerPlayerEntity getEntity()
public void sendDamagePacket(PixelmonWrapper user, int damage)
user
- The Pokémon being damaged.damage
- The damage dealt to the Pokémon.public void sendHealPacket(PixelmonWrapper target, int amount)
target
- The Pokémon being healed.amount
- The amount of health healed by the Pokémon.public void sendBattleMessage(net.minecraft.util.text.TranslationTextComponent message)
message
- The message to send.public void sendMessage(PixelmonPacket message)
message
- The message to send.