mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
#814: Add a method to send multiple equipment changes
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
3b7d1ed26c
commit
0fea70d4c9
1 changed files with 18 additions and 7 deletions
|
@ -2,6 +2,7 @@ package org.bukkit.entity;
|
|||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
|
@ -552,15 +553,25 @@ 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.
|
||||
* Send an equipment change for the target entity. This will not
|
||||
* actually change the entity's equipment 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
|
||||
* @param entity the entity whose equipment to change
|
||||
* @param slot the slot to change
|
||||
* @param item the item to which the slot should be changed, or null to set
|
||||
* it to air
|
||||
*/
|
||||
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item);
|
||||
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Send multiple equipment changes for the target entity. This will not
|
||||
* actually change the entity's equipment in any way.
|
||||
*
|
||||
* @param entity the entity whose equipment to change
|
||||
* @param items the slots to change, where the values are the items to which
|
||||
* the slot should be changed. null values will set the slot to air
|
||||
*/
|
||||
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
|
||||
|
||||
/**
|
||||
* Send a sign change. This fakes a sign change packet for a user at
|
||||
|
|
Loading…
Reference in a new issue