API functions

Main

String getName()

Since API: v1.0
Description: Get the plugin name
Return: (String) name of the plugin

String getVersion()

Since API: v1.0
Description: Get the plugin version
Return: (String) version of the plugin

String getApiVersion()

Since API: v1.0
Description: Get the API version
Return: (String) version of the API

Players (Ranks)

boolean api.setPlayerRank(Player player, String rankname)

Since API: v1.0
Description: Overwrite all ranks of a player and set it to a single one
Argument(s):
  • org.bukkit.entity.Player player
  • String rankname
Return: (boolean) success

boolean api.addPlayerRank(Player player, String rankname)

Since API: v1.1
Description: Add a rank to the player's current ranks
Argument(s):
  • org.bukkit.entity.Player player
  • String rankname
Return: (boolean) success

boolean api.removePlayerRank(Player player, String rankname)

Since API: v1.0
Description: Remove a rank from a player
Argument(s):
  • org.bukkit.entity.Player player
  • String rankname
Return: (boolean) success

Players (Permissions)

boolean api.removePermission(Player player, String permission)

Since API: v1.0
Description: Remove a permission node from a player
Argument(s):
  • org.bukkit.entity.Player player
  • String permission.node
Return: (boolean) success

boolean api.addPermission(Player player, String permission, boolean allowed)

Since API: v1.1
Description: Add a permission node to a player
Argument(s):
  • org.bukkit.entity.Player player
  • String permission.node
  • Boolean permission allowed or denied
Return: (boolean) success

Ranks (Permissions)

List<String> api.getAllowedPermissions(String rankname)

Since API: v1.1
Description: Get all allowed permissions of a rank
Argument(s):
  • String rankname
Return: (java.util.List<String>) list of allowed Permissions

List<String> api.getDeniedPermissions(String rankname)

Since API: v1.1
Description: Get all denied permissions of a rank
Argument(s):
  • String rankname
Return: (java.util.List<String>) list of denied Permissions

boolean api.addPermission(String rank, String permission, boolean allowed)

Since API: v1.1
Description: Add a permission to a rank
Argument(s):
  • String rankname
  • String permission.node
  • Boolean permission allowed or denied
Return: (boolean) success

boolean api.removePermission(String rank, String permission)

Since API: v1.0
Description: Remove a permission from a rank
Argument(s):
  • String rankname
  • String permission.node
Return: (boolean) success

Ranks (Inheritances)

List<String> api.getInheritances(String rankname)

Since API: v1.0
Description: Get a list of all rank inheritances on a specific rank
Argument(s):
  • String rankname
Return: (java.util.List<String>)

boolean api.addInheritance(String rankname, String inheritance)

Since API: v1.0
Description: Add a inherited rank to a rank
Argument(s):
  • String rankname
  • String inheritance_rankname
Return: (boolean) success

boolean api.removeInheritance(String rank, String inheritance)

Since API: v1.0
Description: Remove a inherited rank from a rank
Argument(s):
  • String rankname
  • String inheritance_rankname
Return: (boolean) success

Ranks (Formatting)

String api.getPrefix(String rankname)

Since API: v1.0
Description: Get the prefix from a rank
Argument(s):
  • String rankname
Return: (String) unformatted prefix of a rank

boolean api.setPrefix(String rankname, String newPrefix)

Since API: v1.0
Description: Change the prefix of a rank
Argument(s):
  • String rankname
  • String newPrefix
Return: (boolean) success

String api.getSuffix(String rankname)

Since API: v1.0
Description: Get the suffix from a rank
Argument(s):
  • String rankname
Return: (String) unformatted suffix of a rank

boolean api.setSuffix(String rankname, String newSuffix)

Since API: v1.0
Description: Change the suffix of a rank
Argument(s):
  • String rankname
  • String newSuffix
Return: (boolean) success

String api.getNameColor(String rankname)

Since API: v1.0
Description: Get the name color of a rank
Argument(s):
  • String rankname
Return: (String) unformatted name color

boolean api.setNameColor(String rankname, String newColor)

Since API: v1.0
Description: Change the name color of a rank
Argument(s):
  • String rankname
  • String newColor
Return: (boolean) success

String api.getChatColor(String rankname)

Since API: v1.0
Description: Get the chat color of a rank
Argument(s):
  • String rankname
Return: (String) unformatted chat color

boolean api.setChatColor(String rankname, String newColor)

Since API: v1.0
Description: Change the chat color of a rank
Argument(s):
  • String rankname
Return: (boolean) success

Ranks (Basic)

Set<String> api.getRanks()

Since API: v1.0
Description: Get a list of all ranks on this server
Return: (java.util.Set<String>) list of all registered ranks

boolean api.createRank(String rankname)

Since API: v1.0
Description: Create a rank on the server
Argument(s):
  • String rankname
Return: (boolean) success

boolean api.deleteRank(String rankname)

Since API: v1.0
Description: Delete a rank from the server
Argument(s):
  • String rankname
Return: (boolean) success

boolean setDefault(String rankname, boolean isDefault)

Since API: v1.2
Description: Should the rank be given to the players when they join for the first time?
Argument(s):
  • String rankname
  • boolean isDefault
Return: (boolean) success

public List getDefaultRanks()

Since API: v1.2
Description: Get the list of default ranks that are given to new players
Return: (List<String>) List of default ranks

