mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-29 19:41:47 +01:00
Renamed armorItem to equippedItem in EntityEquipEvent
This commit is contained in:
parent
77ef5f7d42
commit
ed010ff110
@ -194,7 +194,7 @@ public class LivingEntity extends Entity implements EquipmentHandler {
|
||||
private ItemStack getEquipmentItem(@NotNull ItemStack itemStack, @NotNull EquipmentSlot slot) {
|
||||
EntityEquipEvent entityEquipEvent = new EntityEquipEvent(this, itemStack, slot);
|
||||
callEvent(EntityEquipEvent.class, entityEquipEvent);
|
||||
return entityEquipEvent.getArmorItem();
|
||||
return entityEquipEvent.getEquippedItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -238,6 +238,6 @@ public class EntityArmorStand extends ObjectEntity implements EquipmentHandler {
|
||||
private ItemStack getEquipmentItem(@NotNull ItemStack itemStack, @NotNull EquipmentSlot slot) {
|
||||
EntityEquipEvent entityEquipEvent = new EntityEquipEvent(this, itemStack, slot);
|
||||
callEvent(EntityEquipEvent.class, entityEquipEvent);
|
||||
return entityEquipEvent.getArmorItem();
|
||||
return entityEquipEvent.getEquippedItem();
|
||||
}
|
||||
}
|
||||
|
@ -9,12 +9,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class EntityEquipEvent extends Event {
|
||||
|
||||
private final Entity entity;
|
||||
private ItemStack armorItem;
|
||||
private ItemStack equippedItem;
|
||||
private final EquipmentSlot slot;
|
||||
|
||||
public EntityEquipEvent(@NotNull Entity entity, @NotNull ItemStack armorItem, @NotNull EquipmentSlot slot) {
|
||||
public EntityEquipEvent(@NotNull Entity entity, @NotNull ItemStack equippedItem, @NotNull EquipmentSlot slot) {
|
||||
this.entity = entity;
|
||||
this.armorItem = armorItem;
|
||||
this.equippedItem = equippedItem;
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
@ -24,12 +24,12 @@ public class EntityEquipEvent extends Event {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ItemStack getArmorItem() {
|
||||
return armorItem;
|
||||
public ItemStack getEquippedItem() {
|
||||
return equippedItem;
|
||||
}
|
||||
|
||||
public void setArmorItem(@NotNull ItemStack armorItem) {
|
||||
this.armorItem = armorItem;
|
||||
public void setEquippedItem(@NotNull ItemStack armorItem) {
|
||||
this.equippedItem = armorItem;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
@ -190,7 +190,7 @@ public class PlayerInventory extends AbstractInventory implements EquipmentHandl
|
||||
EntityEquipEvent entityEquipEvent = new EntityEquipEvent(player, itemStack, equipmentSlot);
|
||||
|
||||
player.callEvent(EntityEquipEvent.class, entityEquipEvent);
|
||||
itemStack = entityEquipEvent.getArmorItem();
|
||||
itemStack = entityEquipEvent.getEquippedItem();
|
||||
}
|
||||
|
||||
this.itemStacks[slot] = itemStack;
|
||||
|
Loading…
Reference in New Issue
Block a user