From a0dd24482ac9bbaa83857ce8f3dbaac75f78d92b Mon Sep 17 00:00:00 2001 From: rbluer <665978+rbluer@users.noreply.github.com> Date: Fri, 13 Sep 2024 04:54:20 -0400 Subject: [PATCH] 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. --- docs/changelog_v3.3.x.md | 4 ++++ .../spigot/placeholder/PlaceHolderAPIIntegration.java | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/changelog_v3.3.x.md b/docs/changelog_v3.3.x.md index fff352e04..e56a580cd 100644 --- a/docs/changelog_v3.3.x.md +++ b/docs/changelog_v3.3.x.md @@ -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. diff --git a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/placeholder/PlaceHolderAPIIntegration.java b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/placeholder/PlaceHolderAPIIntegration.java index 786643943..e5721e426 100644 --- a/prison-spigot/src/main/java/tech/mcprison/prison/spigot/placeholder/PlaceHolderAPIIntegration.java +++ b/prison-spigot/src/main/java/tech/mcprison/prison/spigot/placeholder/PlaceHolderAPIIntegration.java @@ -11,7 +11,7 @@ public class PlaceHolderAPIIntegration extends PlaceholderIntegration { private PlaceHolderAPIIntegrationWrapper placeHolderWrapper; - private PlaceHolderAPIIntegrationUppercaseWrapper placeHolderUppercaseWrapper; +// private PlaceHolderAPIIntegrationUppercaseWrapper placeHolderUppercaseWrapper; public PlaceHolderAPIIntegration() { super( "PlaceholderAPI", "PlaceholderAPI" ); @@ -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 ) {