mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-25 02:28:54 +00:00
fix reload config error and interact action...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
bcf33b9133
commit
1d951ac2bd
@ -22,9 +22,9 @@ public class CommandReload extends BaseCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
|
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
|
||||||
sender.sendMessage(MsgUtil.p("command.reloading"));
|
sender.sendMessage(MsgUtil.p("command.reloading"));
|
||||||
|
plugin.reloadConfig();
|
||||||
Bukkit.getPluginManager().disablePlugin(plugin);
|
Bukkit.getPluginManager().disablePlugin(plugin);
|
||||||
Bukkit.getPluginManager().enablePlugin(plugin);
|
Bukkit.getPluginManager().enablePlugin(plugin);
|
||||||
plugin.reloadConfig();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,14 +15,15 @@ public class ConfigManager {
|
|||||||
private boolean enableMagicLib = false;
|
private boolean enableMagicLib = false;
|
||||||
/** Whether debug info should be shown in the console */
|
/** Whether debug info should be shown in the console */
|
||||||
protected boolean debug = false;
|
protected boolean debug = false;
|
||||||
|
|
||||||
/** Whether we should use display items or not */
|
/** Whether we should use display items or not */
|
||||||
protected boolean display = true;
|
protected boolean display = true;
|
||||||
protected double feeForPriceChange = 0.0;
|
protected double feeForPriceChange = 0.0;
|
||||||
protected int findDistance = 30;
|
protected int findDistance = 30;
|
||||||
protected String guiTitle = "§6[§b快捷商店§6]";
|
protected String guiTitle = "§6[§b快捷商店§6]";
|
||||||
|
|
||||||
/** Whether or not to limit players shop amounts */
|
/** Whether or not to limit players shop amounts */
|
||||||
protected boolean limit = false;
|
protected boolean limit = false;
|
||||||
|
|
||||||
protected int limitdefault = 0;
|
protected int limitdefault = 0;
|
||||||
protected final HashMap<String, Integer> limits = new HashMap<String, Integer>();
|
protected final HashMap<String, Integer> limits = new HashMap<String, Integer>();
|
||||||
protected boolean logAction = true;
|
protected boolean logAction = true;
|
||||||
@ -187,4 +188,8 @@ public class ConfigManager {
|
|||||||
return useSpout;
|
return useSpout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEnableMagicLib(final boolean enableMagicLib) {
|
||||||
|
this.enableMagicLib = enableMagicLib;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,7 @@ public class MsgUtil {
|
|||||||
final FancyMessage fm = FancyMessage.newFM();
|
final FancyMessage fm = FancyMessage.newFM();
|
||||||
fm.text(msg).itemTooltip(is).send(p);
|
fm.text(msg).itemTooltip(is).send(p);
|
||||||
} catch (Exception | NoClassDefFoundError | NoSuchMethodError e) {
|
} catch (Exception | NoClassDefFoundError | NoSuchMethodError e) {
|
||||||
|
plugin.getConfigManager().setEnableMagicLib(false);
|
||||||
p.sendMessage(msg);
|
p.sendMessage(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user