fix: 修复已知问题
This commit is contained in:
@@ -5,7 +5,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "cn.hamster3.mc.plugin"
|
group = "cn.hamster3.mc.plugin"
|
||||||
version = "3.1.0"
|
version = "3.1.1"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://maven.airgame.net/maven-public/")
|
maven("https://maven.airgame.net/maven-public/")
|
||||||
|
@@ -52,19 +52,6 @@ public class CurrencyPlugin extends JavaPlugin {
|
|||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
|
|
||||||
logger.info("检测到 Vault 已安装");
|
|
||||||
Bukkit.getServicesManager().register(Economy.class, VaultEconomyHook.INSTANCE, this, ServicePriority.Normal);
|
|
||||||
CurrencyType type = CurrencyDataManager.getVaultCurrencyType();
|
|
||||||
if (type != null) {
|
|
||||||
logger.info(String.format("已挂载货币类型 %s(%s) 至 Vault 系统", type.getId(), type.getName()));
|
|
||||||
} else {
|
|
||||||
logger.warning("已挂接 Vault 系统,但未找到 Vault 货币类型,请检查配置文件或创建货币类型: " + CurrencyConfigManager.getVaultCurrencyID());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logger.info("未找到 Vault 插件! 取消注册 Vault 经济系统");
|
|
||||||
}
|
|
||||||
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
||||||
logger.info("检测到 PlaceholderAPI 已安装");
|
logger.info("检测到 PlaceholderAPI 已安装");
|
||||||
if (PlaceholderHook.INSTANCE.register()) {
|
if (PlaceholderHook.INSTANCE.register()) {
|
||||||
@@ -87,6 +74,18 @@ public class CurrencyPlugin extends JavaPlugin {
|
|||||||
Bukkit.getPluginManager().registerEvents(CurrencyListener.INSTANCE, this);
|
Bukkit.getPluginManager().registerEvents(CurrencyListener.INSTANCE, this);
|
||||||
logger.info("已注册 CurrencyListener");
|
logger.info("已注册 CurrencyListener");
|
||||||
ParentCurrencyCommand.INSTANCE.register();
|
ParentCurrencyCommand.INSTANCE.register();
|
||||||
|
if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
|
||||||
|
logger.info("检测到 Vault 已安装");
|
||||||
|
Bukkit.getServicesManager().register(Economy.class, VaultEconomyHook.INSTANCE, this, ServicePriority.Normal);
|
||||||
|
CurrencyType type = CurrencyDataManager.getVaultCurrencyType();
|
||||||
|
if (type != null) {
|
||||||
|
logger.info(String.format("已挂载货币类型 %s(%s) 至 Vault 系统", type.getId(), type.getName()));
|
||||||
|
} else {
|
||||||
|
logger.warning("已挂接 Vault 系统,但未找到 Vault 货币类型,请检查配置文件或创建货币类型: " + CurrencyConfigManager.getVaultCurrencyID());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
logger.info("未找到 Vault 插件! 取消注册 Vault 经济系统");
|
||||||
|
}
|
||||||
long time = System.currentTimeMillis() - start;
|
long time = System.currentTimeMillis() - start;
|
||||||
logger.info("仓鼠经济启动完成,总计耗时 " + time + " ms");
|
logger.info("仓鼠经济启动完成,总计耗时 " + time + " ms");
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ public class CurrencyCreateCommand extends ChildCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||||
if (args.length < 4) {
|
if (args.length < 3) {
|
||||||
ParentCurrencyCommand.INSTANCE.sendHelp(sender);
|
ParentCurrencyCommand.INSTANCE.sendHelp(sender);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
# VaultAPI 相关配置
|
# VaultAPI 相关配置
|
||||||
vault-settings:
|
vault-settings:
|
||||||
|
# 与 VaultAPI 挂接的货币 ID
|
||||||
|
currency-id: money
|
||||||
# Vault 显示货币名称(单数)
|
# Vault 显示货币名称(单数)
|
||||||
currency-name-singular: 金币
|
currency-name-singular: 金币
|
||||||
# Vault 显示货币名称(复数)
|
# Vault 显示货币名称(复数)
|
||||||
|
@@ -6,7 +6,7 @@ load: STARTUP
|
|||||||
|
|
||||||
author: MiniDay
|
author: MiniDay
|
||||||
description: 叁只仓鼠的跨服多货币经济插件
|
description: 叁只仓鼠的跨服多货币经济插件
|
||||||
website: https://github.com/MiniDay/hamster-currency
|
website: https://git.airgame.net/MiniDay/hamster-currency/
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
- HamsterCore
|
- HamsterCore
|
||||||
@@ -20,17 +20,6 @@ softdepend:
|
|||||||
commands:
|
commands:
|
||||||
hamster-currency:
|
hamster-currency:
|
||||||
aliases: [ hcurrency, currency ]
|
aliases: [ hcurrency, currency ]
|
||||||
balance:
|
|
||||||
aliases: [ bal, seemoney ]
|
|
||||||
permission: hamster.currency.see
|
|
||||||
balance-top:
|
|
||||||
aliases: [ balancetop, baltop ]
|
|
||||||
permission: hamster.currency.top
|
|
||||||
pay-money:
|
|
||||||
aliases: [ paymoney, pay ]
|
|
||||||
economy:
|
|
||||||
aliases: [ eco, money ]
|
|
||||||
permission: hamster.currency.see
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
hamster.currency.admin:
|
hamster.currency.admin:
|
||||||
|
Reference in New Issue
Block a user