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