Merge pull request #3602 from JLyne/skin-uuid

Add %uuid% for player UUIDs in skin-url
This commit is contained in:
mikeprimm 2022-01-10 10:56:50 -06:00 committed by GitHub
commit 14760efefa
15 changed files with 18 additions and 15 deletions

View file

@ -108,10 +108,12 @@ public class PlayerFaces {
private class LoadPlayerImages implements Runnable { private class LoadPlayerImages implements Runnable {
private SkinUrlProvider mSkinUrlProvider; private SkinUrlProvider mSkinUrlProvider;
public final String playername; public final String playername;
public final UUID playeruuid;
public final String playerskinurl; public final String playerskinurl;
public LoadPlayerImages(String playername, String playerskinurl, UUID playeruuid, SkinUrlProvider skinUrlProvider) { public LoadPlayerImages(String playername, String playerskinurl, UUID playeruuid, SkinUrlProvider skinUrlProvider) {
this.playername = playername; this.playername = playername;
this.playeruuid = playeruuid;
this.playerskinurl = playerskinurl; this.playerskinurl = playerskinurl;
mSkinUrlProvider = skinUrlProvider; mSkinUrlProvider = skinUrlProvider;
} }
@ -131,7 +133,8 @@ public class PlayerFaces {
if (mSkinUrlProvider == null) { if (mSkinUrlProvider == null) {
if (!skinurl.equals("")) { if (!skinurl.equals("")) {
url = new URL(skinurl.replace("%player%", URLEncoder.encode(playername, "UTF-8"))); url = new URL(skinurl.replace("%player%", URLEncoder.encode(playername, "UTF-8"))
.replace("%uuid%", playeruuid.toString()));
} else if (playerskinurl != null) { } else if (playerskinurl != null) {
url = new URL(playerskinurl); url = new URL(playerskinurl);
} }

View file

@ -280,7 +280,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -280,7 +280,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -288,7 +288,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south) # Control behavior for new (1.0+) compass orientation (sunrise moved 90 degrees: east is now what used to be south)

View file

@ -289,7 +289,7 @@ custom-colors-support: true
# Control updating of player faces, once loaded (if faces are being managed by other apps or manually) # Control updating of player faces, once loaded (if faces are being managed by other apps or manually)
#refreshskins: false #refreshskins: false
# Customize URL used for fetching player skins (%player% is macro for name) # Customize URL used for fetching player skins (%player% is macro for name, %uuid% for UUID)
skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png" skin-url: "http://skins.minecraft.net/MinecraftSkins/%player%.png"
# Enable skins via SkinsRestorer plugin instead of internal legacy implementation (disabled by default) # Enable skins via SkinsRestorer plugin instead of internal legacy implementation (disabled by default)