diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilItem.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilItem.java index d189c0ce4..5ba12d21a 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilItem.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilItem.java @@ -1025,21 +1025,6 @@ public class UtilItem return list; } - /** - * Helper method to set various commonly used meta-values. - * - * @param itemStack the stack to apply the changes to - * @param displayName the display name to set for the stack - * @param lore the lore to set for the stack - */ - public static void easyMeta(ItemStack itemStack, String displayName, String... lore) - { - ItemMeta itemMeta = itemStack.getItemMeta(); - itemMeta.setDisplayName(displayName); - itemMeta.setLore(Arrays.asList(lore)); - itemStack.setItemMeta(itemMeta); - } - public enum ItemCategory { EDIBLE, diff --git a/Plugins/Mineplex.Core/src/mineplex/core/report/ui/ReportCategoryButton.java b/Plugins/Mineplex.Core/src/mineplex/core/report/ui/ReportCategoryButton.java index 595c1ab40..d47d67cbf 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/report/ui/ReportCategoryButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/report/ui/ReportCategoryButton.java @@ -8,8 +8,8 @@ import org.bukkit.event.inventory.ClickType; import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; -import mineplex.core.common.util.UtilItem; import mineplex.core.gui.SimpleGuiItem; +import mineplex.core.itemstack.ItemBuilder; import mineplex.core.report.ReportCategory; /** @@ -21,13 +21,17 @@ public class ReportCategoryButton extends SimpleGuiItem // initialize the display items we use private static Map ITEM_STACKS = new EnumMap(ReportCategory.class) {{ - ItemStack hackItem = new ItemStack(Material.IRON_SWORD, 1); - UtilItem.easyMeta(hackItem, C.cRedB + "Hacking", C.cGray + "X-ray, Forcefield, Speed, Fly etc"); - put(ReportCategory.HACKING, hackItem); + ItemStack itemHack = new ItemBuilder(Material.IRON_SWORD) + .setTitle(C.cRedB + "Hacking") + .addLore(C.cGray + "X-ray, Forcefield, Speed, Fly etc") + .build(); + put(ReportCategory.HACKING, itemHack); - ItemStack chatAbuseItem = new ItemStack(Material.BOOK_AND_QUILL, 1); - UtilItem.easyMeta(chatAbuseItem, C.cDBlueB + "Chat Abuse", C.cGray + "Verbal Abuse, Spam, Harassment, Trolling, etc"); - put(ReportCategory.CHAT_ABUSE, chatAbuseItem); + ItemStack itemChatAbuse = new ItemBuilder(Material.BOOK_AND_QUILL) + .setTitle(C.cDBlueB + "Chat Abuse") + .addLore(C.cGray + "Verbal Abuse, Spam, Harassment, Trolling, etc") + .build(); + put(ReportCategory.CHAT_ABUSE, itemChatAbuse); }}; private ReportCategoryPage _reportCategoryPage;