1
0
mirror of https://e.coding.net/circlecloud/ProtectItem.git synced 2024-12-27 20:48:51 +00:00

fix config desez error...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-10-24 00:05:50 +08:00
parent 2ffd1ac895
commit ed0a16fe85
5 changed files with 9 additions and 6 deletions

View File

@ -16,8 +16,8 @@ public class CommandBan extends BaseCommand {
public CommandBan(final ProtectItem main) {
super("ban");
this.plugin = main;
setOnlyPlayerExecutable();
setPermission("pi.ban");
setOnlyPlayerExecutable();
setDescription("§c封禁手持物品");
setPossibleArguments("<封禁类型>");
}

View File

@ -16,8 +16,8 @@ public class CommandUnban extends BaseCommand {
public CommandUnban(final ProtectItem main) {
super("unban");
this.plugin = main;
setOnlyPlayerExecutable();
setPermission("pi.unban");
setOnlyPlayerExecutable();
setDescription("§a解禁手持物品");
setPossibleArguments("<解禁类型>");
}

View File

@ -19,10 +19,14 @@ public class ItemManager {
public ItemManager(final ProtectItem main) {
plugin = main;
itemconfig = new FileConfig(plugin, "banitems.yml");
try {
itemlist = (HashMap<String, List<ActionType>>) itemconfig.get("banitems");
if (itemlist == null) {
itemlist = new HashMap<String, List<ActionType>>();
}
} catch (final Exception e) {
itemlist = new HashMap<String, List<ActionType>>();
}
}
public void banItem(final ItemStack item) {

View File

@ -1 +0,0 @@
banitems: []

View File

@ -7,7 +7,7 @@ website: ${jenkins.url}/job/${project.artifactId}/
commands:
pi:
description: 物品保护插件
usage: 使用/pi 查看物品名称!
usage: 使用/pi help查看帮助!
permissions:
pi.bypass:
default: op