Class GuiHelper

java.lang.Object
xyz.geik.farmer.helpers.gui.GuiHelper

public class GuiHelper extends Object
All guis using this method for items and all items located here.
Author:
Geik
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor of class
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull xyz.geik.glib.shades.inventorygui.GuiElement
    createGuiElement(org.bukkit.inventory.ItemStack item, char key)
    GuiElement creator simple way for templates
    static @NotNull xyz.geik.glib.shades.inventorygui.GuiElement
    createNextPage(org.bukkit.OfflinePlayer player)
    Next page item creator
    static @NotNull xyz.geik.glib.shades.inventorygui.GuiElement
    createPreviousPage(org.bukkit.OfflinePlayer player)
    Previous page item creator
    static @NotNull org.bukkit.inventory.ItemStack
    getAddUserItem(org.bukkit.OfflinePlayer player)
    addUserItem in manage menu
    static @NotNull org.bukkit.inventory.ItemStack
    getBuyItem(org.bukkit.OfflinePlayer player)
    Buy item in BuyGui
    static org.bukkit.inventory.ItemStack
    getFiller(org.bukkit.OfflinePlayer player)
    Filler item of guis.
    static @NotNull org.bukkit.inventory.ItemStack
    leftClickItem in geyser menu
    static @NotNull org.bukkit.inventory.ItemStack
    RightClickItem in geyser menu
    static @NotNull org.bukkit.inventory.ItemStack
    shiftRightClickItem in geyser menu
    static @NotNull org.bukkit.inventory.ItemStack
    getHelpItemForMain(org.bukkit.OfflinePlayer player)
    Help item for main gui
    static @NotNull org.bukkit.inventory.ItemStack
    getHelpItemForUsers(org.bukkit.OfflinePlayer player)
    Help item for users gui
    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.
    static @NotNull org.bukkit.inventory.ItemStack
    getItem(String path, @NotNull xyz.geik.farmer.shades.storage.Config file)
    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 menu
    static @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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 name
      lore - lore of item
      modelData - modeldata of item
      material - material of item string
      hasGlow - is item has glow
      player - 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 element
      key - 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 region
      player - 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 collection
      player - 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 region
      player - 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