Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholders: addons should be able to register placeholders "on the behalf" of a gamemode #1071

Open
Poslovitch opened this issue Dec 15, 2019 · 1 comment
Labels
Status: Pending Waiting for a developer to start working on this issue. Type: Enhancement Improvement or modification which is usually a new feature.

Comments

@Poslovitch
Copy link
Member

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.

@Poslovitch Poslovitch added Type: Enhancement Improvement or modification which is usually a new feature. Status: Pending Waiting for a developer to start working on this issue. labels Dec 15, 2019
@Poslovitch
Copy link
Member Author

This mostly relates to BentoBoxWorld/MagicCobblestoneGenerator#30.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Waiting for a developer to start working on this issue. Type: Enhancement Improvement or modification which is usually a new feature.
Projects
Development

No branches or pull requests

1 participant