From 7d908ff59af97b4ef876ce20bbd475e823ab3538 Mon Sep 17 00:00:00 2001 From: j502647092 Date: Sun, 18 Oct 2015 23:07:34 +0800 Subject: [PATCH] update new magic lib... Signed-off-by: j502647092 --- .../java/org/maxgamer/QuickShop/Config/ConfigManager.java | 2 +- src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java b/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java index 31e0a00..a64d0a8 100644 --- a/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java +++ b/src/main/java/org/maxgamer/QuickShop/Config/ConfigManager.java @@ -83,7 +83,7 @@ public class ConfigManager { if (config.getBoolean("usemagiclib", true)) { try { plugin.getLogger().info("启用魔改库 尝试启动中..."); - final FancyMessage fm = new FancyMessage("test"); + final FancyMessage fm = FancyMessage.newFM("test"); fm.then("item").itemTooltip(new ItemStack(Material.DIAMOND_SWORD)); fm.then("link").link("ci.citycraft.cn"); fm.then("suggest").suggest("qs help"); diff --git a/src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java b/src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java index 79be4bd..592c8d9 100644 --- a/src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java +++ b/src/main/java/org/maxgamer/QuickShop/Util/MsgUtil.java @@ -90,7 +90,7 @@ public class MsgUtil { public static String p(final String loc, final Object... args) { String raw = messages.getString(loc); if (raw == null || raw.isEmpty()) { - return "语言文件词条丢失: " + loc; + return ChatColor.RED + "语言文件词条丢失: " + loc; } if (args == null) { return raw; @@ -128,7 +128,7 @@ public class MsgUtil { public static void sendItemMessage(final Player p, final ItemStack is, final String msg) { try { - final FancyMessage fm = new FancyMessage(); + final FancyMessage fm = FancyMessage.newFM(); fm.text(msg).itemTooltip(is).send(p); } catch (Exception | NoClassDefFoundError | NoSuchMethodError e) { p.sendMessage(msg);