Interface Kit


public interface Kit
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    If there is no cooldown, it will return 0
     
    org.bukkit.Material
     
     
     
    If there is no permission, it will return null
    int
    If it is free it will return 0
    default boolean
     
    void
    loadKit​(org.bukkit.entity.Player player)
    Used for loading a kit into a player's inventory This only uses one player in the params.
    void
    loadKit​(org.bukkit.entity.Player receiver, org.bukkit.entity.Player loader)
    Used for loading the kit into a player's inventory
    void
    setContents​(org.bukkit.inventory.Inventory inventory)
    Sets the contents of the kit
    void
    setContents​(org.bukkit.inventory.PlayerInventory inventory)
    Sets the contents of the kit (with armor)
    void
    setCooldown​(int cooldown)
    Sets the cooldown
    void
    Sets the displayname
    void
    setIcon​(org.bukkit.Material material)
    Sets the material
    void
    setLore​(List<String> lore)
    Sets the lore
    void
    setPermission​(String permission)
    Sets the permission
    void
    setPrice​(int price)
    Sets the price
  • Method Details

    • getId

      String getId()
      Returns:
      the id of the kit
    • getPrice

      int getPrice()
      If it is free it will return 0
      Returns:
      the price of the kit
      See Also:
      Kit#isFree() which returns weather the kit is free as a boolean object
    • isFree

      default boolean isFree()
      Returns:
      weather the price of the kit is 0 as a boolean
      See Also:
      Kit#getPrice() to get the price
    • getCooldown

      int getCooldown()
      If there is no cooldown, it will return 0
      Returns:
      the kits cooldown
    • getIcon

      org.bukkit.Material getIcon()
      Returns:
      the kits icon
    • getLore

      List<String> getLore()
      Returns:
      the kits description (lore)
    • getDisplayname

      String getDisplayname()
      Returns:
      the kits displayname
    • getPermission

      String getPermission()
      If there is no permission, it will return null
      Returns:
      the permission of the kit
    • loadKit

      void loadKit(org.bukkit.entity.Player receiver, org.bukkit.entity.Player loader)
      Used for loading the kit into a player's inventory
      Parameters:
      receiver - the person receiving the items in the kit
      loader - the person giving the kit
      See Also:
      Kit#loadKit(Player) to load a kit for a singular player
    • loadKit

      void loadKit(org.bukkit.entity.Player player)
      Used for loading a kit into a player's inventory This only uses one player in the params.
      Parameters:
      player - the player who is getting the kit (The player doesn't have to have permission)
      See Also:
      Kit#loadKit(Player, Player) is used in this method with the Player param being used as the receiver
    • setDisplayname

      void setDisplayname(String name)
      Sets the displayname
      Parameters:
      name - the new displayname
    • setLore

      void setLore(List<String> lore)
      Sets the lore
      Parameters:
      lore - the new lore
    • setPermission

      void setPermission(String permission)
      Sets the permission
      Parameters:
      permission - the new permission
    • setCooldown

      void setCooldown(int cooldown)
      Sets the cooldown
      Parameters:
      cooldown - the new cooldown
    • setPrice

      void setPrice(int price)
      Sets the price
      Parameters:
      price - the new price
    • setIcon

      void setIcon(org.bukkit.Material material)
      Sets the material
      Parameters:
      material - the material
    • setContents

      void setContents(org.bukkit.inventory.Inventory inventory)
      Sets the contents of the kit
      Parameters:
      inventory - the inventory with the new items
      See Also:
      to set a kit with armor contents or from a player inventory
    • setContents

      void setContents(org.bukkit.inventory.PlayerInventory inventory)
      Sets the contents of the kit (with armor)
      Parameters:
      inventory - the inventory with the new items
      See Also:
      to set a kit without armor contents/not a player inventory