|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.kuzi117.PermGUI.GUIPermissions
public class GUIPermissions
| Method Summary | |
|---|---|
boolean |
addPermissionsOrdered(java.lang.String pluginName,
java.util.List<java.lang.String> permissionsToAdd,
java.util.List<java.lang.String> descriptionsToAdd)
Adds permissions for your plugin in an orderly fashion. |
boolean |
addPermissionsUnordered(java.lang.String pluginName,
java.util.HashMap<java.lang.String,java.lang.String> permissionsToAdd)
Adds permissions in an order that is NOT guaranteed. |
boolean |
removePermissions(java.lang.String pluginName,
java.util.Set<java.lang.String> permissionsToRemove)
Removes permissions for your plugin. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean addPermissionsUnordered(java.lang.String pluginName,
java.util.HashMap<java.lang.String,java.lang.String> permissionsToAdd)
Used when the permissions for a plugin do not need to maintain a specific order when being added to the GUI.
This does not mean that the permissions will not be in the order they are added just that the order cannot be and is not guaranteed.
Multiple attempts to add will be ignored unless removePermissions(java.lang.String, java.util.Set is used first.
pluginName - Name of plugin that is adding permissions. Use toString() here. Used to register a plugin.permissionsToAdd - HashMaptrue if permissions added. Returns false if adding permissions denied (if permissions already added).
public boolean addPermissionsOrdered(java.lang.String pluginName,
java.util.List<java.lang.String> permissionsToAdd,
java.util.List<java.lang.String> descriptionsToAdd)
Multiple attempts to add will be ignored unless removePermissions(java.lang.String, java.util.Set is used first.
It should also be noted that if you declare less descriptions than permissions, or vice versa, then an appropriate message will be appended to the end of the smaller list until their sizes are equal.
pluginName - Name of plugin that is adding permissions. Use toString() here. Used to register a plugin.permissionsToAdd - List of permissions in order the order they should be added to the GUI.descriptionsToAdd - List of descriptions in an order that correlates to the order of permissions in permissionsToAdd.
true if permissions added. Returns false if adding permissions denied (if permissions already added).
public boolean removePermissions(java.lang.String pluginName,
java.util.Set<java.lang.String> permissionsToRemove)
addPermissionsOrdered(java.lang.String, java.util.List, java.util.List) or addPermissionsUnordered(java.lang.String, java.util.HashMap) is used first.
pluginName - Name of plugin that is removing permissions. Use toString() here.permissionsToRemove - Set of permissions to remove from the GUI.
true if permissions removed. Returns false if removing permissions denied (if permissions already removed or never added).
Returns false if at least one of the requested permissions was not registered.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||