Ranks (Buyable ranks)

boolean api.addBuyableRank(String rankname, String buyable_rankname)

Since API: v1.0
Description: Add a rank as buyable to a rank
Argument(s):
  • String rankname
  • String buyable_rankname
Return: (boolean) success

boolean api.delBuyableRank(String rankname, String buyable_rankname)

Since API: v1.0
Description: Remove a rank as buyable from a rank
Argument(s):
  • String rankname
  • String buyable_rankname
Return: (boolean) success

boolean api.setRankBuyCost(String rankname, int cost)

Since API: v1.0
Description: The the buy cost of a rank
Argument(s):
Return: (boolean) success

Usertags

boolean createUsertag(String usertag, String value)

Since API: v1.3
Description: Create a usertag on the server
Argument(s):
  • String usertag
  • String value
Return: (boolean) success

boolean editUsertag(String usertag, String value)

Since API: v1.3
Description: Change a usertag on the server
Argument(s):
  • String usertag
  • String value
Return: (boolean) success

boolean removeUsertag(String usertag)

Since API: v1.3
Description: Delete a usertag from the server
Argument(s):
  • String usertag
Return: (boolean) success

boolean setUsertag(Player player, String usertag)

Since API: v1.3
Description: Assign a usertag to an player
Argument(s):
  • Player player
  • String usertag
Return: (boolean) success

boolean addUsertag(Player player, String usertag)

Since API: v1.3
Description: Add a usertag to an player
Argument(s):
  • Player player
  • String usertag
Return: (boolean) success

boolean delUsertag(Player player, String usertag)

Since API: v1.3
Description: Remove an usertag from a player
Argument(s):
  • Player player
  • String usertag
Return: (boolean) success

--- Deprecated ---

Players (Ranks)

String api.getPlayerRank(Player player)

Deprecated in API: v1.1 | replaced by getPrimaryRank(Player)
Since API: v1.0
Description: Get the name of the player's main rank
Argument(s):
  • org.bukkit.entity.Player player
Return: (String) name of the rank

Players (Permissions)

boolean api.addPermission(Player player, String permission)

Deprecated in v1.1 | replaced by addPermission(Player, String, boolean)
Since API: v1.0
Description: Add a permission node to a player
If the permissions starts with '-' it will be denied
Argument(s):
  • org.bukkit.entity.Player player
  • String permission.node
Return: (boolean) success

Ranks (Permissions)

List<String> api.getPermissions(String rankname)

Deprecated in API: v1.1 | replaced by getAllowedPermissions(Player, String) & getDeniedPermissions(Player, String)
Since API: v1.0
Description: Get all permissions of a rank
Argument(s):
  • String rankname
Return: (java.util.List<String>) list of Permissions

boolean api.addPermission(String rank, String permission)

Deprecated in API: v1.1 | replaced by addPermission(String, String, boolean)
Since API: v1.0
Description: Add a permission to a rank
If the permissions starts with '-' it will be denied
Argument(s):
  • String rankname
  • String permission.node
Return: (boolean) success

Ranks (Promote/Demote)

String api.getPromoteRank(String rankname)

Deprecated in API: v1.1
Since API: v1.0
Description: Get the promote rank on a rank
Argument(s):
  • String rankname
Return: (String) name of the promote rank

boolean api.setPromoteRank(String rankname, String promote_rankname)

Deprecated in API: v1.1
Since API: v1.0
Description: Set the promote rank on a rank
Argument(s):
  • String rankname
  • String promote_rankname
Return: (boolean) success

String api.getDemoteRank(String rankname)

Deprecated in API: v1.1
Since API: v1.0
Description: Get the demote rank on a rank
Argument(s):
  • String rankname
Return: (String) name of the demote rank

boolean api.setDemoteRank(String rankname, String demote_rankname)

Deprecated in API: v1.1
Since API: v1.0
Description: Set the demote rank on a rank
Argument(s):
  • String rankname
  • String demote_rankname
Return: (boolean) success

Players (Subranks)

List<String> api.getSubranks(Player player)

Deprecated in API: v1.1
Since API: v1.0
Description: Get a list of subranks on a player
Argument(s):
  • org.bukkit.entity.Player player
Return: (java.util.List<String>) names of the subranks

boolean api.addSubrank(Player player, String rankname)

Deprecated in API: v1.1
Since API: v1.0
Description: Add a subrank to a player
Argument(s):
  • org.bukkit.entity.Player player
  • String rankname
Return: (boolean) success

boolean api.removeSubrank(Player player, String rankname)

Deprecated in API: v1.1
Since API: v1.0
Description: Remove a subrank from a player
Argument(s):
  • org.bukkit.entity.Player player
  • String rankname
Return: (boolean) success

String api.getPlayerSubrankPrefixes(Player player)

Deprecated in API: v1.1
Since API: v1.0
Description: Get the prefixes of the player's subranks separated by a space
Argument(s):
  • org.bukkit.entity.Player player
Return: (String) All prefixes of the player's subranks separated by a space

String api.getPlayerSubrankSuffixes(Player player)

Deprecated in API: v1.1
Since API: v1.0
Description: Get the suffixes of the player's subranks separated by a space
Argument(s):
  • org.bukkit.entity.Player player
Return: (String) All suffixes of the player's subranks separated by a space
Last modified 8mo ago