chore: move custom placeholder replacement to method

This commit is contained in:
Jason Penilla committed 2023-04-15 18:07:45 -07:00
1 parent 4e5bedfd77
commit 0528e8ef49
4 files changed
+12 -17

No files matched your search

@@ -104,6 +104,15 @@ public class PrimaryConfig {
return this.customPlaceholders;
}
public String applyCustomPlaceholders(final String string) {
String placeholderResolvedMessage = string;
for (final var entry : this.customPlaceholders.entrySet()) {
placeholderResolvedMessage = placeholderResolvedMessage.replace("<" + entry.getKey() + ">",
entry.getValue());
}
return placeholderResolvedMessage;
}
public @Nullable List<String> customChatSuggestions() {
return this.customChatSuggestions;
}