Pulling all pending Bukkit-JavaDoc changes
A special thanks goes to @aerouk for almost all of the changes found here. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -12,7 +12,8 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
/**
|
||||
* Represents a unique permission that may be attached to a {@link Permissible}
|
||||
* Represents a unique permission that may be attached to a {@link
|
||||
* Permissible}
|
||||
*/
|
||||
public class Permission {
|
||||
public static final PermissionDefault DEFAULT_PERMISSION = PermissionDefault.OP;
|
||||
@@ -77,7 +78,8 @@ public class Permission {
|
||||
/**
|
||||
* Gets the children of this permission.
|
||||
* <p>
|
||||
* If you change this map in any form, you must call {@link #recalculatePermissibles()} to recalculate all {@link Permissible}s
|
||||
* If you change this map in any form, you must call {@link
|
||||
* #recalculatePermissibles()} to recalculate all {@link Permissible}s
|
||||
*
|
||||
* @return Permission children
|
||||
*/
|
||||
@@ -97,8 +99,10 @@ public class Permission {
|
||||
/**
|
||||
* Sets the default value of this permission.
|
||||
* <p>
|
||||
* This will not be saved to disk, and is a temporary operation until the server reloads permissions.
|
||||
* Changing this default will cause all {@link Permissible}s that contain this permission to recalculate their permissions
|
||||
* This will not be saved to disk, and is a temporary operation until the
|
||||
* server reloads permissions. Changing this default will cause all {@link
|
||||
* Permissible}s that contain this permission to recalculate their
|
||||
* permissions
|
||||
*
|
||||
* @param value The new default to set
|
||||
*/
|
||||
@@ -123,7 +127,8 @@ public class Permission {
|
||||
/**
|
||||
* Sets the description of this permission.
|
||||
* <p>
|
||||
* This will not be saved to disk, and is a temporary operation until the server reloads permissions.
|
||||
* This will not be saved to disk, and is a temporary operation until the
|
||||
* server reloads permissions.
|
||||
*
|
||||
* @param value The new description to set
|
||||
*/
|
||||
@@ -136,7 +141,8 @@ public class Permission {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a set containing every {@link Permissible} that has this permission.
|
||||
* Gets a set containing every {@link Permissible} that has this
|
||||
* permission.
|
||||
* <p>
|
||||
* This set cannot be modified.
|
||||
*
|
||||
@@ -149,7 +155,8 @@ public class Permission {
|
||||
/**
|
||||
* Recalculates all {@link Permissible}s that contain this permission.
|
||||
* <p>
|
||||
* This should be called after modifying the children, and is automatically called after modifying the default value
|
||||
* This should be called after modifying the children, and is
|
||||
* automatically called after modifying the default value
|
||||
*/
|
||||
public void recalculatePermissibles() {
|
||||
Set<Permissible> perms = getPermissibles();
|
||||
@@ -164,7 +171,8 @@ public class Permission {
|
||||
/**
|
||||
* Adds this permission to the specified parent permission.
|
||||
* <p>
|
||||
* If the parent permission does not exist, it will be created and registered.
|
||||
* If the parent permission does not exist, it will be created and
|
||||
* registered.
|
||||
*
|
||||
* @param name Name of the parent permission
|
||||
* @param value The value to set this permission to
|
||||
@@ -198,12 +206,18 @@ public class Permission {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a list of Permissions from a map of data, usually used from retrieval from a yaml file.
|
||||
* Loads a list of Permissions from a map of data, usually used from
|
||||
* retrieval from a yaml file.
|
||||
* <p>
|
||||
* The data may contain a list of name:data, where the data contains the following keys:
|
||||
* default: Boolean true or false. If not specified, false.
|
||||
* children: Map<String, Boolean> of child permissions. If not specified, empty list.
|
||||
* description: Short string containing a very small description of this description. If not specified, empty string.
|
||||
* The data may contain a list of name:data, where the data contains the
|
||||
* following keys:
|
||||
* <ul>
|
||||
* <li>default: Boolean true or false. If not specified, false.
|
||||
* <li>children: Map<String, Boolean> of child permissions. If not
|
||||
* specified, empty list.
|
||||
* <li>description: Short string containing a very small description of
|
||||
* this description. If not specified, empty string.
|
||||
* </ul>
|
||||
*
|
||||
* @param data Map of permissions
|
||||
* @param error An error message to show if a permission is invalid.
|
||||
@@ -225,12 +239,16 @@ public class Permission {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a Permission from a map of data, usually used from retrieval from a yaml file.
|
||||
* Loads a Permission from a map of data, usually used from retrieval from
|
||||
* a yaml file.
|
||||
* <p>
|
||||
* The data may contain the following keys:
|
||||
* default: Boolean true or false. If not specified, false.
|
||||
* children: Map<String, Boolean> of child permissions. If not specified, empty list.
|
||||
* description: Short string containing a very small description of this description. If not specified, empty string.
|
||||
* <ul>
|
||||
* <li>default: Boolean true or false. If not specified, false.
|
||||
* <li>children: Map<String, Boolean> of child permissions. If not
|
||||
* specified, empty list.
|
||||
* <li>description: Short string containing a very small description of
|
||||
* this description. If not specified, empty string.
|
||||
*
|
||||
* @param name Name of the permission
|
||||
* @param data Map of keys
|
||||
@@ -241,12 +259,17 @@ public class Permission {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a Permission from a map of data, usually used from retrieval from a yaml file.
|
||||
* Loads a Permission from a map of data, usually used from retrieval from
|
||||
* a yaml file.
|
||||
* <p>
|
||||
* The data may contain the following keys:
|
||||
* default: Boolean true or false. If not specified, false.
|
||||
* children: Map<String, Boolean> of child permissions. If not specified, empty list.
|
||||
* description: Short string containing a very small description of this description. If not specified, empty string.
|
||||
* <ul>
|
||||
* <li>default: Boolean true or false. If not specified, false.
|
||||
* <li>children: Map<String, Boolean> of child permissions. If not
|
||||
* specified, empty list.
|
||||
* <li>description: Short string containing a very small description of
|
||||
* this description. If not specified, empty string.
|
||||
* </ul>
|
||||
*
|
||||
* @param name Name of the permission
|
||||
* @param data Map of keys
|
||||
|
||||
Reference in New Issue
Block a user