Interface Kit
public interface Kit
-
Method Summary
Modifier and TypeMethodDescriptionint
If there is no cooldown, it will return 0org.bukkit.Material
getIcon()
getId()
getLore()
If there is no permission, it will return nullint
getPrice()
If it is free it will return 0default boolean
isFree()
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 inventoryvoid
setContents(org.bukkit.inventory.Inventory inventory)
Sets the contents of the kitvoid
setContents(org.bukkit.inventory.PlayerInventory inventory)
Sets the contents of the kit (with armor)void
setCooldown(int cooldown)
Sets the cooldownvoid
setDisplayname(String name)
Sets the displaynamevoid
setIcon(org.bukkit.Material material)
Sets the materialvoid
Sets the lorevoid
setPermission(String permission)
Sets the permissionvoid
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
- 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 kitloader
- 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
Sets the displayname- Parameters:
name
- the new displayname
-
setLore
Sets the lore- Parameters:
lore
- the new lore
-
setPermission
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
-