Package me.devtec.amazingtags.utils
Class Tags
java.lang.Object
me.devtec.amazingtags.utils.Tags
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanIs used to check if player can see tag in GUI menu.static booleanIf Tag existstatic Stringstatic org.bukkit.inventory.ItemStackgetPreviewItem(org.bukkit.entity.Player player) Returns preview item used to inform player which tag he has selectedstatic StringgetTagFormat(String tag) Gets Tag format from Tags.ymlstatic StringgetTagInfo(String tag) Gets Tag info from Tags.yml if existsstatic org.bukkit.inventory.ItemStackgetTagItem(org.bukkit.entity.Player player, String tag) Returns tag item.static StringgetTagName(String tag) Gets Tag name from Tags.yml if exists.static StringgetTagPermission(String tag) Gets Tags permission.static booleanhasPermission(org.bukkit.entity.Player player, String tag) If player can use or see tag in guistatic booleanIf tag is enabledstatic booleanIf Tag exist
-
Constructor Details
-
Tags
public Tags()
-
-
Method Details
-
isTag
If Tag exist- Parameters:
tag- - The name used in the config to access the tag data- Returns:
- True if tag exists
-
exist
If Tag exist- Parameters:
tag- - The name used in the config to access the tag data- Returns:
- True if tag exists
-
getTagFormat
Gets Tag format from Tags.yml- Parameters:
tag- - The name used in the config to access the tag data- Returns:
- Returns tags format
-
getTagInfo
Gets Tag info from Tags.yml if exists- Parameters:
tag- - The name used in the config to access the tag data- Returns:
- Returns "" if tag info does not exists in Tags.yml
-
getTagName
Gets Tag name from Tags.yml if exists. Is used instead of path name. Example: official name is superTag05, but you do not want player to see this, you use this.- Parameters:
tag- - The name used in the file to access the tag data- Returns:
- Returns input parameter if is not used
-
getTagPermission
Gets Tags permission.- Parameters:
tag- - The name used in the file to access the tag data- Returns:
- Returns special tag permission from Tags.yml. If not used, returns default permission from Config.yml
-
canSee
Is used to check if player can see tag in GUI menu.- Parameters:
player- - Playertag- - The name used in the file to access the tag data- Returns:
- True if player can see tag in menu
-
isEnabled
If tag is enabled- Parameters:
tag- - The name used in the file to access the tag data- Returns:
- true/false - all tags enabled in default
-
hasPermission
If player can use or see tag in gui- Parameters:
player- Playertag- - The name used in the file to access the tag data- Returns:
- a
-
getDefaultPermission
-
getTagItem
public static org.bukkit.inventory.ItemStack getTagItem(org.bukkit.entity.Player player, String tag) Returns tag item. Server admin can edit items in Tags.yml or the default one in GUI.yml- Parameters:
player- - The player opening menutag- - The name used in the file to access the tag data- Returns:
ItemStack
-
getPreviewItem
public static org.bukkit.inventory.ItemStack getPreviewItem(org.bukkit.entity.Player player) Returns preview item used to inform player which tag he has selected- Parameters:
player- The player opening menu- Returns:
ItemStack
-