diff --git a/src/main/java/org/maxgamer/QuickShop/Util/MarkUtil.java b/src/main/java/org/maxgamer/QuickShop/Util/MarkUtil.java new file mode 100644 index 0000000..87954cb --- /dev/null +++ b/src/main/java/org/maxgamer/QuickShop/Util/MarkUtil.java @@ -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; + } + } +}