1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-12-25 07:08:52 +00:00

fix: 修复加载检测报错

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-10-02 22:50:20 +08:00
parent 5ab86630c7
commit 894fa0e3a6
3 changed files with 3 additions and 6 deletions

View File

@ -19,8 +19,7 @@ public class VaultChat extends VaultBase {
static {
final RegisteredServiceProvider<Chat> rsp = Bukkit.getServer().getServicesManager().getRegistration(Chat.class);
chat = rsp.getProvider();
if (chat == null) {
if (rsp == null || (chat = rsp.getProvider()) == null) {
PKit.disable("已加载 Vault 但是未找到聊天相关插件 停止加载...");
} else {
Log.info("发现 Vault 使用聊天管理系统 " + chat.getName());

View File

@ -20,8 +20,7 @@ public class VaultEconomy extends VaultBase {
static {
final RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
economy = rsp.getProvider();
if (economy == null) {
if (rsp == null || (economy = rsp.getProvider()) == null) {
PKit.disable("已加载 Vault 但是未找到经济相关插件 停止加载...");
} else {
Log.info("发现 Vault 使用经济管理系统 " + economy.getName());

View File

@ -19,8 +19,7 @@ public class VaultPermission extends VaultBase {
static {
final RegisteredServiceProvider<Permission> rsp = Bukkit.getServer().getServicesManager().getRegistration(Permission.class);
permission = rsp.getProvider();
if (permission == null) {
if (rsp == null || (permission = rsp.getProvider()) == null) {
PKit.disable("已加载 Vault 但是未找到权限相关插件 停止加载...");
} else {
Log.info("发现 Vault 使用权限管理系统 " + permission.getName());