1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-19 14:59:20 +00:00

Always change the GameProfile for Floodgate players in Velocity

This commit is contained in:
Tim203
2022-03-09 13:35:56 +01:00
parent 4f9ce6f770
commit 7a9642ef6a

View File

@@ -143,14 +143,17 @@ public final class VelocityListener {
FloodgatePlayer player = playerCache.getIfPresent(event.getConnection());
if (player != null) {
playerCache.invalidate(event.getConnection());
GameProfile profile = new GameProfile(
player.getCorrectUniqueId(),
player.getCorrectUsername(),
Collections.emptyList()
);
// The texture properties addition is to fix the February 2 2022 Mojang authentication changes
if (!config.isSendFloodgateData() && !player.isLinked()) {
event.setGameProfile(new GameProfile(
player.getCorrectUniqueId(),
player.getCorrectUsername(),
Collections.singletonList(new Property("textures", "", ""))
));
profile = profile.addProperty(new Property("textures", "", ""));
}
event.setGameProfile(profile);
}
}