Group Management

This is a short doc on getting, adding, and removing group instances.

Group Retrieval

Getting Individual Groups

Getting groups is very simple. You will need a group name.

GroupManage.getGroup(name);

Getting All Groups

Getting all the groups is probably easier.

GroupManager.getGroups();

Getting Groups that have a Claim

You can retrieve a list of groups that have a claim added.

GroupManager.getGroupsForClaim(claim);

Group Addition and Removal

Adding Groups

First you need a group instance:

Group group = new Group(name, ownerUUID);

Yes, you're required an owner uuid. The name is what is used for later retrieval. Now add it to the list:

GroupManager.addGroup(group);

Removing Groups

Also simple. You'll need to get a group instance.

GroupManager.removeGroup(group);

Renaming Groups

You can do this yourself, but there's a built in method.

GroupManager.renameGroup(oldName, newName);

Tagging Groups

You can set the tags of groups like so:

GroupManager.setGroupTag(group, tag);

If the operation succeeds the method will return true. Otherwise, it means another group has that tag.