ronaldburns / PlaceholderAPI

An advanced placeholder hub for the Sponge API
https://ore.spongepowered.org/rojo8399/PlaceholderAPI
MIT License
16 stars 15 forks source link

%player_displayname% has incorrect replacement #64

Closed Foxtrek64 closed 5 years ago

Foxtrek64 commented 5 years ago

Please provide these fields before submitting an issue.

SpongeAPI version: 7.1.0-366290f8 PlaceholderAPI version: 4.5.1

Expected behavior: The replacement %player_displayname% should render as the player's nickname or else fall back to their username if no such name is present.

Actual behavior: As seen in this screenshot, %player_displayname% shows the user's username, despite a nickname being set. image

This issue is made visible through the use of TabManager. Please see the sister issue for more information.

randombyte-developer commented 5 years ago

Where did you set the nickname?

Foxtrek64 commented 5 years ago

@randombyte-developer This was set using the /nick command provided by Nucleus. I've attached a screenshot to show the output of /lp verbose to confirm this. 2019-02-27_15 49 04

randombyte-developer commented 5 years ago

Maybe https://ore.spongepowered.org/dualspiral/Nucleus-Gluon helps?

Foxtrek64 commented 5 years ago

I've installed Gluon, but as I'd expected, I didn't think it would work. Gluon allows you to use PlaceholderAPI replacements in Nucleus and adds Nucleus replacements to PlaceholderAPI. However, I do believe that %player_displayname% gets the display name component from Sponge or perhaps even the underlying Minecraft (forge) server. Nucleus just exposes a command to be able to configure your nickname.

Upon joining the server, chatted to show I have a nickname set and ran the /papi parse command. You can see the output of this below: image

Foxtrek64 commented 5 years ago

So using the placeholder %nucleus_displayname% works, though this has a bit of a design smell imho. I'm following up with the Nucleus team now to find out why they're not passing this data through the %player_displayname% replacement and instead building in their own and having you use a bridge plugin to support it.

I'll go ahead and close this issue for now, since there is a viable work-around.