Skip to content

Commit

Permalink
fix(SkinHandler): Fixed SkinHandler_BungeeCord.getGameProfile0
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeV220 committed Apr 3, 2023
1 parent 9201640 commit 9f9c093
Showing 1 changed file with 6 additions and 6 deletions.
@@ -1,5 +1,7 @@
package com.georgev22.skinoverlay.handler.handlers;

import com.georgev22.library.maps.HashObjectMap;
import com.georgev22.library.maps.ObjectMap;
import com.georgev22.library.utilities.UserManager;
import com.georgev22.library.utilities.Utils;
import com.georgev22.skinoverlay.handler.SGameProfile;
Expand Down Expand Up @@ -52,13 +54,11 @@ public void updateSkin(@NotNull PlayerObject playerObject, @NotNull SkinOptions

@Override
public SGameProfile getGameProfile0(@NotNull PlayerObject playerObject) {
SGameProfile gameProfile = new SGameProfileBungee(playerObject.playerName(), playerObject.playerUUID());
if (!gameProfile.getProperties().containsKey("textures")) {
for (Property property : ((InitialHandler) ((ProxiedPlayer) playerObject.player()).getPendingConnection()).getLoginProfile().getProperties()) {
gameProfile.addProperty(property.getName(), new SProperty(property.getName(), property.getValue(), property.getSignature()));
}
ObjectMap<String, SProperty> properties = new HashObjectMap<>();
for (Property property : ((InitialHandler) ((ProxiedPlayer) playerObject.player()).getPendingConnection()).getLoginProfile().getProperties()) {
properties.append(property.getName(), new SProperty(property.getName(), property.getValue(), property.getSignature()));
}
return gameProfile;
return new SGameProfileBungee(playerObject.playerName(), playerObject.playerUUID(), properties);
}

@Override
Expand Down

0 comments on commit 9f9c093

Please sign in to comment.