From 0a2c4b4bb33c992d04048e4004d6fcce7ff9de2b Mon Sep 17 00:00:00 2001 From: Parker Hawke Date: Sun, 2 Apr 2023 12:58:05 +1000 Subject: [PATCH] #834: Add Player#sendHurtAnimation() --- src/main/java/org/bukkit/entity/Player.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 0c377ac3..83f74c9c 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/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.