Fix self disguises for player
This commit is contained in:
parent
2e960f1abf
commit
bf3e81522b
@ -772,10 +772,12 @@ public class PacketsManager {
|
|||||||
packets = new PacketContainer[] { event.getPacket() };
|
packets = new PacketContainer[] { event.getPacket() };
|
||||||
}
|
}
|
||||||
for (PacketContainer packet : packets) {
|
for (PacketContainer packet : packets) {
|
||||||
|
if (packet.getType() != PacketType.Play.Server.PLAYER_INFO) {
|
||||||
if (packet.equals(event.getPacket())) {
|
if (packet.equals(event.getPacket())) {
|
||||||
packet = packet.deepClone();
|
packet = packet.shallowClone();
|
||||||
}
|
}
|
||||||
packet.getIntegers().write(0, DisguiseAPI.getSelfDisguiseId());
|
packet.getIntegers().write(0, DisguiseAPI.getSelfDisguiseId());
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
ProtocolLibrary.getProtocolManager().sendServerPacket(observer, packet, false);
|
ProtocolLibrary.getProtocolManager().sendServerPacket(observer, packet, false);
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException e) {
|
||||||
@ -793,7 +795,7 @@ public class PacketsManager {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}, 2);
|
||||||
}
|
}
|
||||||
if (event.getPacketType() == PacketType.Play.Server.ENTITY_METADATA) {
|
if (event.getPacketType() == PacketType.Play.Server.ENTITY_METADATA) {
|
||||||
event.setPacket(event.getPacket().deepClone());
|
event.setPacket(event.getPacket().deepClone());
|
||||||
|
Loading…
Reference in New Issue
Block a user