X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FProfileAccessor.java;h=eb280e1810fc91e7d92efc601de749b9a377a3a5;hb=df37c71a5b53af746f2c0c8b7ce8c1d4ae33486f;hp=30c0a526b04dc90f24ece038b4546e9ebacdb2f2;hpb=6f019de1d4d9742981d851ac3c9097cca8bff58e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java b/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java index 30c0a52..eb280e1 100644 --- a/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java @@ -65,7 +65,7 @@ public class ProfileAccessor extends ReflectionAccessor { if (avatarId == null) { return null; } - if (core.getImage(avatarId, false) == null) { + if (!profile.getSone().getImageByInternalId(avatarId).isPresent()) { /* avatar ID but no matching image? show nothing. */ return null; } @@ -74,7 +74,7 @@ public class ProfileAccessor extends ReflectionAccessor { /* always show your own avatars. */ return avatarId; } - ShowCustomAvatars showCustomAvatars = currentSone.getOptions(). getEnumOption("ShowCustomAvatars").get(); + ShowCustomAvatars showCustomAvatars = currentSone.getOptions().getShowCustomAvatars(); if (showCustomAvatars == ShowCustomAvatars.NEVER) { return null; }