diff --git a/proguard.conf b/proguard.conf index b7db682..47ef780 100644 --- a/proguard.conf +++ b/proguard.conf @@ -24,6 +24,7 @@ } # -----保护注解命令方法不被清理----- +-keepclassmembers class **.commands.HandlerCommand { ; } -keepclassmembers class * implements **.commands.HandlerCommands { @**.commands.HandlerCommand ; diff --git a/src/main/java/cn/citycraft/JumpPlate/JumpPlate.java b/src/main/java/cn/citycraft/JumpPlate/JumpPlate.java index 77c9ce8..af1538e 100644 --- a/src/main/java/cn/citycraft/JumpPlate/JumpPlate.java +++ b/src/main/java/cn/citycraft/JumpPlate/JumpPlate.java @@ -31,6 +31,6 @@ public class JumpPlate extends JavaPlugin implements Listener, HandlerCommands { public void onLoad() { config = new FileConfig(this); pluginname = config.getMessage("pluginname"); - removedamage = JumpPlate.instence.getConfig().getBoolean("removedamage"); + removedamage = config.getBoolean("removedamage"); } } diff --git a/src/main/java/cn/citycraft/JumpPlate/JumpPlateCommand.java b/src/main/java/cn/citycraft/JumpPlate/JumpPlateCommand.java index 9ad891c..519c480 100644 --- a/src/main/java/cn/citycraft/JumpPlate/JumpPlateCommand.java +++ b/src/main/java/cn/citycraft/JumpPlate/JumpPlateCommand.java @@ -18,11 +18,12 @@ public class JumpPlateCommand implements HandlerCommands { e.getSender().sendMessage(JumpPlate.instence.pluginname + "§a配置文件已重载!"); } - @HandlerCommand(name = "set", description = "设置基岩跳板高度", minimumArguments = 1, onlyPlayerExecutable = true, permission = "JumpPlate.reload", possibleArguments = "<跳板高度(1-10)>") + @HandlerCommand(name = "set", description = "设置基岩跳板高度", minimumArguments = 1, permission = "JumpPlate.reload", possibleArguments = "<跳板高度(1-10)>") public void setCommand(final InvokeCommandEvent e) { try { final double drb = Double.parseDouble(e.getArgs()[0]); JumpPlate.instence.getConfig().set("BEDROCK", drb); + JumpPlate.instence.getConfig().save(); e.getSender().sendMessage(JumpPlate.instence.pluginname + "§a基岩的跳板弹跳倍数已设置为 " + drb + "倍!"); } catch (final NumberFormatException ex) { e.getSender().sendMessage(JumpPlate.instence.pluginname + "§c参数非法 请输入数字 1-10");