Skip to content

Commit

Permalink
Placeholders: Realized that the "uppercase" integration hook for plac…
Browse files Browse the repository at this point in the history
…eholder API is not used.

Realized that placeholder registration is done without sensitivity to the case used.
  • Loading branch information
rbluer committed Sep 13, 2024
1 parent 6411014 commit a0dd244
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/changelog_v3.3.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ These change logs represent the work that has been going on within prison.
# 3.3.0-alpha.19b 2024-09-13


* **Placeholders: Realized that the "uppercase" integration hook for placeholder API is not used.**
Realized that placeholder registration is done without sensitivity to the case used.


* **Custom Placeholders: Created support for custom placeholders that are defined in the config.yml file, and one simple short custom placeholder will be replaced by any combination of text and other placeholders.**
This way you can define complex placeholders within prison, and then use the short custom placeholders in other config files, which will help a lot if you are limited by characters.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class PlaceHolderAPIIntegration
extends PlaceholderIntegration {

private PlaceHolderAPIIntegrationWrapper placeHolderWrapper;
private PlaceHolderAPIIntegrationUppercaseWrapper placeHolderUppercaseWrapper;
// private PlaceHolderAPIIntegrationUppercaseWrapper placeHolderUppercaseWrapper;

public PlaceHolderAPIIntegration() {
super( "PlaceholderAPI", "PlaceholderAPI" );
Expand All @@ -25,8 +25,10 @@ public void integrate() {
this.placeHolderWrapper = new PlaceHolderAPIIntegrationWrapper();
this.placeHolderWrapper.register();

this.placeHolderUppercaseWrapper = new PlaceHolderAPIIntegrationUppercaseWrapper();
this.placeHolderUppercaseWrapper.register();
// NOTE: the registration of the placeholders and their usage is
// case insensitive, so this is not needed:
// this.placeHolderUppercaseWrapper = new PlaceHolderAPIIntegrationUppercaseWrapper();
// this.placeHolderUppercaseWrapper.register();
}
}
catch ( NoClassDefFoundError | IllegalStateException e ) {
Expand Down

0 comments on commit a0dd244

Please sign in to comment.