public class PermissibleBase extends java.lang.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,
java.lang.String name,
boolean value)
Adds a new
PermissionAttachment with a single permission by
name and value |
PermissionAttachment |
addAttachment(Plugin plugin,
java.lang.String name,
boolean value,
int ticks)
Temporarily adds a new
PermissionAttachment with a single
permission by name and value |
void |
clearPermissions() |
java.util.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(java.lang.String inName)
Gets the value of the specified permission, if set.
|
boolean |
isOp()
检查该对象是否为OP.
|
boolean |
isPermissionSet(Permission perm)
Checks if this object contains an override for the specified
Permission |
boolean |
isPermissionSet(java.lang.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)
设置此对象的op状态.
|
public PermissibleBase(ServerOperator opable)
public boolean isOp()
ServerOperator
原文:Checks if this object is a server operator
isOp
在接口中 ServerOperator
public void setOp(boolean value)
ServerOperator
原文:Sets the operator status of this object
setOp
在接口中 ServerOperator
value
- 新op的值(布尔值)public boolean isPermissionSet(java.lang.String name)
Permissible
isPermissionSet
在接口中 Permissible
name
- Name of the permissionpublic boolean isPermissionSet(Permission perm)
Permissible
Permission
isPermissionSet
在接口中 Permissible
perm
- Permission to checkpublic boolean hasPermission(java.lang.String inName)
Permissible
If a permission override is not set on this object, the default value of the permission will be returned.
hasPermission
在接口中 Permissible
inName
- Name of the permissionpublic boolean hasPermission(Permission perm)
Permissible
If a permission override is not set on this object, the default value of the permission will be returned
hasPermission
在接口中 Permissible
perm
- Permission to getpublic PermissionAttachment addAttachment(Plugin plugin, java.lang.String name, boolean value)
Permissible
PermissionAttachment
with a single permission by
name and valueaddAttachment
在接口中 Permissible
plugin
- 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)
Permissible
PermissionAttachment
to this objectaddAttachment
在接口中 Permissible
plugin
- Plugin responsible for this attachment, may not be null
or disabledpublic void removeAttachment(PermissionAttachment attachment)
Permissible
PermissionAttachment
from this objectremoveAttachment
在接口中 Permissible
attachment
- Attachment to removepublic void recalculatePermissions()
Permissible
This should very rarely need to be called from a plugin.
recalculatePermissions
在接口中 Permissible
public void clearPermissions()
public PermissionAttachment addAttachment(Plugin plugin, java.lang.String name, boolean value, int ticks)
Permissible
PermissionAttachment
with a single
permission by name and valueaddAttachment
在接口中 Permissible
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
afterpublic PermissionAttachment addAttachment(Plugin plugin, int ticks)
Permissible
PermissionAttachment
to this
objectaddAttachment
在接口中 Permissible
plugin
- Plugin responsible for this attachment, may not be null
or disabledticks
- Amount of ticks to automatically remove this attachment
afterpublic java.util.Set<PermissionAttachmentInfo> getEffectivePermissions()
Permissible
getEffectivePermissions
在接口中 Permissible