mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 04:17:44 +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
@ -2,6 +2,7 @@ package org.bukkit.entity;
|
|||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -552,15 +553,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|||||||
public void sendBlockDamage(@NotNull Location loc, float progress);
|
public void sendBlockDamage(@NotNull Location loc, float progress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send the equipment change of an entity. This fakes the equipment change
|
* Send an equipment change for the target entity. This will not
|
||||||
* of an entity for a user. This will not actually change the inventory of
|
* actually change the entity's equipment in any way.
|
||||||
* the specified entity in any way.
|
|
||||||
*
|
*
|
||||||
* @param entity The entity that the player will see the change for
|
* @param entity the entity whose equipment to change
|
||||||
* @param slot The slot of the spoofed equipment change
|
* @param slot the slot to change
|
||||||
* @param item The ItemStack to display for the player
|
* @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
|
* Send a sign change. This fakes a sign change packet for a user at
|
||||||
|
Loading…
Reference in New Issue
Block a user