cn.handyplus.lib.constants.BaseConstants Maven / Gradle / Ivy
The newest version!
package cn.handyplus.lib.constants;
import org.bukkit.configuration.file.FileConfiguration;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
/**
* 常量池
*
* @author handy
*/
public abstract class BaseConstants {
private BaseConstants() {
}
/**
* 数字正则(判断一个字符串是否表示一个整数、小数或科学计数法表示的数值)
*/
public final static Pattern BIG_DECIMAL_NUMERIC = Pattern.compile("-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?");
/**
* rgb变量正则
*/
public final static Pattern RPG_PATTERN = Pattern.compile("([0-9a-fA-F]){6}|([0-9a-fA-F]){3}|§#([0-9a-fA-F]){6}|§#([0-9a-fA-F]){3}");
/**
* 下划线转驼峰正则
*/
public final static Pattern LINE_PATTERN = Pattern.compile("_(\\w)");
/**
* 驼峰转下划线正则
*/
public final static Pattern HUMP_PATTERN = Pattern.compile("[A-Z]");
/**
* 模版表达式正则
* 提取字符串中被 ${} 包含的内容
*
* @since 3.7.0
*/
public final static Pattern TEMPLATE_EXPRESSION_REGEX = Pattern.compile("\\$\\{(.*?)}");
/**
* 模版表达式正则替换符
*
* @since 3.7.0
*/
public final static String TEMPLATE_EXPRESSION_VALUE = "TEMPLATE_EXPRESSION_VALUE";
/**
* true
*/
public final static String TRUE = "true";
/**
* false
*/
public final static String FALSE = "false";
/**
* 高度
*/
public final static double HEIGHT_254 = 254.0D;
/**
* 高度
*/
public final static double HEIGHT_319 = 319.0D;
/**
* 高度
*/
public final static Integer HEIGHT_255 = 255;
/**
* 存储类型
*/
public final static String STORAGE_METHOD = "storage-method";
/**
* 是否检查更新
*/
public final static String IS_CHECK_UPDATE = "isCheckUpdate";
/**
* 是否检查更新
*/
public final static String IS_CHECK_UPDATE_TO_OP_MSG = "isCheckUpdateToOpMsg";
/**
* 经济插件
*/
public final static String VAULT = "Vault";
/**
* 变量插件
*/
public final static String PLACEHOLDER_API = "PlaceholderAPI";
/**
* 点券插件
*/
public final static String PLAYER_POINTS = "PlayerPoints";
/**
* 怪物插件
*/
public final static String MYTHIC_MOBS = "MythicMobs";
/**
* 公民插件
*/
public final static String CITIZENS = "Citizens";
/**
* gui初始化大小
*/
public final static int GUI_SIZE_54 = 54;
/**
* gui初始化大小
*/
public final static int GUI_SIZE_27 = 27;
/**
* 点
*
* @since 3.8.0
*/
public final static String POINT = ".";
/**
* class
*/
public final static String CLASS = "class";
public final static String URL_1_13 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.13.json";
public final static String URL_1_14 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.14.json";
public final static String URL_1_15 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.15.json";
public final static String URL_1_16 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.16.json";
public final static String URL_1_17 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.17.json";
public final static String URL_1_18 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.18.json";
public final static String URL_1_19 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.19.json";
public final static String URL_1_20 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.20.json";
public final static String URL_1_21 = "https://ricedoc.handyplus.cn/i18n/zh_cn/1.21.json";
public final static String VERSION_URL = "https://ricedoc.handyplus.cn/version.json";
/**
* 物品汉化map
*/
public static Map JSON_CACHE_MAP = new HashMap<>();
/**
* 自定义物品汉化map
*/
public static Map ITEM_JSON_CACHE_MAP = new HashMap<>();
/**
* 云汉化map
*/
public static Map CLOUD_ITEM_JSON_CACHE_MAP = new HashMap<>();
/**
* 配置
*
* @since 3.7.9
*/
public static FileConfiguration CONFIG;
/**
* 语言文件配置
*/
public static FileConfiguration LANG_CONFIG;
/**
* 存储配置
*/
public static FileConfiguration STORAGE_CONFIG;
/**
* 是否开启debug
*/
public static boolean DEBUG = false;
/**
* 云汉化
*
* @since 3.10.4
*/
public static boolean IS_CLOUD_ITEM = true;
/**
* 版本号
*/
public static String VERSION = "version";
/**
* 当前版本
*
* @since 3.4.3
*/
public static VersionCheckEnum VERSION_CHECK_ENUM;
/**
* 当前版本ID
*
* @since 3.4.3
*/
public static Integer VERSION_ID;
/**
* BungeeCord 通用渠道名
*
* @since 3.5.3
*/
public final static String BUNGEE_CORD_CHANNEL = "BungeeCord";
public static String URL = "https://admin.ljxmc.top";
public final static String CLOUD_GET_URL = BaseConstants.URL + "/api/public/getItemName";
public final static String CLOUD_SET_URL = BaseConstants.URL + "/api/public/setItemName";
public final static String IP_CHINA_URL = BaseConstants.URL + "/api/public/getIp";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy