java.lang.Object
com.github.theword.queqiao.tool.utils.Tool

public class Tool extends Object
工具类

持有全局静态对象与公共工具方法,例如日志、配置、WebSocket 管理等。

  • Constructor Details

    • Tool

      public Tool()
  • Method Details

    • isRegisterOrLoginCommand

      public static String isRegisterOrLoginCommand(String command)
      判断是否为注册或登录命令
      Parameters:
      command - 命令
      Returns:
      是否为注册或登录命令,如果是,返回空字符串
    • debugLog

      public static void debugLog(String message)
      DEBUG模式 用于输出更多内容
      Parameters:
      message - 消息
    • debugLog

      public static void debugLog(String format, Object... args)
      DEBUG模式 用于输出更多内容
      Parameters:
      format - 格式
      args - 参数
    • getPrefixComponent

      public static com.google.gson.JsonObject getPrefixComponent()
      获取发送消息的前缀字符

      可通过配置文件自定义

      默认为:[鹊桥]

      Returns:
      前缀