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

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

--- 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 19d ago
Copy link
Contents
Main
String getName()
String getVersion()
String getApiVersion()
Players (Ranks)
boolean api.setPlayerRank(Player player, String rankname)
boolean api.addPlayerRank(Player player, String rankname)
boolean api.removePlayerRank(Player player, String rankname)
Players (Permissions)
boolean api.removePermission(Player player, String permission)
boolean api.addPermission(Player player, String permission, boolean allowed)
Ranks (Permissions)
List<String> api.getAllowedPermissions(String rankname)
List<String> api.getDeniedPermissions(String rankname)
boolean api.addPermission(String rank, String permission, boolean allowed)
boolean api.removePermission(String rank, String permission)
Ranks (Inheritances)
List<String> api.getInheritances(String rankname)
boolean api.addInheritance(String rankname, String inheritance)
boolean api.removeInheritance(String rank, String inheritance)
Ranks (Formatting)
String api.getPrefix(String rankname)
boolean api.setPrefix(String rankname, String newPrefix)
String api.getSuffix(String rankname)
boolean api.setSuffix(String rankname, String newSuffix)
String api.getNameColor(String rankname)
boolean api.setNameColor(String rankname, String newColor)
String api.getChatColor(String rankname)
boolean api.setChatColor(String rankname, String newColor)
Ranks (Basic)
Set<String> api.getRanks()
boolean api.createRank(String rankname)
boolean api.deleteRank(String rankname)
Ranks (Buyable ranks)
boolean api.addBuyableRank(String rankname, String buyable_rankname)
boolean api.delBuyableRank(String rankname, String buyable_rankname)
boolean api.setRankBuyCost(String rankname, int cost)
--- Deprecated ---
Players (Ranks)
String api.getPlayerRank(Player player)
Players (Permissions)
boolean api.addPermission(Player player, String permission)
Ranks (Permissions)
List<String> api.getPermissions(String rankname)
boolean api.addPermission(String rank, String permission)
Ranks (Promote/Demote)
String api.getPromoteRank(String rankname)
boolean api.setPromoteRank(String rankname, String promote_rankname)
String api.getDemoteRank(String rankname)
boolean api.setDemoteRank(String rankname, String demote_rankname)
Players (Subranks)
List<String> api.getSubranks(Player player)
boolean api.addSubrank(Player player, String rankname)
boolean api.removeSubrank(Player player, String rankname)
String api.getPlayerSubrankPrefixes(Player player)
String api.getPlayerSubrankSuffixes(Player player)