Interface Kit
public interface Kit
-
Method Summary
Modifier and TypeMethodDescriptionintIf there is no cooldown, it will return 0org.bukkit.MaterialgetIcon()getId()getLore()If there is no permission, it will return nullintgetPrice()If it is free it will return 0default booleanisFree()voidloadKit(org.bukkit.entity.Player player)Used for loading a kit into a player's inventory This only uses one player in the params.voidloadKit(org.bukkit.entity.Player receiver, org.bukkit.entity.Player loader)Used for loading the kit into a player's inventoryvoidsetContents(org.bukkit.inventory.Inventory inventory)Sets the contents of the kitvoidsetContents(org.bukkit.inventory.PlayerInventory inventory)Sets the contents of the kit (with armor)voidsetCooldown(int cooldown)Sets the cooldownvoidsetDisplayname(String name)Sets the displaynamevoidsetIcon(org.bukkit.Material material)Sets the materialvoidSets the lorevoidsetPermission(String permission)Sets the permissionvoidsetPrice(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
-