Package com.sk89q.worldguard.domains
Class PlayerDomain
java.lang.Object
com.sk89q.worldguard.domains.PlayerDomain
- All Implemented Interfaces:
Domain,ChangeTracked
Stores players (only) in a domain.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance.PlayerDomain(PlayerDomain domain)Create a new instance.PlayerDomain(String[] names)Deprecated.names are deprecated in favor of UUIDs in MC 1.7+ -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlayer(LocalPlayer player)Add the given player to the domain, identified by the player's UUID.voidDeprecated.names are deprecated in favor of UUIDs in MC 1.7+voidAdd the given player to the domain, identified by the player's UUID.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.Deprecated.names are deprecated in favor of UUIDs in MC 1.7+Get the set of player UUIDs.booleanisDirty()Tests whether changes have been made.voidremovePlayer(LocalPlayer player)Remove the given player from the domain, identified by either the player's name, the player's unique ID, or both.voidremovePlayer(String name)Deprecated.names are deprecated in favor of UUIDs in MC 1.7+voidremovePlayer(UUID uuid)Remove the given player from the domain, identified by the player's UUID.voidsetDirty(boolean dirty)Set whether changes have been made.intsize()Get the number of entries.toString()
-
Constructor Details
-
PlayerDomain
public PlayerDomain()Create a new instance. -
PlayerDomain
Create a new instance.- Parameters:
domain- the domain to copy values from
-
PlayerDomain
Deprecated.names are deprecated in favor of UUIDs in MC 1.7+Create a new instance with the given names.- Parameters:
names- an array of names
-
-
Method Details
-
addPlayer
Deprecated.names are deprecated in favor of UUIDs in MC 1.7+Add the given player to the domain, identified by the player's name.- Parameters:
name- the name of the player
-
addPlayer
Add the given player to the domain, identified by the player's UUID.- Parameters:
uniqueId- the UUID of the player
-
addPlayer
Add the given player to the domain, identified by the player's UUID.- Parameters:
player- the player
-
removePlayer
Deprecated.names are deprecated in favor of UUIDs in MC 1.7+Remove the given player from the domain, identified by the player's name.- Parameters:
name- the name of the player
-
removePlayer
Remove the given player from the domain, identified by the player's UUID.- Parameters:
uuid- the UUID of the player
-
removePlayer
Remove the given player from the domain, identified by either the player's name, the player's unique ID, or both.- Parameters:
player- the player
-
contains
Description copied from interface:DomainReturns true if a domain contains a player. -
getPlayers
Deprecated.names are deprecated in favor of UUIDs in MC 1.7+Get the set of player names.- Returns:
- the set of player names
-
getUniqueIds
Get the set of player UUIDs.- Returns:
- the set of player UUIDs
-
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
-