Package org.bukkit.permissions

# Class PermissibleBase

java.lang.Object
org.bukkit.permissions.PermissibleBase

All Implemented Interfaces:
  `Permissible`, `ServerOperator`

public class PermissibleBase extends Object implements Permissible
Base Permissible for use in any Permissible object via proxy or extension

## Constructor Summary

Constructors
Constructor
Description
`PermissibleBase(@Nullable ServerOperator opable)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull PermissionAttachment`
`addAttachment(@NotNull Plugin plugin)`
Adds a new empty `PermissionAttachment` to this object
`@Nullable PermissionAttachment`
`addAttachment(@NotNull Plugin plugin, int ticks)`
Temporarily adds a new empty `PermissionAttachment` to this object
`@NotNull PermissionAttachment`
`addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value)`
Adds a new `PermissionAttachment` with a single permission by name and value
`@Nullable PermissionAttachment`
`addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks)`
Temporarily adds a new `PermissionAttachment` with a single permission by name and value
`void`
`clearPermissions()`
`@NotNull Set<PermissionAttachmentInfo>`
`getEffectivePermissions()`
Gets a set containing all of the permissions currently in effect by this object
`boolean`
`hasPermission(@NotNull String inName)`
Gets the value of the specified permission, if set.
`boolean`
`hasPermission(@NotNull Permission perm)`
Gets the value of the specified permission, if set.
`boolean`
`isOp()`
Checks if this object is a server operator
`boolean`
`isPermissionSet(@NotNull String name)`
Checks if this object contains an override for the specified permission, by fully qualified name
`boolean`
`isPermissionSet(@NotNull Permission perm)`
Checks if this object contains an override for the specified `Permission`
`void`
`recalculatePermissions()`
Recalculates the permissions for this object, if the attachments have changed values.
`void`
`removeAttachment(@NotNull PermissionAttachment attachment)`
Removes the given `PermissionAttachment` from this object
`void`
`setOp(boolean value)`
Sets the operator status of this object

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.bukkit.permissions.Permissible

`permissionValue, permissionValue`

## Constructor Details

### PermissibleBase

public PermissibleBase(@Nullable @Nullable ServerOperator opable)

## Method Details

### isOp

public boolean isOp()
Description copied from interface: `ServerOperator`
Checks if this object is a server operator

Specified by:
  `isOp` in interface `ServerOperator`
Returns:
  true if this is an operator, otherwise false

### setOp

public void setOp(boolean value)
Description copied from interface: `ServerOperator`
Sets the operator status of this object

Specified by:
  `setOp` in interface `ServerOperator`
Parameters:
  `value` - New operator value

### isPermissionSet

public boolean isPermissionSet(@NotNull @NotNull String name)
Description copied from interface: `Permissible`
Checks if this object contains an override for the specified permission, by fully qualified name

Specified by:
  `isPermissionSet` in interface `Permissible`
Parameters:
  `name` - Name of the permission
Returns:
  true if the permission is set, otherwise false

### isPermissionSet

public boolean isPermissionSet(@NotNull @NotNull Permission perm)
Description copied from interface: `Permissible`
Checks if this object contains an override for the specified `Permission`

Specified by:
  `isPermissionSet` in interface `Permissible`
Parameters:
  `perm` - Permission to check
Returns:
  true if the permission is set, otherwise false

### hasPermission

public boolean hasPermission(@NotNull @NotNull String inName)
Description copied from interface: `Permissible`
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.

Specified by:
  `hasPermission` in interface `Permissible`
Parameters:
  `inName` - Name of the permission
Returns:
  Value of the permission

### hasPermission

public boolean hasPermission(@NotNull @NotNull Permission perm)
Description copied from interface: `Permissible`
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

Specified by:
  `hasPermission` in interface `Permissible`
Parameters:
  `perm` - Permission to get
Returns:
  Value of the permission

### addAttachment

@NotNull public @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value)
Description copied from interface: `Permissible`
Adds a new `PermissionAttachment` with a single permission by name and value

Specified by:
  `addAttachment` in interface `Permissible`
Parameters:
  `plugin` - Plugin responsible for this attachment, may not be null or disabled
  `name` - Name of the permission to attach
  `value` - Value of the permission
Returns:
  The PermissionAttachment that was just created

### addAttachment

@NotNull public @NotNull PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin)
Description copied from interface: `Permissible`
Adds a new empty `PermissionAttachment` to this object

Specified by:
  `addAttachment` in interface `Permissible`
Parameters:
  `plugin` - Plugin responsible for this attachment, may not be null or disabled
Returns:
  The PermissionAttachment that was just created

### removeAttachment

public void removeAttachment(@NotNull @NotNull PermissionAttachment attachment)
Description copied from interface: `Permissible`
Removes the given `PermissionAttachment` from this object

Specified by:
  `removeAttachment` in interface `Permissible`
Parameters:
  `attachment` - Attachment to remove

### recalculatePermissions

public void recalculatePermissions()
Description copied from interface: `Permissible`
Recalculates the permissions for this object, if the attachments have changed values.

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

Specified by:
  `recalculatePermissions` in interface `Permissible`

### clearPermissions

public void clearPermissions()

### addAttachment

@Nullable public @Nullable PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, boolean value, int ticks)
Description copied from interface: `Permissible`
Temporarily adds a new `PermissionAttachment` with a single permission by name and value

Specified by:
  `addAttachment` in interface `Permissible`
Parameters:
  `plugin` - Plugin responsible for this attachment, may not be null or disabled
  `name` - Name of the permission to attach
  `value` - Value of the permission
  `ticks` - Amount of ticks to automatically remove this attachment after
Returns:
  The PermissionAttachment that was just created

### addAttachment

@Nullable public @Nullable PermissionAttachment addAttachment(@NotNull @NotNull Plugin plugin, int ticks)
Description copied from interface: `Permissible`
Temporarily adds a new empty `PermissionAttachment` to this object

Specified by:
  `addAttachment` in interface `Permissible`
Parameters:
  `plugin` - Plugin responsible for this attachment, may not be null or disabled
  `ticks` - Amount of ticks to automatically remove this attachment after
Returns:
  The PermissionAttachment that was just created

### getEffectivePermissions

@NotNull public @NotNull Set<PermissionAttachmentInfo> getEffectivePermissions()
Description copied from interface: `Permissible`
Gets a set containing all of the permissions currently in effect by this object

Specified by:
  `getEffectivePermissions` in interface `Permissible`
Returns:
  Set of currently effective permissions