Add info about player concurrency issues

This commit is contained in:
PiggyPiglet
2026-02-08 23:01:52 +08:00
parent 91b6d615bf
commit c86e51b580

View File

@@ -44,4 +44,17 @@ In such a case, contact the developer of the expansion and inform them about thi
This error is given whenever the expansion cannot be loaded, which often happens due to a missing dependency (required plugin) or because creating an expansion instance failed.
The only thing you can do is to provide the full error so that we can check if the issue is caused by PlaceholderAPI (More unlikely) or by the expansion.
The only thing you can do is to provide the full error so that we can check if the issue is caused by PlaceholderAPI (More unlikely) or by the expansion.
## Some player placeholders aren't working on Hytale
Due to Hytale's concurrency setup and PlaceholderAPI design choices, certain player placeholders require a particular parsing implementation on the dev side. If you're a plugin user and placeholders like %player_health% aren't working, but work fine when using `/papi parse me %player_health%`, chances are the plugin you're using has incorrectly implemented PlaceholderAPI support.
To access certain player data, placeholders need to be parsed in the world thread of the player.
```java
final World world = player.getWorld();
world.execute(() -> {
PlaceholderAPI.setPlaceholders(/* set placeholders here */);
})
```