Package com.sk89q.worldguard.domains
Class GroupDomain
java.lang.Object
com.sk89q.worldguard.domains.GroupDomain
- All Implemented Interfaces:
Domain
,ChangeTracked
Contains groups in a domain.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance.GroupDomain
(GroupDomain domain) Create a new instance with copies from another domain.GroupDomain
(String[] groups) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the name of the group to the domain.void
clear()
Remove all entries.boolean
contains
(LocalPlayer player) Returns true if a domain contains a player.boolean
Returns true if a domain contains a player.boolean
Returns true if a domain contains a player.Get the set of group names.boolean
isDirty()
Tests whether changes have been made.void
removeGroup
(String name) Remove the given group from the domain.void
setDirty
(boolean dirty) Set whether changes have been made.int
size()
Get the number of entries.toString()
-
Constructor Details
-
GroupDomain
public GroupDomain()Create a new instance. -
GroupDomain
Create a new instance with copies from another domain.- Parameters:
domain
- the domain to copy values from
-
GroupDomain
Create a new instance.- Parameters:
groups
- an array of groups
-
-
Method Details
-
addGroup
Add the name of the group to the domain.- Parameters:
name
- the name of the group.
-
removeGroup
Remove the given group from the domain.- Parameters:
name
- the name of the group
-
contains
Description copied from interface:Domain
Returns true if a domain contains a player. -
getGroups
Get the set of group names.- Returns:
- the set of group names
-
contains
Description copied from interface:Domain
Returns true if a domain contains a player.This method doesn't check for groups!
-
contains
Description copied from interface:Domain
Returns true if a domain contains a player.This method doesn't check for groups!
-
size
public int size()Description copied from interface:Domain
Get the number of entries. -
clear
public void clear()Description copied from interface:Domain
Remove all entries. -
isDirty
public boolean isDirty()Description copied from interface:ChangeTracked
Tests whether changes have been made.- Specified by:
isDirty
in interfaceChangeTracked
- Returns:
- true if changes have been made
-
setDirty
public void setDirty(boolean dirty) Description copied from interface:ChangeTracked
Set whether changes have been made.- Specified by:
setDirty
in interfaceChangeTracked
- Parameters:
dirty
- a new dirty state
-
toString
-