Skip to content

Commit

Permalink
Rewrite GameProfile uuids in tablist
Browse files Browse the repository at this point in the history
  • Loading branch information
UserNugget committed May 11, 2024
1 parent 5879eb5 commit 1b18b3d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package net.elytrium.limboapi.injection.packet;

import com.velocitypowered.api.network.ProtocolVersion;
import com.velocitypowered.api.util.GameProfile;
import com.velocitypowered.proxy.connection.MinecraftSessionHandler;
import com.velocitypowered.proxy.connection.backend.BackendPlaySessionHandler;
import com.velocitypowered.proxy.connection.backend.VelocityServerConnection;
Expand Down Expand Up @@ -65,7 +66,11 @@ public boolean handle(MinecraftSessionHandler handler) {
fixedEntry.setGameMode(item.getGameMode());
fixedEntry.setLatency(item.getLatency());
fixedEntry.setDisplayName(item.getDisplayName());
fixedEntry.setProfile(item.getProfile());
if (item.getProfile() != null && item.getProfile().getId().equals(player.getUniqueId())) {
fixedEntry.setProfile(new GameProfile(initialID, item.getProfile().getName(), item.getProfile().getProperties()));
} else {
fixedEntry.setProfile(item.getProfile());
}
fixedEntry.setListed(item.isListed());
fixedEntry.setChatSession(item.getChatSession());

Expand Down

0 comments on commit 1b18b3d

Please sign in to comment.