parent
2ffd1ac895
commit
ed0a16fe85
|
@ -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("<封禁类型>");
|
||||
}
|
||||
|
|
|
@ -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("<解禁类型>");
|
||||
}
|
||||
|
|
|
@ -19,8 +19,12 @@ public class ItemManager {
|
|||
public ItemManager(final ProtectItem main) {
|
||||
plugin = main;
|
||||
itemconfig = new FileConfig(plugin, "banitems.yml");
|
||||
itemlist = (HashMap<String, List<ActionType>>) itemconfig.get("banitems");
|
||||
if (itemlist == null) {
|
||||
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>>();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
banitems: []
|
|
@ -7,7 +7,7 @@ website: ${jenkins.url}/job/${project.artifactId}/
|
|||
commands:
|
||||
pi:
|
||||
description: 物品保护插件
|
||||
usage: 使用/pi 查看物品名称!
|
||||
usage: 使用/pi help查看帮助!
|
||||
permissions:
|
||||
pi.bypass:
|
||||
default: op
|
||||
|
|
Loading…
Reference in New Issue