Clear old equip packet
This commit is contained in:
parent
a09a86062f
commit
8c2a5eeb00
@ -40,12 +40,13 @@ public class PacketHandlerEquipment implements IPacketHandler {
|
|||||||
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer,
|
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer,
|
||||||
Entity entity) {
|
Entity entity) {
|
||||||
if (packetsHandler.isCancelMeta(disguise, observer)) {
|
if (packetsHandler.isCancelMeta(disguise, observer)) {
|
||||||
|
packets.clear();
|
||||||
|
|
||||||
PacketContainer equipPacket = sentPacket.shallowClone();
|
PacketContainer equipPacket = sentPacket.shallowClone();
|
||||||
|
|
||||||
packets.addPacket(equipPacket);
|
packets.addPacket(equipPacket);
|
||||||
|
|
||||||
equipPacket.getModifier()
|
equipPacket.getModifier().write(2, ReflectionManager.getNmsItem(new ItemStack(Material.AIR)));
|
||||||
.write(2, ReflectionManager.getNmsItem(new ItemStack(Material.AIR)));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user