Direct answer
Leaf’s documented 1.21.1 async entity tracker has a compat-mode flag. The maintainers specifically mention Citizens or other plugins creating real player-type NPC entities: those NPCs can otherwise become invisible under asynchronous tracking.
How to check it
- Check whether async-entity-tracker is enabled; compat-mode is relevant only in that context.
- Reproduce NPC disappearing/reappearing with the exact NPC plugin and Leaf version, including fresh joins and player movement.
- Distinguish server-backed player-type NPCs from purely packet-based or virtual NPCs before changing anything.
What to change
If the version’s config supports it and real player-type NPCs are affected, test enabling compat-mode:
async:
async-entity-tracker:
enabled: true
compat-mode: trueIf that does not resolve the problem, disable asynchronous tracking for diagnosis and report the exact versions/logs to the maintainers instead of stacking unrelated optimizations.
Leaf recommends enabling this compatibility mode only when real/player-type NPC plugins need it. The instructions are based on the older 1.21.1 configuration reference.
Software and version notes
The cited Leaf global config page explicitly describes the 1.21.1 branch; newer Leaf builds may have different keys, defaults or feature support. Verify config/leaf-global.yml generated by your actual server.
Verify the result
Reload the test environment with affected NPCs, verify visibility for multiple players and confirm tracking performance has not regressed beyond acceptable limits.