From cfa2f6725198cbabc30a0648155a1048c7fe59b3 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 24 Feb 2021 20:21:37 +1100 Subject: [PATCH] #588: Add Player#sendBlockDamage() By: Parker Hawke --- paper-api/src/main/java/org/bukkit/entity/Player.java | 11 +++++++++++ 1 file changed, 11 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 1d5bfca29b..b83da4ff6e 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -416,6 +416,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendBlockChange(@NotNull Location loc, @NotNull BlockData block); + /** + * Send block damage. This fakes block break progress for a user at a + * certain location. This will not actually change the block's break + * progress in any way. + * + * @param loc the location of the damaged block + * @param progress the progress from 0.0 - 1.0 where 0 is no damage and + * 1.0 is the most damaged + */ + public void sendBlockDamage(@NotNull Location loc, float progress); + /** * Send a chunk change. This fakes a chunk change packet for a user at a * certain location. The updated cuboid must be entirely within a single