From ccf26486ac2f3e53ab1d527daa9aa2681058cd4b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 22 Nov 2021 15:03:24 +1100 Subject: [PATCH] #592: Add Player#sendEquipmentChange By: Perzan --- .../src/main/java/org/bukkit/entity/Player.java | 12 ++++++++++++ 1 file changed, 12 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 cd4599b0f2..929bdedec8 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -21,6 +21,7 @@ import org.bukkit.conversations.Conversable; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.block.BlockDropItemEvent; import org.bukkit.event.player.PlayerResourcePackStatusEvent; +import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; import org.bukkit.map.MapView; import org.bukkit.plugin.Plugin; @@ -459,6 +460,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendBlockDamage(@NotNull Location loc, float progress); + /** + * Send the equipment change of an entity. This fakes the equipment change + * of an entity for a user. This will not actually change the inventory of + * the specified entity in any way. + * + * @param entity The entity that the player will see the change for + * @param slot The slot of the spoofed equipment change + * @param item The ItemStack to display for the player + */ + public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item); + /** * 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