public class PermissibleBase extends Object implements Permissible
| コンストラクタと説明 |
|---|
PermissibleBase(ServerOperator opable) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
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 |
void |
clearPermissions() |
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 inName)
Gets the value of the specified permission, if set.
|
boolean |
isOp()
Checks if this object is a server operator
|
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 |
void |
setOp(boolean value)
Sets the operator status of this object
|
public PermissibleBase(ServerOperator opable)
public boolean isOp()
ServerOperatorisOp インタフェース内 ServerOperatorpublic void setOp(boolean value)
ServerOperatorsetOp インタフェース内 ServerOperatorvalue - New operator valuepublic boolean isPermissionSet(String name)
PermissibleisPermissionSet インタフェース内 Permissiblename - Name of the permissionpublic boolean isPermissionSet(Permission perm)
PermissiblePermissionisPermissionSet インタフェース内 Permissibleperm - Permission to checkpublic boolean hasPermission(String inName)
PermissibleIf a permission override is not set on this object, the default value of the permission will be returned.
hasPermission インタフェース内 PermissibleinName - Name of the permissionpublic boolean hasPermission(Permission perm)
PermissibleIf a permission override is not set on this object, the default value of the permission will be returned
hasPermission インタフェース内 Permissibleperm - Permission to getpublic PermissionAttachment addAttachment(Plugin plugin, String name, boolean value)
PermissiblePermissionAttachment with a single permission by
name and valueaddAttachment インタフェース内 Permissibleplugin - Plugin responsible for this attachment, may not be null
or disabledname - Name of the permission to attachvalue - Value of the permissionpublic PermissionAttachment addAttachment(Plugin plugin)
PermissiblePermissionAttachment to this objectaddAttachment インタフェース内 Permissibleplugin - Plugin responsible for this attachment, may not be null
or disabledpublic void removeAttachment(PermissionAttachment attachment)
PermissiblePermissionAttachment from this objectremoveAttachment インタフェース内 Permissibleattachment - Attachment to removepublic void recalculatePermissions()
PermissibleThis should very rarely need to be called from a plugin.
recalculatePermissions インタフェース内 Permissiblepublic void clearPermissions()
public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks)
PermissiblePermissionAttachment with a single
permission by name and valueaddAttachment インタフェース内 Permissibleplugin - 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
afterpublic PermissionAttachment addAttachment(Plugin plugin, int ticks)
PermissiblePermissionAttachment to this
objectaddAttachment インタフェース内 Permissibleplugin - Plugin responsible for this attachment, may not be null
or disabledticks - Amount of ticks to automatically remove this attachment
afterpublic Set<PermissionAttachmentInfo> getEffectivePermissions()
PermissiblegetEffectivePermissions インタフェース内 PermissibleCopyright © 2016. All rights reserved.