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

use Iterables.getFirst instead of Stream API in PlayerUtils.getPlayerSkin

This commit is contained in:
2024-08-28 22:58:19 +03:00
parent 3492f82214
commit 182f0c4497

View File

@@ -1,5 +1,6 @@
package net.lionarius.skinrestorer.util;
import com.google.common.collect.Iterables;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.mojang.authlib.GameProfile;
@@ -96,7 +97,7 @@ public final class PlayerUtils {
}
public static Property getPlayerSkin(GameProfile profile) {
return profile.getProperties().get(TEXTURES_KEY).stream().findFirst().orElse(null);
return Iterables.getFirst(profile.getProperties().get(TEXTURES_KEY), null);
}
public static void applyRestoredSkin(GameProfile profile, Property skin) {