mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Make default format name configurable
This commit is contained in:
1 parent
7e9aae9a9b
commit
b4b5989a23
2 files changed
+7
-1
No files matched your search
@@ -248,10 +248,14 @@ public class CarbonChatChannel extends ChatChannel {
|
||||
|
||||
@Override
|
||||
public String getFormat(String group) {
|
||||
return getFormats().getOrDefault(group, getFormats().getOrDefault("default",
|
||||
return getFormats().getOrDefault(group, getFormats().getOrDefault(getDefaultFormatName(),
|
||||
"<white><%player_displayname%<white>> <message>"));
|
||||
}
|
||||
|
||||
private String getDefaultFormatName() {
|
||||
return getString("default-format-name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isDefault() {
|
||||
return getBoolean("default");
|
||||
|
||||
@@ -47,6 +47,8 @@ default:
|
||||
# If true, plugin will only use the format corresponding to the user's primary group (vault).
|
||||
# If false, plugin will look through the user's groups and go with the first group with a corresponding format.
|
||||
primary-group-only: true
|
||||
# The name of the vault group which should be considered as the default group.
|
||||
default-group: 'default'
|
||||
|
||||
channels:
|
||||
global:
|
||||
|
||||
Reference in new issue
Block a user