mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-19 14:59:20 +00:00
Fixed a bug where linked accounts would get their Bedrock skin
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
|
||||
package org.geysermc.floodgate.util;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import com.velocitypowered.api.util.GameProfile.Property;
|
||||
import java.util.ArrayList;
|
||||
@@ -33,20 +32,17 @@ import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.geysermc.floodgate.api.player.FloodgatePlayer;
|
||||
import org.geysermc.floodgate.skin.SkinApplier;
|
||||
import org.geysermc.floodgate.skin.SkinData;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class VelocitySkinApplier implements SkinApplier {
|
||||
private final ProxyServer server;
|
||||
|
||||
@Override
|
||||
public void applySkin(FloodgatePlayer floodgatePlayer, JsonObject skinResult) {
|
||||
public void applySkin(FloodgatePlayer floodgatePlayer, SkinData skinData) {
|
||||
server.getPlayer(floodgatePlayer.getCorrectUniqueId()).ifPresent(player -> {
|
||||
List<Property> properties = new ArrayList<>(player.getGameProfileProperties());
|
||||
properties.add(new Property(
|
||||
"textures",
|
||||
skinResult.get("value").getAsString(),
|
||||
skinResult.get("signature").getAsString()
|
||||
));
|
||||
properties.add(new Property("textures", skinData.getValue(), skinData.getSignature()));
|
||||
player.setGameProfileProperties(properties);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user