1
0
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:
502647092 2015-10-17 10:47:23 +08:00
parent efb4e18617
commit b9a9fe292c
2 changed files with 18 additions and 17 deletions

View File

@ -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>

View File

@ -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,8 +80,9 @@ 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");
if (config.getBoolean("usemagiclib", true)) {
try { try {
plugin.getLogger().info("尝试启动魔改库..."); plugin.getLogger().info("启用魔改库 尝试启动中...");
final FancyMessage fm = new FancyMessage("test"); final FancyMessage fm = new FancyMessage("test");
fm.then("item").itemTooltip(new ItemStack(Material.DIAMOND_SWORD)); fm.then("item").itemTooltip(new ItemStack(Material.DIAMOND_SWORD));
fm.then("link").link("ci.citycraft.cn"); fm.then("link").link("ci.citycraft.cn");
@ -91,11 +92,11 @@ public class ConfigManager {
this.enableMagicLib = true; this.enableMagicLib = true;
} catch (final NoClassDefFoundError | NoSuchMethodError | Exception e) { } catch (final NoClassDefFoundError | NoSuchMethodError | Exception e) {
plugin.getLogger().warning("+========================================="); plugin.getLogger().warning("+=========================================");
plugin.getLogger().warning("| 警告: 启动魔改库失败 将使用GUI界面..."); plugin.getLogger().warning("| 警告: 启动魔改库失败 将使用GUI商店界面...");
plugin.getLogger().warning("+========================================="); plugin.getLogger().warning("+=========================================");
this.enableMagicLib = false; this.enableMagicLib = false;
} }
this.enableMagicLib = enableMagicLib && config.getBoolean("usemagiclib", true); }
} }
public double getFeeForPriceChange() { public double getFeeForPriceChange() {