mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-04 08:59:47 +01:00
Don't hide Elytra Wings in self disguises
This commit is contained in:
parent
09d4a3b90f
commit
3ae785fb35
@ -62,7 +62,7 @@ public class PacketListenerInventory extends PacketAdapter {
|
||||
|
||||
org.bukkit.inventory.ItemStack item = player.getInventory().getArmorContents()[armorSlot];
|
||||
|
||||
if (item != null && item.getType() != Material.AIR) {
|
||||
if (item != null && item.getType() != Material.AIR && item.getType() != Material.ELYTRA) {
|
||||
PacketContainer packet = new PacketContainer(Server.SET_SLOT);
|
||||
|
||||
StructureModifier<Object> mods = packet.getModifier();
|
||||
@ -185,7 +185,7 @@ public class PacketListenerInventory extends PacketAdapter {
|
||||
clickedItem = player.getItemOnCursor();
|
||||
}
|
||||
|
||||
if (clickedItem != null && clickedItem.getType() != Material.AIR) {
|
||||
if (clickedItem != null && clickedItem.getType() != Material.AIR && clickedItem.getType() != Material.ELYTRA) {
|
||||
// If the slot is a armor slot
|
||||
if (slot >= 5 && slot <= 8) {
|
||||
if (disguise.isHidingArmorFromSelf()) {
|
||||
@ -272,7 +272,7 @@ public class PacketListenerInventory extends PacketAdapter {
|
||||
|
||||
org.bukkit.inventory.ItemStack item = player.getInventory().getArmorContents()[armorSlot];
|
||||
|
||||
if (item != null && item.getType() != Material.AIR) {
|
||||
if (item != null && item.getType() != Material.AIR && item.getType() != Material.ELYTRA) {
|
||||
event.setPacket(event.getPacket().shallowClone());
|
||||
|
||||
event.getPacket().getModifier().write(2,
|
||||
@ -312,7 +312,7 @@ public class PacketListenerInventory extends PacketAdapter {
|
||||
|
||||
ItemStack item = player.getInventory().getArmorContents()[armorSlot];
|
||||
|
||||
if (item != null && item.getType() != Material.AIR) {
|
||||
if (item != null && item.getType() != Material.AIR && item.getType() != Material.ELYTRA) {
|
||||
items.set(slot, new ItemStack(Material.AIR));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user