mirror of
https://github.com/System-End/Discord-MC-Chat.git
synced 2026-04-20 00:25:18 +00:00
format
This commit is contained in:
parent
d6d0307ea0
commit
2eb5b97706
3 changed files with 4 additions and 8 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue