Skip to content

Commit

Permalink
Precondition
Browse files Browse the repository at this point in the history
  • Loading branch information
voruti committed Dec 1, 2023
1 parent 0df338a commit da6e4c5
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ public abstract class ServerLoginNetworkHandlerMixin {
target = "Lnet/minecraft/server/network/ServerLoginNetworkHandler;startVerify(Lcom/mojang/authlib/GameProfile;)V",
shift = At.Shift.BEFORE))
private void initUuid(LoginHelloC2SPacket packet, CallbackInfo ci) {
// override game profile with saved information:
this.profile = new GameProfile(((BungeeClientConnection) connection).getSpoofedUUID(), this.profile.getName());

if (((BungeeClientConnection) connection).getSpoofedProfile() != null) {
for (Property property : ((BungeeClientConnection) connection).getSpoofedProfile()) {
this.profile.getProperties().put(property.name(), property);
if (this.profile != null) {
// override game profile with saved information:
this.profile = new GameProfile(((BungeeClientConnection) connection).getSpoofedUUID(), this.profile.getName());

if (((BungeeClientConnection) connection).getSpoofedProfile() != null) {
for (Property property : ((BungeeClientConnection) connection).getSpoofedProfile()) {
this.profile.getProperties().put(property.name(), property);
}
}
}
}
Expand Down

0 comments on commit da6e4c5

Please sign in to comment.