public abstract class Permission extends Object
Constructor and Description |
---|
Permission() |
Modifier and Type | Method and Description |
---|---|
abstract String[] |
getGroups()
Returns a list of all known groups
|
abstract String |
getName()
Gets name of permission method
|
String[] |
getPlayerGroups(org.bukkit.entity.Player player)
Returns a list of world-specific groups that this player is currently in.
|
String[] |
getPlayerGroups(String world,
org.bukkit.OfflinePlayer player)
Gets the list of groups that this player has
Supports NULL value for World if the permission system registered supports global permissions.
|
abstract String[] |
getPlayerGroups(String world,
String player)
Deprecated.
As of Vault 1.3.01 use
getPlayerGroups(String, OfflinePlayer) instead.
Gets the list of groups that this player has.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
String[] |
getPlayerGroups(org.bukkit.World world,
String player)
Deprecated.
As of Vault 1.3.01 use
getPlayerGroups(String, OfflinePlayer) instead.
Gets the list of groups that this player has
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
String |
getPrimaryGroup(org.bukkit.entity.Player player)
Get players primary group
|
String |
getPrimaryGroup(String world,
org.bukkit.OfflinePlayer player)
Gets players primary group
Supports NULL value for World if the permission system registered supports global permissions.
|
abstract String |
getPrimaryGroup(String world,
String player)
Deprecated.
As of Vault 1.3.01 use
getPrimaryGroup(String, OfflinePlayer) instead.
Gets players primary group
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
String |
getPrimaryGroup(org.bukkit.World world,
String player)
Deprecated.
As of Vault 1.3.01 use
getPrimaryGroup(String, OfflinePlayer) instead.
Gets players primary group
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
abstract boolean |
groupAdd(String world,
String group,
String permission)
Add permission to a group.
|
boolean |
groupAdd(org.bukkit.World world,
String group,
String permission)
Add permission to a group.
|
abstract boolean |
groupHas(String world,
String group,
String permission)
Checks if group has a permission node.
|
boolean |
groupHas(org.bukkit.World world,
String group,
String permission)
Checks if group has a permission node.
|
abstract boolean |
groupRemove(String world,
String group,
String permission)
Remove permission from a group.
|
boolean |
groupRemove(org.bukkit.World world,
String group,
String permission)
Remove permission from a group.
|
boolean |
has(org.bukkit.command.CommandSender sender,
String permission)
Checks if a CommandSender has a permission node.
|
boolean |
has(org.bukkit.entity.Player player,
String permission)
Checks if player has a permission node.
|
boolean |
has(String world,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerHas(String, OfflinePlayer, String) instead.
Checks if player has a permission node. (Short for playerHas(...)
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
has(org.bukkit.World world,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerHas(String, OfflinePlayer, String) instead.
Checks if player has a permission node. (Short for playerHas(...)
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
abstract boolean |
hasGroupSupport()
Returns true if the given implementation supports groups.
|
abstract boolean |
hasSuperPermsCompat()
Returns if the permission system is or attempts to be compatible with super-perms.
|
abstract boolean |
isEnabled()
Checks if permission method is enabled.
|
boolean |
playerAdd(org.bukkit.entity.Player player,
String permission)
Add permission to a player ONLY for the world the player is currently on.
|
boolean |
playerAdd(String world,
org.bukkit.OfflinePlayer player,
String permission)
Add permission to a player.
|
abstract boolean |
playerAdd(String world,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerAdd(String, OfflinePlayer, String) instead.
Add permission to a player.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerAdd(org.bukkit.World world,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerAdd(String, OfflinePlayer, String) instead.
Add permission to a player.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerAddGroup(org.bukkit.entity.Player player,
String group)
Add player to a group.
|
boolean |
playerAddGroup(String world,
org.bukkit.OfflinePlayer player,
String group)
Add player to a group.
|
abstract boolean |
playerAddGroup(String world,
String player,
String group)
Deprecated.
As of Vault 1.3.01 use
playerAddGroup(String, OfflinePlayer, String) instead.
Add player to a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerAddGroup(org.bukkit.World world,
String player,
String group)
Deprecated.
As of Vault 1.3.01 use
playerAddGroup(String, OfflinePlayer, String) instead.
Add player to a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerAddTransient(org.bukkit.OfflinePlayer player,
String permission)
Add transient permission to a player.
|
boolean |
playerAddTransient(org.bukkit.entity.Player player,
String permission)
Add transient permission to a player.
|
boolean |
playerAddTransient(String worldName,
org.bukkit.OfflinePlayer player,
String permission)
Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!
|
boolean |
playerAddTransient(String worldName,
org.bukkit.entity.Player player,
String permission)
Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!
|
boolean |
playerAddTransient(String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerAddTransient(OfflinePlayer, String) instead.
Add transient permission to a player.
This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e.
one that only needs the built-in Bukkit API to add transient permissions to a player. Any subclass
implementing a plugin which provides its own API for this needs to override this method. |
boolean |
playerAddTransient(String worldName,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerAddTransient(String, OfflinePlayer, String) instead.
Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL! |
boolean |
playerHas(org.bukkit.entity.Player player,
String permission)
Checks if player has a permission node.
|
boolean |
playerHas(String world,
org.bukkit.OfflinePlayer player,
String permission)
Checks if player has a permission node.
|
abstract boolean |
playerHas(String world,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerHas(String, OfflinePlayer, String) instead.
Checks if player has a permission node.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerHas(org.bukkit.World world,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerHas(String, OfflinePlayer, String) instead.
Checks if player has a permission node.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerInGroup(org.bukkit.entity.Player player,
String group)
Check if player is member of a group.
|
boolean |
playerInGroup(String world,
org.bukkit.OfflinePlayer player,
String group)
Check if player is member of a group.
|
abstract boolean |
playerInGroup(String world,
String player,
String group)
Deprecated.
As of Vault 1.3.01 use
playerInGroup(String, OfflinePlayer, String) instead.
Check if player is member of a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.
This method is known to return unexpected results depending on what permission system is being used. Different permission systems
will store the player groups differently, It is HIGHLY suggested you test your code out first. |
boolean |
playerInGroup(org.bukkit.World world,
String player,
String group)
Deprecated.
As of Vault 1.3.01 use
playerInGroup(String, OfflinePlayer, String) instead.
Check if player is member of a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerRemove(org.bukkit.entity.Player player,
String permission)
Remove permission from a player.
|
boolean |
playerRemove(String world,
org.bukkit.OfflinePlayer player,
String permission)
Remove permission from a player.
|
abstract boolean |
playerRemove(String world,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerRemove(String, OfflinePlayer, String) instead.
Remove permission from a player. |
boolean |
playerRemove(org.bukkit.World world,
String player,
String permission)
Deprecated.
|
boolean |
playerRemoveGroup(org.bukkit.entity.Player player,
String group)
Remove player from a group.
|
boolean |
playerRemoveGroup(String world,
org.bukkit.OfflinePlayer player,
String group)
Remove player from a group.
|
abstract boolean |
playerRemoveGroup(String world,
String player,
String group)
Deprecated.
As of Vault 1.3.01 use
playerRemoveGroup(String, OfflinePlayer, String) instead.
Remove player from a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerRemoveGroup(org.bukkit.World world,
String player,
String group)
Deprecated.
As of Vault 1.3.01 use
playerRemoveGroup(String, OfflinePlayer, String) instead.
Remove player from a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store. |
boolean |
playerRemoveTransient(org.bukkit.OfflinePlayer player,
String permission)
Remove transient permission from a player.
|
boolean |
playerRemoveTransient(org.bukkit.entity.Player player,
String permission)
Remove transient permission from a player.
|
boolean |
playerRemoveTransient(String worldName,
org.bukkit.OfflinePlayer player,
String permission)
Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!
|
boolean |
playerRemoveTransient(String worldName,
org.bukkit.entity.Player player,
String permission)
Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!
|
boolean |
playerRemoveTransient(String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerRemoveTransient(OfflinePlayer, String) instead.
Remove transient permission from a player.
This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e.
one that only needs the built-in Bukkit API to remove transient permissions from a player. Any subclass
implementing a plugin which provides its own API for this needs to override this method. |
boolean |
playerRemoveTransient(String worldName,
String player,
String permission)
Deprecated.
As of Vault 1.3.01 use
playerRemoveTransient(String, OfflinePlayer, String) instead.
Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global! |
public Permission()
public abstract String getName()
public abstract boolean isEnabled()
public abstract boolean hasSuperPermsCompat()
@Deprecated public boolean has(String world, String player, String permission)
playerHas(String, OfflinePlayer, String)
instead.
Checks if player has a permission node. (Short for playerHas(...)
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World nameplayer
- Player namepermission
- Permission node@Deprecated public boolean has(org.bukkit.World world, String player, String permission)
playerHas(String, OfflinePlayer, String)
instead.
Checks if player has a permission node. (Short for playerHas(...)
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World Objectplayer
- Player namepermission
- Permission nodepublic boolean has(org.bukkit.command.CommandSender sender, String permission)
sender
- to check permissions onpermission
- to check forpublic boolean has(org.bukkit.entity.Player player, String permission)
player
- Player Objectpermission
- Permission node@Deprecated public abstract boolean playerHas(String world, String player, String permission)
playerHas(String, OfflinePlayer, String)
instead.
Checks if player has a permission node.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World nameplayer
- Player namepermission
- Permission node@Deprecated public boolean playerHas(org.bukkit.World world, String player, String permission)
playerHas(String, OfflinePlayer, String)
instead.
Checks if player has a permission node.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World Objectplayer
- Player namepermission
- Permission nodepublic boolean playerHas(String world, org.bukkit.OfflinePlayer player, String permission)
world
- String world nameplayer
- to checkpermission
- Permission nodepublic boolean playerHas(org.bukkit.entity.Player player, String permission)
player
- Player Objectpermission
- Permission node@Deprecated public abstract boolean playerAdd(String world, String player, String permission)
playerAdd(String, OfflinePlayer, String)
instead.
Add permission to a player.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World nameplayer
- Player namepermission
- Permission node@Deprecated public boolean playerAdd(org.bukkit.World world, String player, String permission)
playerAdd(String, OfflinePlayer, String)
instead.
Add permission to a player.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World Objectplayer
- Player namepermission
- Permission nodepublic boolean playerAdd(String world, org.bukkit.OfflinePlayer player, String permission)
world
- String world nameplayer
- to add topermission
- Permission nodepublic boolean playerAdd(org.bukkit.entity.Player player, String permission)
player
- Player Objectpermission
- Permission node@Deprecated public boolean playerAddTransient(String player, String permission) throws UnsupportedOperationException
playerAddTransient(OfflinePlayer, String)
instead.
Add transient permission to a player.
This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e.
one that only needs the built-in Bukkit API to add transient permissions to a player. Any subclass
implementing a plugin which provides its own API for this needs to override this method.player
- Player namepermission
- Permission nodeUnsupportedOperationException
public boolean playerAddTransient(org.bukkit.OfflinePlayer player, String permission) throws UnsupportedOperationException
player
- to add topermission
- Permission nodeUnsupportedOperationException
public boolean playerAddTransient(org.bukkit.entity.Player player, String permission)
player
- Player Objectpermission
- Permission nodepublic boolean playerAddTransient(String worldName, org.bukkit.OfflinePlayer player, String permission)
worldName
- to check onplayer
- to add topermission
- to testpublic boolean playerAddTransient(String worldName, org.bukkit.entity.Player player, String permission)
worldName
- to check onplayer
- to checkpermission
- to check for@Deprecated public boolean playerAddTransient(String worldName, String player, String permission)
playerAddTransient(String, OfflinePlayer, String)
instead.
Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!worldName
- to check onplayer
- to checkpermission
- to check@Deprecated public boolean playerRemoveTransient(String worldName, String player, String permission)
playerRemoveTransient(String, OfflinePlayer, String)
instead.
Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!worldName
- to check onplayer
- to checkpermission
- to check forpublic boolean playerRemoveTransient(String worldName, org.bukkit.OfflinePlayer player, String permission)
worldName
- to remove forplayer
- to remove forpermission
- to removepublic boolean playerRemoveTransient(String worldName, org.bukkit.entity.Player player, String permission)
worldName
- to check onplayer
- to checkpermission
- to check for@Deprecated public abstract boolean playerRemove(String world, String player, String permission)
playerRemove(String, OfflinePlayer, String)
instead.
Remove permission from a player.world
- World nameplayer
- Name of Playerpermission
- Permission nodepublic boolean playerRemove(String world, org.bukkit.OfflinePlayer player, String permission)
world
- World nameplayer
- OfflinePlayerpermission
- Permission node@Deprecated public boolean playerRemove(org.bukkit.World world, String player, String permission)
world
- World nameplayer
- Player namepermission
- Permission nodepublic boolean playerRemove(org.bukkit.entity.Player player, String permission)
player
- Player Objectpermission
- Permission node@Deprecated public boolean playerRemoveTransient(String player, String permission)
playerRemoveTransient(OfflinePlayer, String)
instead.
Remove transient permission from a player.
This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e.
one that only needs the built-in Bukkit API to remove transient permissions from a player. Any subclass
implementing a plugin which provides its own API for this needs to override this method.player
- Player namepermission
- Permission nodepublic boolean playerRemoveTransient(org.bukkit.OfflinePlayer player, String permission)
player
- OfflinePlayerpermission
- Permission nodepublic boolean playerRemoveTransient(org.bukkit.entity.Player player, String permission)
player
- Player Objectpermission
- Permission nodepublic abstract boolean groupHas(String world, String group, String permission)
world
- World namegroup
- Group namepermission
- Permission nodepublic boolean groupHas(org.bukkit.World world, String group, String permission)
world
- World Objectgroup
- Group namepermission
- Permission nodepublic abstract boolean groupAdd(String world, String group, String permission)
world
- World namegroup
- Group namepermission
- Permission nodepublic boolean groupAdd(org.bukkit.World world, String group, String permission)
world
- World Objectgroup
- Group namepermission
- Permission nodepublic abstract boolean groupRemove(String world, String group, String permission)
world
- World namegroup
- Group namepermission
- Permission nodepublic boolean groupRemove(org.bukkit.World world, String group, String permission)
world
- World Objectgroup
- Group namepermission
- Permission node@Deprecated public abstract boolean playerInGroup(String world, String player, String group)
playerInGroup(String, OfflinePlayer, String)
instead.
Check if player is member of a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.
This method is known to return unexpected results depending on what permission system is being used. Different permission systems
will store the player groups differently, It is HIGHLY suggested you test your code out first.world
- World nameplayer
- Player namegroup
- Group name@Deprecated public boolean playerInGroup(org.bukkit.World world, String player, String group)
playerInGroup(String, OfflinePlayer, String)
instead.
Check if player is member of a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World Objectplayer
- Player namegroup
- Group namepublic boolean playerInGroup(String world, org.bukkit.OfflinePlayer player, String group)
world
- World Objectplayer
- to checkgroup
- Group namepublic boolean playerInGroup(org.bukkit.entity.Player player, String group)
player
- Player Objectgroup
- Group name@Deprecated public abstract boolean playerAddGroup(String world, String player, String group)
playerAddGroup(String, OfflinePlayer, String)
instead.
Add player to a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World nameplayer
- Player namegroup
- Group name@Deprecated public boolean playerAddGroup(org.bukkit.World world, String player, String group)
playerAddGroup(String, OfflinePlayer, String)
instead.
Add player to a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World Objectplayer
- Player namegroup
- Group namepublic boolean playerAddGroup(String world, org.bukkit.OfflinePlayer player, String group)
world
- String world nameplayer
- to addgroup
- Group namepublic boolean playerAddGroup(org.bukkit.entity.Player player, String group)
player
- Player Objectgroup
- Group name@Deprecated public abstract boolean playerRemoveGroup(String world, String player, String group)
playerRemoveGroup(String, OfflinePlayer, String)
instead.
Remove player from a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World nameplayer
- Player namegroup
- Group name@Deprecated public boolean playerRemoveGroup(org.bukkit.World world, String player, String group)
playerRemoveGroup(String, OfflinePlayer, String)
instead.
Remove player from a group.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World Objectplayer
- Player namegroup
- Group namepublic boolean playerRemoveGroup(String world, org.bukkit.OfflinePlayer player, String group)
world
- World Objectplayer
- to removegroup
- Group namepublic boolean playerRemoveGroup(org.bukkit.entity.Player player, String group)
player
- Player Objectgroup
- Group name@Deprecated public abstract String[] getPlayerGroups(String world, String player)
getPlayerGroups(String, OfflinePlayer)
instead.
Gets the list of groups that this player has.
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World nameplayer
- Player name@Deprecated public String[] getPlayerGroups(org.bukkit.World world, String player)
getPlayerGroups(String, OfflinePlayer)
instead.
Gets the list of groups that this player has
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World Objectplayer
- Player namepublic String[] getPlayerGroups(String world, org.bukkit.OfflinePlayer player)
world
- String world nameplayer
- OfflinePlayerpublic String[] getPlayerGroups(org.bukkit.entity.Player player)
player
- Player Object@Deprecated public abstract String getPrimaryGroup(String world, String player)
getPrimaryGroup(String, OfflinePlayer)
instead.
Gets players primary group
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World nameplayer
- Player name@Deprecated public String getPrimaryGroup(org.bukkit.World world, String player)
getPrimaryGroup(String, OfflinePlayer)
instead.
Gets players primary group
Supports NULL value for World if the permission system registered supports global permissions.
But May return odd values if the servers registered permission system does not have a global permission store.world
- World Objectplayer
- Player namepublic String getPrimaryGroup(String world, org.bukkit.OfflinePlayer player)
world
- String world nameplayer
- to get frompublic String getPrimaryGroup(org.bukkit.entity.Player player)
player
- Player Objectpublic abstract String[] getGroups()
public abstract boolean hasGroupSupport()
Milkbowl, 2014