mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-25 02:28:54 +00:00
modify enable magic library method...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
efb4e18617
commit
b9a9fe292c
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.maxgamer</groupId>
|
<groupId>org.maxgamer</groupId>
|
||||||
<artifactId>QuickShop</artifactId>
|
<artifactId>QuickShop</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.4.2</version>
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.name}</finalName>
|
<finalName>${project.name}</finalName>
|
||||||
<resources>
|
<resources>
|
||||||
|
@ -12,7 +12,7 @@ import cn.citycraft.PluginHelper.config.FileConfig;
|
|||||||
import mkremins.fanciful.FancyMessage;
|
import mkremins.fanciful.FancyMessage;
|
||||||
|
|
||||||
public class ConfigManager {
|
public class ConfigManager {
|
||||||
private boolean enableMagicLib;
|
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 */
|
||||||
@ -80,22 +80,23 @@ public class ConfigManager {
|
|||||||
this.feeForPriceChange = config.getDouble("shop.fee-for-price-change");
|
this.feeForPriceChange = config.getDouble("shop.fee-for-price-change");
|
||||||
this.preventhopper = config.getBoolean("preventhopper");
|
this.preventhopper = config.getBoolean("preventhopper");
|
||||||
this.guiTitle = config.getMessage("guititle");
|
this.guiTitle = config.getMessage("guititle");
|
||||||
try {
|
if (config.getBoolean("usemagiclib", true)) {
|
||||||
plugin.getLogger().info("尝试启动魔改库...");
|
try {
|
||||||
final FancyMessage fm = new FancyMessage("test");
|
plugin.getLogger().info("启用魔改库 尝试启动中...");
|
||||||
fm.then("item").itemTooltip(new ItemStack(Material.DIAMOND_SWORD));
|
final FancyMessage fm = new FancyMessage("test");
|
||||||
fm.then("link").link("ci.citycraft.cn");
|
fm.then("item").itemTooltip(new ItemStack(Material.DIAMOND_SWORD));
|
||||||
fm.then("suggest").suggest("qs help");
|
fm.then("link").link("ci.citycraft.cn");
|
||||||
fm.toJSONString();
|
fm.then("suggest").suggest("qs help");
|
||||||
plugin.getLogger().info("魔改库功能测试正常...");
|
fm.toJSONString();
|
||||||
this.enableMagicLib = true;
|
plugin.getLogger().info("魔改库功能测试正常...");
|
||||||
} catch (final NoClassDefFoundError | NoSuchMethodError | Exception e) {
|
this.enableMagicLib = true;
|
||||||
plugin.getLogger().warning("+=========================================");
|
} catch (final NoClassDefFoundError | NoSuchMethodError | Exception e) {
|
||||||
plugin.getLogger().warning("| 警告: 启动魔改库失败 将使用GUI界面...");
|
plugin.getLogger().warning("+=========================================");
|
||||||
plugin.getLogger().warning("+=========================================");
|
plugin.getLogger().warning("| 警告: 启动魔改库失败 将使用GUI商店界面...");
|
||||||
this.enableMagicLib = false;
|
plugin.getLogger().warning("+=========================================");
|
||||||
|
this.enableMagicLib = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.enableMagicLib = enableMagicLib && config.getBoolean("usemagiclib", true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getFeeForPriceChange() {
|
public double getFeeForPriceChange() {
|
||||||
|
Loading…
Reference in New Issue
Block a user