1
mirror of https://github.com/CarmJos/ScriptItems synced 2024-09-19 21:35:50 +00:00

测试权限读取

This commit is contained in:
Carm Jos 2022-03-12 04:48:00 +08:00
parent 8104c62e01
commit c0c32fbb23
2 changed files with 5 additions and 4 deletions

View File

@ -41,6 +41,9 @@ public class ItemSettings {
this.defaultActions = defaultActions; this.defaultActions = defaultActions;
this.permissions = permissions; this.permissions = permissions;
this.actions = actions; this.actions = actions;
permissions.forEach((key, value) -> Main.debugging(" Permission: " + key + " = " + value));
} }
public @NotNull String getIdentifier() { public @NotNull String getIdentifier() {

View File

@ -50,9 +50,8 @@ public class ItemsManager {
String[] filesList = prefixDataFolder.list(); String[] filesList = prefixDataFolder.list();
if (filesList == null || filesList.length < 1) { if (filesList == null || filesList.length < 1) {
Main.severe("配置文件夹中暂无任何物品,请检查。"); Main.severe(" 配置文件夹中暂无任何物品,请检查。");
Main.severe("There's no configured items."); Main.severe(" There's no configured items.");
Main.severe("Path: " + prefixDataFolder.getAbsolutePath());
return; return;
} }
@ -70,7 +69,6 @@ public class ItemsManager {
try { try {
ItemSettings item = ItemSettings.load(file); ItemSettings item = ItemSettings.load(file);
Main.info(" 完成物品加载 [#" + item.getIdentifier() + "] " + item.getName() + " (" + fileName + ")"); Main.info(" 完成物品加载 [#" + item.getIdentifier() + "] " + item.getName() + " (" + fileName + ")");
Main.info(" Successfully loaded [#" + item.getIdentifier() + "] " + item.getName() + " (" + fileName + ")");
dataItems.put(item.getIdentifier(), item); dataItems.put(item.getIdentifier(), item);
} catch (Exception ex) { } catch (Exception ex) {
Main.severe("在加载物品 " + file.getAbsolutePath() + " 时出错,请检查配置!"); Main.severe("在加载物品 " + file.getAbsolutePath() + " 时出错,请检查配置!");