-
-
Notifications
You must be signed in to change notification settings - Fork 107
Description
Description of Bug
When using a display item with type: PLAYER_HEAD and owner-username: "%player_name%" inside a menu or GUI (for example, the quests categories page), the head does not correctly display the player’s skin.
Instead, the console shows the following error:
Couldn't find profile with name: %player_name%
com.mojang.authlib.exceptions.MinecraftClientHttpException: Status: 400
This indicates that the placeholder is not being replaced before the item meta is built.
Expected Behavior:
The %player_name% placeholder should resolve to the actual player’s username, so that the menu item displays the correct player head dynamically.
Actual Behavior:
The placeholder string %player_name% is passed literally to the Mojang API, resulting in a failed lookup and a missing skin.
Steps to Reproduce
Steps to Reproduce
Create a menu entry like this:
53:
display:
name: "&a%player_name%'s Info"
type: "PLAYER_HEAD"
owner-username: "%player_name%"
lore:
- "&7Money: &6$%vault_eco_balance_formatted%"
- "&7Active Quests:"
- "&f%quests_started_listid%"
- ""
- "&eClick to view your active quests!"
commands:
- "sudo {player} quests started"
Open the menu in-game.
Observe that the player head does not show the correct skin.
Check the console for the “Couldn't find profile with name: %player_name%” warning.
Environment
- Minecraft version: 1.21.5
- Server software: Paper / Sakura 1.21.5-DEV
- Quests version: 3.15.2-b216e2b
Agreements
- I am running the latest version of Quests
- I am certain this issue is unique and a similar issue is not currently open
- I am using a version of Minecraft which is supported by Quests
Other
It seems %player_name% placeholders are not parsed for skull owner data.
This could be resolved by parsing placeholders before calling setOwningPlayer() or adding a dedicated option such as:
type: PLAYER_HEAD
dynamic-owner: true
to automatically use the current player’s head in GUI displays.
this is not needed if you somehow find a way to make the placeholder parse before the item is generated. DeluxeMenus does this perfectly which is why I am reporting this,
FULL ERROR:
[21:52:43 WARN]: Couldn't find profile with name: %player_name% com.mojang.authlib.exceptions.MinecraftClientHttpException: Status: 400 at com.mojang.authlib.minecraft.client.MinecraftClient.readInputStream(MinecraftClient.java:100) ~[authlib-6.0.58.jar:?] at com.mojang.authlib.minecraft.client.MinecraftClient.get(MinecraftClient.java:56) ~[authlib-6.0.58.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository.findProfileByName(YggdrasilGameProfileRepository.java:116) ~[sakura-1.21.5.jar:?] at net.minecraft.server.players.GameProfileCache.lookupGameProfile(GameProfileCache.java:83) ~[sakura-1.21.5.jar:1.21.5-DEV-f121186] at net.minecraft.server.players.GameProfileCache.get(GameProfileCache.java:147) ~[sakura-1.21.5.jar:1.21.5-DEV-f121186] at net.minecraft.server.players.GameProfileCache.lambda$getAsync$0(GameProfileCache.java:172) ~[sakura-1.21.5.jar:1.21.5-DEV-f121186] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]