mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
chore: move custom placeholder replacement to method
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user