Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.permissions.PermissionDefault Enum Reference

Public Member Functions

boolean getValue (boolean op)
String toString ()

Static Public Member Functions

static PermissionDefault getByName (String name)
 [static initializer]

Public Attributes

 TRUE =("true")
 FALSE =("false")
 OP =("op", "isop", "operator", "isoperator", "admin", "isadmin")
 NOT_OP =("!op", "notop", "!operator", "notoperator", "!admin", "notadmin")

Detailed Description

Represents the possible default values for permissions

Definition at line 9 of file PermissionDefault.java.

Member Function Documentation

static PermissionDefault org.bukkit.permissions.PermissionDefault.getByName ( String  name)

Looks up a PermissionDefault by name

nameName of the default
Specified value, or null if not found

Definition at line 50 of file PermissionDefault.java.

Referenced by org.bukkit.permissions.Permission.loadPermission().

50  {
51  return lookup.get(name.toLowerCase().replaceAll("[^a-z!]", ""));
52  }
boolean org.bukkit.permissions.PermissionDefault.getValue ( boolean  op)

Calculates the value of this PermissionDefault for the given operator value

opIf the target is op
True if the default should be true, or false

Definition at line 29 of file PermissionDefault.java.

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

29  {
30  switch (this) {
31  case TRUE:
32  return true;
33  case FALSE:
34  return false;
35  case OP:
36  return op;
37  case NOT_OP:
38  return !op;
39  default:
40  return false;
41  }
42  }

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