Skip to content

Commit

Permalink
fix mirror handler, fixes #2087
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 7, 2019
1 parent 2bf1641 commit 1a4bacc
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -142,7 +142,8 @@ public void sendPacket(Packet<?> packet, GenericFutureListener<? extends Future<
}
if (processAttachToForPacket(packet)
|| processHiddenEntitiesForPacket(packet)
|| processPacketHandlerForPacket(packet)) {
|| processPacketHandlerForPacket(packet)
|| processMirrorForPacket(packet)) {
return;
}
processMirrorForPacket(packet);
Expand Down Expand Up @@ -326,14 +327,15 @@ public void processFakePlayerSpawn(Entity entity) {
}
}

public void processMirrorForPacket(Packet<?> packet) {
public boolean processMirrorForPacket(Packet<?> packet) {
if (packet instanceof PacketPlayOutPlayerInfo) {
PacketPlayOutPlayerInfo playerInfo = (PacketPlayOutPlayerInfo) packet;
if (ProfileEditorImpl.handleMirrorProfiles(playerInfo, this)) {
ProfileEditorImpl.updatePlayerProfiles(playerInfo);
oldManager.sendPacket(playerInfo);
if (!ProfileEditorImpl.handleMirrorProfiles(playerInfo, this)) {
return true;
}
ProfileEditorImpl.updatePlayerProfiles(playerInfo);
}
return false;
}

public boolean processPacketHandlerForPacket(Packet<?> packet) {
Expand Down

0 comments on commit 1a4bacc

Please sign in to comment.