Class Tool
java.lang.Object
com.github.theword.queqiao.tool.utils.Tool
工具类
持有全局静态对象与公共工具方法,例如日志、配置、WebSocket 管理等。
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDEBUG模式 用于输出更多内容static voidDEBUG模式 用于输出更多内容static com.google.gson.JsonObjectDeprecated.static StringisIgnoredCommand(String command) 判断是否为需要忽略的命令static StringisRegisterOrLoginCommand(String command) Deprecated.0.4.2,请使用isIgnoredCommand(String)代替
-
Constructor Details
-
Tool
public Tool()
-
-
Method Details
-
isRegisterOrLoginCommand
Deprecated.0.4.2,请使用isIgnoredCommand(String)代替判断是否为注册或登录命令- Parameters:
command- 命令- Returns:
- 是否为注册或登录命令,如果是,返回空字符串
-
isIgnoredCommand
判断是否为需要忽略的命令- Parameters:
command- 命令- Returns:
- 如果是,返回空字符串,否则返回原命令
- Since:
- 0.4.2
-
debugLog
DEBUG模式 用于输出更多内容- Parameters:
message- 消息
-
debugLog
DEBUG模式 用于输出更多内容- Parameters:
format- 格式args- 参数
-
getPrefixComponent
public static com.google.gson.JsonObject getPrefixComponent()Deprecated.0.4.2,请使用GlobalContext.getMessagePrefixJsonObject()代替获取发送消息的前缀字符可通过配置文件自定义
默认为:[鹊桥]
- Returns:
- 前缀
-
GlobalContext.getMessagePrefixJsonObject()代替