diff --git a/src/main/java/com/gmail/nossr50/config/hocon/commands/ConfigCommands.java b/src/main/java/com/gmail/nossr50/config/hocon/commands/ConfigCommands.java index dfe0b64e8..661600d4f 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/commands/ConfigCommands.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/commands/ConfigCommands.java @@ -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(); + } } diff --git a/src/main/java/com/gmail/nossr50/config/hocon/commands/ConfigCommandsAdminChat.java b/src/main/java/com/gmail/nossr50/config/hocon/commands/ConfigCommandsAdminChat.java new file mode 100644 index 000000000..79cb7f584 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/commands/ConfigCommandsAdminChat.java @@ -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; + } +} \ No newline at end of file