1
0
mirror of https://github.com/Suiranoil/SkinRestorer.git synced 2026-01-16 04:42:12 +00:00

add function to send effects for backporting

This commit is contained in:
2024-07-03 01:48:13 +03:00
parent 21c98a4224
commit f98808583d

View File

@@ -91,6 +91,12 @@ public final class PlayerUtils {
}
}
public static void sendActivePlayerEffects(ServerPlayer player) {
for (var effect : player.getActiveEffects()) {
player.connection.send(new ClientboundUpdateMobEffectPacket(player.getId(), effect, false));
}
}
public static Property getPlayerSkin(GameProfile profile) {
return profile.getProperties().get(TEXTURES_KEY).stream().findFirst().orElse(null);
}