This commit is contained in:
Xujiayao 2026-01-13 16:17:24 +08:00
parent d6d0307ea0
commit 2eb5b97706
3 changed files with 4 additions and 8 deletions

View file

@ -11,8 +11,6 @@ import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import static com.xujiayao.discord_mc_chat.Constants.LOGGER;
/**
* Central registry and dispatcher for DMCC commands.
*

View file

@ -1,9 +1,7 @@
package com.xujiayao.discord_mc_chat.commands.impl;
import com.xujiayao.discord_mc_chat.DMCC;
import com.xujiayao.discord_mc_chat.commands.Command;
import com.xujiayao.discord_mc_chat.commands.CommandSender;
import com.xujiayao.discord_mc_chat.standalone.StandaloneDMCC;
import com.xujiayao.discord_mc_chat.utils.i18n.I18nManager;
/**

View file

@ -150,12 +150,12 @@ public class ConfigManager {
/**
* Gets a configuration value as a string, with a default value if not found.
*
* @param path The path to the configuration value
* @param path The path to the configuration value
* @param defaultValue The default value to return if the path is not found
* @return The string value at the specified path, or null if not found
*/
public static String getString(String path, String defaultValue) {
String value = getValue(path, JsonNode::asText);
String value = getValue(path, JsonNode::asText);
return value == null ? defaultValue : value;
}
@ -172,12 +172,12 @@ public class ConfigManager {
/**
* Gets a configuration value as an integer, with a default value if not found.
*
* @param path The path to the configuration value
* @param path The path to the configuration value
* @param defaultValue The default value to return if the path is not found
* @return The integer value at the specified path
*/
public static Integer getInt(String path, int defaultValue) {
Integer value = getValue(path, JsonNode::asInt);
Integer value = getValue(path, JsonNode::asInt);
return value == null ? defaultValue : value;
}