mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
#879: Add Player#sendHealthUpdate()
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
f16f465a47
commit
9939900496
1 changed files with 19 additions and 0 deletions
|
@ -1402,6 +1402,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|||
*/
|
||||
public void setWorldBorder(@Nullable WorldBorder border);
|
||||
|
||||
/**
|
||||
* Send a health update to the player. This will adjust the health, food, and
|
||||
* saturation on the client and will not affect the player's actual values on
|
||||
* the server. As soon as any of these values change on the server, changes sent
|
||||
* by this method will no longer be visible.
|
||||
*
|
||||
* @param health the health. If 0.0, the client will believe it is dead
|
||||
* @param foodLevel the food level
|
||||
* @param saturation the saturation
|
||||
*/
|
||||
public void sendHealthUpdate(double health, int foodLevel, float saturation);
|
||||
|
||||
/**
|
||||
* Send a health update to the player using its known server values. This will
|
||||
* synchronize the health, food, and saturation on the client and therefore may
|
||||
* be useful when changing a player's maximum health attribute.
|
||||
*/
|
||||
public void sendHealthUpdate();
|
||||
|
||||
/**
|
||||
* Gets if the client is displayed a 'scaled' health, that is, health on a
|
||||
* scale from 0-{@link #getHealthScale()}.
|
||||
|
|
Loading…
Reference in a new issue