Add option for offline-mode UUID avatars

This commit is contained in:
ruan 2017-09-08 06:29:33 +02:00
parent 2d8663f27d
commit 531aa2c6d5
No known key found for this signature in database
GPG Key ID: 0D2EC1C52E469C0B
2 changed files with 6 additions and 1 deletions

View File

@ -168,7 +168,9 @@ class Page {
}
if (strlen($uuid) === 36 && $uuid[14] === '3') {
// Avatars cannot be associated with offline mode UUIDs (version 3)
$uuid = $name;
if (!$this->settings->avatar_allow_offline_mode_uuids) {
$uuid = $name;
}
}
$src = str_replace('$NAME', $name, str_replace('$UUID', $uuid, $this->settings->avatar_source));
if (in_array($name, $this->settings->console_aliases) || $name === $this->settings->console_name) {

View File

@ -56,6 +56,9 @@ final class Settings {
// If enabled, names will be shown below avatars instead of being shown next to them.
$this->avatar_names_below = true;
// If enabled, offline-mode UUIDs will be requested from avatar_source instead of player names.
$this->avatar_allow_offline_mode_uuids = false;
// If enabled, the total amount of bans, mutes, warnings, and kicks will be shown next to the buttons in the header.
$this->header_show_totals = true;