|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Permissible
Represents an object that may be assigned permissions
Method Summary | |
---|---|
PermissionAttachment |
addAttachment(Plugin plugin)
Adds a new empty PermissionAttachment to this object |
PermissionAttachment |
addAttachment(Plugin plugin,
int ticks)
Temporarily adds a new empty PermissionAttachment to this object |
PermissionAttachment |
addAttachment(Plugin plugin,
String name,
boolean value)
Adds a new PermissionAttachment with a single permission by name and value |
PermissionAttachment |
addAttachment(Plugin plugin,
String name,
boolean value,
int ticks)
Temporarily adds a new PermissionAttachment with a single permission by name and value |
Set<PermissionAttachmentInfo> |
getEffectivePermissions()
Gets a set containing all of the permissions currently in effect by this object |
boolean |
hasPermission(Permission perm)
Gets the value of the specified permission, if set. |
boolean |
hasPermission(String name)
Gets the value of the specified permission, if set. |
boolean |
isPermissionSet(Permission perm)
Checks if this object contains an override for the specified Permission |
boolean |
isPermissionSet(String name)
Checks if this object contains an override for the specified permission, by fully qualified name |
void |
recalculatePermissions()
Recalculates the permissions for this object, if the attachments have changed values. |
void |
removeAttachment(PermissionAttachment attachment)
Removes the given PermissionAttachment from this object |
Methods inherited from interface org.bukkit.permissions.ServerOperator |
---|
isOp, setOp |
Method Detail |
---|
boolean isPermissionSet(String name)
name
- Name of the permission
boolean isPermissionSet(Permission perm)
Permission
perm
- Permission to check
boolean hasPermission(String name)
If a permission override is not set on this object, the default value of the permission will be returned.
name
- Name of the permission
boolean hasPermission(Permission perm)
If a permission override is not set on this object, the default value of the permission will be returned
perm
- Permission to get
PermissionAttachment addAttachment(Plugin plugin, String name, boolean value)
PermissionAttachment
with a single permission by name and value
plugin
- Plugin responsible for this attachment, may not be null or disabledname
- Name of the permission to attachvalue
- Value of the permission
PermissionAttachment addAttachment(Plugin plugin)
PermissionAttachment
to this object
plugin
- Plugin responsible for this attachment, may not be null or disabled
PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks)
PermissionAttachment
with a single permission by name and value
plugin
- Plugin responsible for this attachment, may not be null or disabledname
- Name of the permission to attachvalue
- Value of the permissionticks
- Amount of ticks to automatically remove this attachment after
PermissionAttachment addAttachment(Plugin plugin, int ticks)
PermissionAttachment
to this object
plugin
- Plugin responsible for this attachment, may not be null or disabledticks
- Amount of ticks to automatically remove this attachment after
void removeAttachment(PermissionAttachment attachment)
PermissionAttachment
from this object
attachment
- Attachment to remove
IllegalArgumentException
- Thrown when the specified attachment isn't part of this objectvoid recalculatePermissions()
This should very rarely need to be called from a plugin.
Set<PermissionAttachmentInfo> getEffectivePermissions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |