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

Holds information about a permission attachment on a Permissible object. More...

Public Member Functions

 PermissionAttachment (Plugin plugin, Permissible Permissible)
 
Plugin getPlugin ()
 Gets the plugin responsible for this attachment.
 
void setRemovalCallback (PermissionRemovedExecutor ex)
 Sets an object to be called for when this attachment is removed from a Permissible.
 
PermissionRemovedExecutor getRemovalCallback ()
 Gets the class that was previously set to be called when this attachment was removed from a Permissible.
 
Permissible getPermissible ()
 Gets the Permissible that this is attached to.
 
Map< String, Boolean > getPermissions ()
 Gets a copy of all set permissions and values contained within this attachment.
 
void setPermission (String name, boolean value)
 Sets a permission to the given value, by its fully qualified name.
 
void setPermission (Permission perm, boolean value)
 Sets a permission to the given value.
 
void unsetPermission (String name)
 Removes the specified permission from this attachment.
 
void unsetPermission (Permission perm)
 Removes the specified permission from this attachment.
 
boolean remove ()
 Removes this attachment from its registered Permissible.
 

Detailed Description

Holds information about a permission attachment on a Permissible object.

Definition at line 10 of file PermissionAttachment.java.

Constructor & Destructor Documentation

org.bukkit.permissions.PermissionAttachment.PermissionAttachment ( Plugin  plugin,
Permissible  Permissible 
)

Member Function Documentation

Permissible org.bukkit.permissions.PermissionAttachment.getPermissible ( )

Gets the Permissible that this is attached to.

Returns
Permissible containing this attachment

Definition at line 59 of file PermissionAttachment.java.

Map<String, Boolean> org.bukkit.permissions.PermissionAttachment.getPermissions ( )

Gets a copy of all set permissions and values contained within this attachment.

This map may be modified but will not affect the attachment, as it is a copy.

Returns
Copy of all permissions and values expressed by this attachment

Definition at line 70 of file PermissionAttachment.java.

Plugin org.bukkit.permissions.PermissionAttachment.getPlugin ( )

Gets the plugin responsible for this attachment.

Returns
Plugin responsible for this permission attachment

Definition at line 32 of file PermissionAttachment.java.

PermissionRemovedExecutor org.bukkit.permissions.PermissionAttachment.getRemovalCallback ( )

Gets the class that was previously set to be called when this attachment was removed from a Permissible.

May be null.

Returns
Object to be called when this is removed

Definition at line 50 of file PermissionAttachment.java.

Referenced by org.bukkit.permissions.PermissibleBase.removeAttachment().

boolean org.bukkit.permissions.PermissionAttachment.remove ( )

Removes this attachment from its registered Permissible.

Returns
true if the permissible was removed successfully, false if it did not exist

Definition at line 125 of file PermissionAttachment.java.

References org.bukkit.permissions.Permissible.removeAttachment().

Referenced by org.bukkit.permissions.PermissibleBase.addAttachment().

void org.bukkit.permissions.PermissionAttachment.setPermission ( String  name,
boolean  value 
)

Sets a permission to the given value, by its fully qualified name.

Parameters
nameName of the permission
valueNew value of the permission

Definition at line 80 of file PermissionAttachment.java.

References org.bukkit.permissions.Permissible.recalculatePermissions().

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

void org.bukkit.permissions.PermissionAttachment.setPermission ( Permission  perm,
boolean  value 
)

Sets a permission to the given value.

Parameters
permPermission to set
valueNew value of the permission

Definition at line 91 of file PermissionAttachment.java.

References org.bukkit.permissions.Permission.getName(), org.bukkit.permissions.Permissible.recalculatePermissions(), and org.bukkit.permissions.PermissionAttachment.setPermission().

void org.bukkit.permissions.PermissionAttachment.setRemovalCallback ( PermissionRemovedExecutor  ex)

Sets an object to be called for when this attachment is removed from a Permissible.

May be null.

Parameters
exObject to be called when this is removed

Definition at line 41 of file PermissionAttachment.java.

void org.bukkit.permissions.PermissionAttachment.unsetPermission ( String  name)

Removes the specified permission from this attachment.

If the permission does not exist in this attachment, nothing will happen.

Parameters
nameName of the permission to remove

Definition at line 103 of file PermissionAttachment.java.

References org.bukkit.permissions.Permissible.recalculatePermissions().

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

void org.bukkit.permissions.PermissionAttachment.unsetPermission ( Permission  perm)

Removes the specified permission from this attachment.

If the permission does not exist in this attachment, nothing will happen.

Parameters
permPermission to remove

Definition at line 115 of file PermissionAttachment.java.

References org.bukkit.permissions.Permission.getName(), org.bukkit.permissions.Permissible.recalculatePermissions(), and org.bukkit.permissions.PermissionAttachment.unsetPermission().


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