Placeholders: addons should be able to register placeholders "on the behalf" of a gamemode #1071
Labels
Status: Pending
Waiting for a developer to start working on this issue.
Type: Enhancement
Improvement or modification which is usually a new feature.
Description
Is your feature request related to a problem?
Currently, addons register their placeholders "on their behalf". That means that placeholders from e.g. the Levels addon are prefixed with the addon's capitalized name
%Level_[...]%
. While this is okay with most addons, addons that have a bigger name (e.g. MagicCobblestoneGenerator) just turns this is into a stupid design issue.Describe the solution you'd like us to implement.
These methods should be added in the PlaceholdersManager:
#registerPlaceholder(Addon, GameModeAddon, String, PlaceholderReplacer)
#unregisterPlaceholder(Addon, GameModeAddon, String)
We indeed need to provide the addon's instance nonetheless, so that we can keep track of which addon registered which placeholder.
This will require a slight adaptation in the code of the PAPI and MVdWPAPI hooks.
Describe alternatives you've considered.
None.
Additional context
None.
The text was updated successfully, but these errors were encountered: