Package xyz.geik.farmer.helpers.gui
Class GuiHelper
java.lang.Object
xyz.geik.farmer.helpers.gui.GuiHelper
All guis using this method for
items and all items located here.
- Author:
- Geik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull xyz.geik.glib.shades.inventorygui.GuiElement
createGuiElement
(org.bukkit.inventory.ItemStack item, char key) GuiElement creator simple way for templatesstatic @NotNull xyz.geik.glib.shades.inventorygui.GuiElement
createNextPage
(org.bukkit.OfflinePlayer player) Next page item creatorstatic @NotNull xyz.geik.glib.shades.inventorygui.GuiElement
createPreviousPage
(org.bukkit.OfflinePlayer player) Previous page item creatorstatic @NotNull org.bukkit.inventory.ItemStack
getAddUserItem
(org.bukkit.OfflinePlayer player) addUserItem in manage menustatic @NotNull org.bukkit.inventory.ItemStack
getBuyItem
(org.bukkit.OfflinePlayer player) Buy item in BuyGuistatic org.bukkit.inventory.ItemStack
getFiller
(org.bukkit.OfflinePlayer player) Filler item of guis.static @NotNull org.bukkit.inventory.ItemStack
leftClickItem in geyser menustatic @NotNull org.bukkit.inventory.ItemStack
RightClickItem in geyser menustatic @NotNull org.bukkit.inventory.ItemStack
shiftRightClickItem in geyser menustatic @NotNull org.bukkit.inventory.ItemStack
getHelpItemForMain
(org.bukkit.OfflinePlayer player) Help item for main guistatic @NotNull org.bukkit.inventory.ItemStack
getHelpItemForUsers
(org.bukkit.OfflinePlayer player) Help item for users guistatic @NotNull org.bukkit.inventory.ItemStack
getItem
(String name, List<String> lore, int modelData, String material, boolean hasGlow, org.bukkit.OfflinePlayer player) If item has skull it gets item as head with custom head data.static @NotNull org.bukkit.inventory.ItemStack
TODO OLD REMOVE If item has skull it gets item as head with custom head data.static @NotNull org.bukkit.inventory.ItemStack
getLevelItem
(@NotNull Farmer farmer, org.bukkit.OfflinePlayer player) Creates level item which is can be in max level.static @NotNull org.bukkit.inventory.ItemStack
getManageItemOnMain
(Farmer farmer, org.bukkit.OfflinePlayer player) Manage gui item which located on farmer main gui.static @NotNull org.bukkit.inventory.ItemStack
getModuleGuiItem
(org.bukkit.OfflinePlayer player) moduleGuiItem in manage menustatic @NotNull org.bukkit.inventory.ItemStack
getStatusItem
(int status, org.bukkit.OfflinePlayer player) Lore replacer for manager menu status item.static @NotNull org.bukkit.inventory.ItemStack
getUserCategory
(org.bukkit.OfflinePlayer player) User category item in manage menu
-
Constructor Details
-
GuiHelper
public GuiHelper()Constructor of class
-
-
Method Details
-
getFiller
public static org.bukkit.inventory.ItemStack getFiller(org.bukkit.OfflinePlayer player) Filler item of guis. Filler item basically fills empty slots of gui- Parameters:
player
- for placeholder- Returns:
- ItemStack of filler
-
getItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getItem(String name, List<String> lore, int modelData, String material, boolean hasGlow, org.bukkit.OfflinePlayer player) If item has skull it gets item as head with custom head data. Otherwise, check for material and get item with a material.- Parameters:
name
- item namelore
- lore of itemmodelData
- modeldata of itemmaterial
- material of item stringhasGlow
- is item has glowplayer
- placeholder player- Returns:
- ItemStack of destination item
-
createGuiElement
@Contract("_, _ -> new") @NotNull public static @NotNull xyz.geik.glib.shades.inventorygui.GuiElement createGuiElement(org.bukkit.inventory.ItemStack item, char key) GuiElement creator simple way for templates- Parameters:
item
- item of elementkey
- to be in gui- Returns:
- GuiElement is finalized element
-
createPreviousPage
@Contract(" -> new") @NotNull public static @NotNull xyz.geik.glib.shades.inventorygui.GuiElement createPreviousPage(org.bukkit.OfflinePlayer player) Previous page item creator- Parameters:
player
- for placeholder- Returns:
- GuiElement of previous menu icon
-
createNextPage
@Contract(" -> new") @NotNull public static @NotNull xyz.geik.glib.shades.inventorygui.GuiElement createNextPage(org.bukkit.OfflinePlayer player) Next page item creator- Parameters:
player
- for placeholder- Returns:
- GuiElement of next menu icon
-
getManageItemOnMain
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getManageItemOnMain(Farmer farmer, org.bukkit.OfflinePlayer player) Manage gui item which located on farmer main gui.- Parameters:
farmer
- of regionplayer
- for placeholders- Returns:
- ItemStack manage icon
-
getStatusItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getStatusItem(int status, org.bukkit.OfflinePlayer player) Lore replacer for manager menu status item. Changing status to toggleON or toggleOFF value.- Parameters:
status
- of farmer collectionplayer
- for placeholders- Returns:
- ItemStack of status icon
-
getLevelItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getLevelItem(@NotNull @NotNull Farmer farmer, org.bukkit.OfflinePlayer player) Creates level item which is can be in max level. So crates it with checking if farmer in max level, or can be upgradeable and also replacing placeholder keys- Parameters:
farmer
- of regionplayer
- for placeholders- Returns:
- ItemStack of level icon
-
getBuyItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getBuyItem(org.bukkit.OfflinePlayer player) Buy item in BuyGui- Parameters:
player
- player for placeholder- Returns:
- ItemStack of buy farmer icon
-
getHelpItemForMain
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getHelpItemForMain(org.bukkit.OfflinePlayer player) Help item for main gui- Parameters:
player
- player for placeholder- Returns:
- ItemStack of help icon
-
getHelpItemForUsers
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getHelpItemForUsers(org.bukkit.OfflinePlayer player) Help item for users gui- Parameters:
player
- player for placeholder- Returns:
- ItemStack of help icon
-
getUserCategory
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getUserCategory(org.bukkit.OfflinePlayer player) User category item in manage menu- Parameters:
player
- player for placeholder- Returns:
- ItemStack of usercategory icon
-
getModuleGuiItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getModuleGuiItem(org.bukkit.OfflinePlayer player) moduleGuiItem in manage menu- Parameters:
player
- player for placeholder- Returns:
- ItemStack of moduleGui icon
-
getAddUserItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getAddUserItem(org.bukkit.OfflinePlayer player) addUserItem in manage menu- Parameters:
player
- player for placeholder- Returns:
- ItemStack of adduser icon
-
getGeyserGuiLeftItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getGeyserGuiLeftItem()leftClickItem in geyser menu- Returns:
- ItemStack of leftClick icon
-
getGeyserGuiRightItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getGeyserGuiRightItem()RightClickItem in geyser menu- Returns:
- ItemStack of rightClick icon
-
getGeyserGuiShiftRightItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getGeyserGuiShiftRightItem()shiftRightClickItem in geyser menu- Returns:
- ItemStack of shiftRightClick icon
-
getItem
@NotNull public static @NotNull org.bukkit.inventory.ItemStack getItem(String path, @NotNull @NotNull xyz.geik.farmer.shades.storage.Config file) TODO OLD REMOVE If item has skull it gets item as head with custom head data. Otherwise, check for material and get item with a material.- Parameters:
path
- path of item (e. Items.storage)file
- file of item (e. items.yml)- Returns:
- ItemStack of destination item
-