Admin Chat config settings

This commit is contained in:
nossr50 2019-04-11 07:09:58 -07:00
parent 1fe4fef75a
commit b64b8d0f8f
2 changed files with 47 additions and 0 deletions

View File

@ -1,7 +1,23 @@
package com.gmail.nossr50.config.hocon.commands;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigCommands {
@Setting(value = "Admin-Chat", comment = "Settings related to the admin chat command and chatting modes.")
private ConfigCommandsAdminChat adminChat = new ConfigCommandsAdminChat();
public ConfigCommandsAdminChat getAdminChat() {
return adminChat;
}
public String getAdminChatPrefix() {
return getAdminChat().getAdminChatPrefix();
}
public boolean isUseDisplayNames() {
return getAdminChat().isUseDisplayNames();
}
}

View File

@ -0,0 +1,31 @@
package com.gmail.nossr50.config.hocon.commands;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigCommandsAdminChat {
private static final String ADMIN_CHAT_PREFIX_DEFAULT = "&b[&f{0}&b]";
private static final boolean USE_DISPLAY_NAMES_DEFAULT = true;
@Setting(value = "Admin-Chat-Prefix", comment = "Formatting use at the beginning of an admin chat message." +
"\nYou can use & color codes here or type stuff like [[RED]]." +
"\nDefault value: "+ADMIN_CHAT_PREFIX_DEFAULT)
private String adminChatPrefix = ADMIN_CHAT_PREFIX_DEFAULT;
@Setting(value = "Whether or not to use Display Names for admin chat." +
"\nDisplay names are the current visible name of a player in the scoreboard, chat, and so on." +
"\nThese names are modified by mods and are not necessarily the same nickname that a player has associated with their account." +
"\nIf you turn this off, mcMMO will use a players registered nickname with their Minecraft account instead." +
"\nDefault value: "+USE_DISPLAY_NAMES_DEFAULT)
public boolean useDisplayNames = USE_DISPLAY_NAMES_DEFAULT;
public String getAdminChatPrefix() {
return adminChatPrefix;
}
public boolean isUseDisplayNames() {
return useDisplayNames;
}
}