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 TypeMethodDescriptionvoid
addPlayer
(LocalPlayer player) Add the given player to the domain, identified by the player's UUID.void
Deprecated.names are deprecated in favor of UUIDs in MC 1.7+void
Add the given player to the domain, identified by the player's UUID.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.Deprecated.names are deprecated in favor of UUIDs in MC 1.7+Get the set of player UUIDs.boolean
isDirty()
Tests whether changes have been made.void
removePlayer
(LocalPlayer player) Remove the given player from the domain, identified by either the player's name, the player's unique ID, or both.void
removePlayer
(String name) Deprecated.names are deprecated in favor of UUIDs in MC 1.7+void
removePlayer
(UUID uuid) Remove the given player from the domain, identified by the player's UUID.void
setDirty
(boolean dirty) Set whether changes have been made.int
size()
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:Domain
Returns 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: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
-