Wire up admin chat settings

This commit is contained in:
nossr50 2019-04-11 07:11:25 -07:00
parent b64b8d0f8f
commit 86f62fba0b
2 changed files with 4 additions and 10 deletions

View File

@ -1,12 +1,14 @@
package com.gmail.nossr50.chat; package com.gmail.nossr50.chat;
import com.gmail.nossr50.config.MainConfig;
import com.gmail.nossr50.events.chat.McMMOAdminChatEvent; import com.gmail.nossr50.events.chat.McMMOAdminChatEvent;
import com.gmail.nossr50.mcMMO;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
public class AdminChatManager extends ChatManager { public class AdminChatManager extends ChatManager {
protected AdminChatManager(Plugin plugin) { protected AdminChatManager(Plugin plugin) {
super(plugin, MainConfig.getInstance().getAdminDisplayNames(), MainConfig.getInstance().getAdminChatPrefix()); super(plugin,
mcMMO.getConfigManager().getConfigCommands().isUseDisplayNames(),
mcMMO.getConfigManager().getConfigCommands().getAdminChatPrefix());
} }
@Override @Override

View File

@ -428,14 +428,6 @@ public class MainConfig extends ConfigValidated {
return getBooleanValue(GENERAL, SHOW_PROFILE_LOADED); return getBooleanValue(GENERAL, SHOW_PROFILE_LOADED);
} }
public String getAdminChatPrefix() {
return getStringValue(COMMANDS, ADMINCHAT, CHAT_PREFIX_FORMAT);
}
public boolean getAdminDisplayNames() {
return getBooleanValue(COMMANDS, ADMINCHAT, USE_DISPLAY_NAMES);
}
public boolean getMatchOfflinePlayers() { public boolean getMatchOfflinePlayers() {
return getBooleanValue(COMMANDS, GENERIC, MATCH_OFFLINE_PLAYERS); return getBooleanValue(COMMANDS, GENERIC, MATCH_OFFLINE_PLAYERS);
} }