X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FProfileAccessor.java;h=ce29caabb46d0e88b999c589acf238b42b5b346a;hb=e4daf856661958be1f88f0d3861823df91c78b1e;hp=30c0a526b04dc90f24ece038b4546e9ebacdb2f2;hpb=6e9a43ccd93ae125720547c0fe421dc81a54ba90;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..ce29caa 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 (!currentSone.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; }