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

add lose file...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-10-05 02:10:19 +08:00
parent bc5e6a6c0b
commit 500e94cb29

View File

@ -0,0 +1,23 @@
package org.maxgamer.QuickShop.Util;
import org.bukkit.ChatColor;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
public class MarkUtil {
static String mark = "§q§s§r";
public static void addMark(final ItemStack ci) {
final ItemMeta meta = ci.getItemMeta();
meta.setDisplayName(ChatColor.RED + "QuickShop " + Util.getName(ci));
ci.setItemMeta(meta);
}
public static boolean hasMark(final ItemStack ci) {
try {
return ci.getItemMeta().getDisplayName().startsWith(mark);
} catch (final Exception e) {
return false;
}
}
}