Skip to content

Suggestion: /papi parse null #798

@mcmonkey4eva

Description

@mcmonkey4eva

Confirmation

  • I checked the Issues and Pull request tab for any existing issues or PRs.
  • My Feature Request is for PlaceholderAPI and not any expansion or other plugin.

Type

New API feature

Description

There's currently a /papi parse me %someplaceholder%, alongside /papi parse (playername) %someplaceholder%
I suggest the addition of /papi parse null %someplaceholder% (or some other syntax to the same effect).
This would explicitly pass null as the player value to the placeholder, allowing the testing of placeholders in a global context.

This would help a lot when dealing with issues relating to placeholders that don't function when the player is missing.

In particular the main reason I want this myself is that I run support for the Citizens plugin, which often parses placeholders (for things like NPC names and skins) that apply in a global context, with a null player (these parts don't function on a per-player basis).
We occasionally get issue reports of placeholders 'just not working' on NPCs, and having a built-in command to parse explicitly with a null player would allow us to instantly distinguish something wrong on Citizens' end vs something wrong in the placeholder's code (there's a bunch of global placeholders out there that mistakenly return null when the player is null, despite not needing a player reference).

Code Example

No response

Jar file

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions