From fae6724a523d141215e5599ea752b2ec38cd8804 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 2 Apr 2023 12:58:05 +1000 Subject: [PATCH] #834: Add Player#sendHurtAnimation() By: Parker Hawke --- paper-api/src/main/java/org/bukkit/entity/Player.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index 0c377ac31..83f74c9cd 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -637,6 +637,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendMap(@NotNull MapView map); + /** + * Send a hurt animation. This fakes incoming damage towards the player from + * the given yaw relative to the player's direction. + * + * @param yaw the yaw in degrees relative to the player's direction where 0 + * is in front of the player, 90 is to the right, 180 is behind, and 270 is + * to the left + */ + public void sendHurtAnimation(float yaw); + /** * Add custom chat completion suggestions shown to the player while typing a * message.