ronaldburns / PlaceholderAPI

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

Relational parameters incorrectly selected when both are available for a token #50

Closed dualspiral closed 6 years ago

dualspiral commented 6 years ago

SpongeAPI version: 7

PlaceholderAPI version: 4.4

Plugins installed: Nucleus 1.2.2, Nucleus Gluon 1.0.4 snapshot

Error log [if any]: (please use PasteBin or similar services to shorten error logs)

None - exception is swallowed in PAPI.

Description:

See https://github.com/NucleusPowered/Gluon/issues/2#issuecomment-359254637. API method parse will always select the relational placeholder if both options are available, causing problems with the %player(_*)% placeholders

Steps to reproduce:

Use parse("player", Player, Player) to parse a player token. It will fail with a no such value exception, return null and return no text. This is because the relational placeholder failed - the non-relational one should be selected as a fallback at the very least.

Wundero commented 6 years ago

Found that the issue was with inconsistent parsing in the service itself. Will be fixed in the next version.