Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.permissions.Permissible Interface Reference

Represents an object that may be assigned permissions. More...

+ Inheritance diagram for org.bukkit.permissions.Permissible:
+ Collaboration diagram for org.bukkit.permissions.Permissible:

Public Member Functions

boolean isPermissionSet (String name)
 Checks if this object contains an override for the specified permission, by fully qualified name.
 
boolean isPermissionSet (Permission perm)
 Checks if this object contains an override for the specified Permission.
 
boolean hasPermission (String name)
 Gets the value of the specified permission, if set.
 
boolean hasPermission (Permission perm)
 Gets the value of the specified permission, if set.
 
PermissionAttachment addAttachment (Plugin plugin, String name, boolean value)
 Adds a new PermissionAttachment with a single permission by name and value.
 
PermissionAttachment addAttachment (Plugin plugin)
 Adds a new empty PermissionAttachment to this object.
 
PermissionAttachment addAttachment (Plugin plugin, String name, boolean value, int ticks)
 Temporarily adds a new PermissionAttachment with a single permission by name and value.
 
PermissionAttachment addAttachment (Plugin plugin, int ticks)
 Temporarily adds a new empty PermissionAttachment to this object.
 
void removeAttachment (PermissionAttachment attachment)
 Removes the given PermissionAttachment from this object.
 
void recalculatePermissions ()
 Recalculates the permissions for this object, if the attachments have changed values.
 
Set< PermissionAttachmentInfogetEffectivePermissions ()
 Gets a set containing all of the permissions currently in effect by this object.
 
- Public Member Functions inherited from org.bukkit.permissions.ServerOperator
boolean isOp ()
 Checks if this object is a server operator.
 
void setOp (boolean value)
 Sets the operator status of this object.
 

Detailed Description

Represents an object that may be assigned permissions.

Definition at line 9 of file Permissible.java.

Member Function Documentation

PermissionAttachment org.bukkit.permissions.Permissible.addAttachment ( Plugin  plugin,
String  name,
boolean  value 
)

Adds a new PermissionAttachment with a single permission by name and value.

Parameters
pluginPlugin responsible for this attachment, may not be null or disabled
nameName of the permission to attach
valueValue of the permission
Returns
The PermissionAttachment that was just created
PermissionAttachment org.bukkit.permissions.Permissible.addAttachment ( Plugin  plugin)

Adds a new empty PermissionAttachment to this object.

Parameters
pluginPlugin responsible for this attachment, may not be null or disabled
Returns
The PermissionAttachment that was just created
PermissionAttachment org.bukkit.permissions.Permissible.addAttachment ( Plugin  plugin,
String  name,
boolean  value,
int  ticks 
)

Temporarily adds a new PermissionAttachment with a single permission by name and value.

Parameters
pluginPlugin responsible for this attachment, may not be null or disabled
nameName of the permission to attach
valueValue of the permission
ticksAmount of ticks to automatically remove this attachment after
Returns
The PermissionAttachment that was just created
PermissionAttachment org.bukkit.permissions.Permissible.addAttachment ( Plugin  plugin,
int  ticks 
)

Temporarily adds a new empty PermissionAttachment to this object.

Parameters
pluginPlugin responsible for this attachment, may not be null or disabled
ticksAmount of ticks to automatically remove this attachment after
Returns
The PermissionAttachment that was just created
Set<PermissionAttachmentInfo> org.bukkit.permissions.Permissible.getEffectivePermissions ( )

Gets a set containing all of the permissions currently in effect by this object.

Returns
Set of currently effective permissions
boolean org.bukkit.permissions.Permissible.hasPermission ( String  name)

Gets the value of the specified permission, if set.

If a permission override is not set on this object, the default value of the permission will be returned.

Parameters
nameName of the permission
Returns
Value of the permission

Referenced by org.bukkit.help.IndexHelpTopic.canSee(), org.bukkit.help.GenericCommandHelpTopic.canSee(), org.bukkit.command.defaults.TimeCommand.execute(), and org.bukkit.command.Command.testPermissionSilent().

boolean org.bukkit.permissions.Permissible.hasPermission ( Permission  perm)

Gets the value of the specified permission, if set.

If a permission override is not set on this object, the default value of the permission will be returned

Parameters
permPermission to get
Returns
Value of the permission
boolean org.bukkit.permissions.Permissible.isPermissionSet ( String  name)

Checks if this object contains an override for the specified permission, by fully qualified name.

Parameters
nameName of the permission
Returns
true if the permission is set, otherwise false
boolean org.bukkit.permissions.Permissible.isPermissionSet ( Permission  perm)

Checks if this object contains an override for the specified Permission.

Parameters
permPermission to check
Returns
true if the permission is set, otherwise false
void org.bukkit.permissions.Permissible.recalculatePermissions ( )

Recalculates the permissions for this object, if the attachments have changed values.

This should very rarely need to be called from a plugin.

Referenced by org.bukkit.permissions.PermissionAttachment.setPermission(), and org.bukkit.permissions.PermissionAttachment.unsetPermission().

void org.bukkit.permissions.Permissible.removeAttachment ( PermissionAttachment  attachment)

Removes the given PermissionAttachment from this object.

Parameters
attachmentAttachment to remove
Exceptions
IllegalArgumentExceptionThrown when the specified attachment isn't part of this object

Referenced by org.bukkit.permissions.PermissionAttachment.remove().


The documentation for this interface was generated from the following file: