Nameless
Nameless copied to clipboard
Allow MC avatars to use UUID or Username
Adding to 2.1.0 since this will require panel templates to update
For offline-mode servers, providers like Cravatar only work by using their username. If we add an option to avatar settings such as "Use" and then they can select "Username" or "UUID" (default), this will let people who use offline-mode still have accurate profile photos. 🏴☠️
The staff module seems to hard code mc-heads and username which works for offline-mode sites. We currently default to UUID (and only use username if they don't have a uuid set).
Code to edit: https://github.com/NamelessMC/Nameless/blob/4716099bfeab90a5b889cfbb4d5544dfe19dd3a7/core/classes/Avatars/AvatarSource.php#L73-L81
& also rename getAvatarFromUuid to getAvatarFromIdentifier?
This will also need changes to other places in our code so that things are more consistent (if they are an offline-mode server and use mc-heads, it will work on forum posts but not leaderboard for example)

Remember to add username skin fetching feature.
Also consider status page avatars which come from JS: https://github.com/NamelessMC/Nameless/blob/f01f8b3dbe80f4e97ad5820ecaeac9c730b989c8/custom/templates/DefaultRevamp/js/core/pages.js#L36