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 TypeMethodDescriptionvoidAdd the name of the group to the domain.voidclear()Remove all entries.booleancontains(LocalPlayer player)Returns true if a domain contains a player.booleanReturns true if a domain contains a player.booleanReturns true if a domain contains a player.Get the set of group names.booleanisDirty()Tests whether changes have been made.voidremoveGroup(String name)Remove the given group from the domain.voidsetDirty(boolean dirty)Set whether changes have been made.intsize()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:DomainReturns 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:DomainReturns true if a domain contains a player.This method doesn't check for groups!
-
contains
Description copied from interface:DomainReturns true if a domain contains a player.This method doesn't check for groups!
-
size
public int size()Description copied from interface:DomainGet the number of entries. -
clear
public void clear()Description copied from interface:DomainRemove all entries. -
isDirty
public boolean isDirty()Description copied from interface:ChangeTrackedTests whether changes have been made.- Specified by:
isDirtyin interfaceChangeTracked- Returns:
- true if changes have been made
-
setDirty
public void setDirty(boolean dirty)Description copied from interface:ChangeTrackedSet whether changes have been made.- Specified by:
setDirtyin interfaceChangeTracked- Parameters:
dirty- a new dirty state
-
toString
-