1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-11-22 01:58:54 +00:00

update new magic lib...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-10-18 23:07:34 +08:00
parent c83ace24c9
commit 7d908ff59a
2 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ public class ConfigManager {
if (config.getBoolean("usemagiclib", true)) { if (config.getBoolean("usemagiclib", true)) {
try { try {
plugin.getLogger().info("启用魔改库 尝试启动中..."); 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("item").itemTooltip(new ItemStack(Material.DIAMOND_SWORD));
fm.then("link").link("ci.citycraft.cn"); fm.then("link").link("ci.citycraft.cn");
fm.then("suggest").suggest("qs help"); fm.then("suggest").suggest("qs help");

View File

@ -90,7 +90,7 @@ public class MsgUtil {
public static String p(final String loc, final Object... args) { public static String p(final String loc, final Object... args) {
String raw = messages.getString(loc); String raw = messages.getString(loc);
if (raw == null || raw.isEmpty()) { if (raw == null || raw.isEmpty()) {
return "语言文件词条丢失: " + loc; return ChatColor.RED + "语言文件词条丢失: " + loc;
} }
if (args == null) { if (args == null) {
return raw; return raw;
@ -128,7 +128,7 @@ public class MsgUtil {
public static void sendItemMessage(final Player p, final ItemStack is, final String msg) { public static void sendItemMessage(final Player p, final ItemStack is, final String msg) {
try { try {
final FancyMessage fm = new FancyMessage(); 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) {
p.sendMessage(msg); p.sendMessage(msg);