Skip to content

Commit

Permalink
Fix global placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
srnyx committed Jan 21, 2023
1 parent 215e1a1 commit 909e96a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public AnnoyingMessage(@NotNull AnnoyingPlugin plugin, @NotNull String key) {
this.plugin = plugin;
this.key = key;
replace("%prefix%", plugin.getMessagesString(plugin.options.prefix));
plugin.globalPlaceholders.forEach(this::replace);
plugin.globalPlaceholders.forEach((placeholder, value) -> replace("%" + placeholder + "%", value));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/resources/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ plugin:
global-placeholders: # It's recommended to keep all the default global placeholders (prefix, p, s, pe, se)
prefix: "&3&lANNOYING &8&l| &b" # Prefix for the plugin, typically used in the beginning of most messages
p: "&b" # Base color for non-error messages
s: "&3" # Used to highlight important parts of non-error messages
s: "&3" # Highlight color for non-error messages
pe: "&c" # Base color for error messages
se: "&4" # Used to highlight important parts of error messages
se: "&4" # Highlight color for error messages

# These are the different splitters for messages/placeholders
splitters:
Expand Down

0 comments on commit 909e96a

Please sign in to comment.