public class PlayerDomain extends java.lang.Object implements Domain, ChangeTracked
| Constructor and Description |
|---|
PlayerDomain()
Create a new instance.
|
PlayerDomain(PlayerDomain domain)
Create a new instance.
|
PlayerDomain(java.lang.String[] names)
Deprecated.
names are deprecated in favor of UUIDs in MC 1.7+
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPlayer(LocalPlayer player)
Add the given player to the domain, identified by the player's UUID.
|
void |
addPlayer(java.lang.String name)
Deprecated.
names are deprecated in favor of UUIDs in MC 1.7+
|
void |
addPlayer(java.util.UUID uniqueId)
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 |
contains(java.lang.String playerName)
Returns true if a domain contains a player.
|
boolean |
contains(java.util.UUID uniqueId)
Returns true if a domain contains a player.
|
java.util.Set<java.lang.String> |
getPlayers()
Deprecated.
names are deprecated in favor of UUIDs in MC 1.7+
|
java.util.Set<java.util.UUID> |
getUniqueIds()
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(java.lang.String name)
Deprecated.
names are deprecated in favor of UUIDs in MC 1.7+
|
void |
removePlayer(java.util.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.
|
java.lang.String |
toString() |
public PlayerDomain()
public PlayerDomain(PlayerDomain domain)
domain - the domain to copy values from@Deprecated public PlayerDomain(java.lang.String[] names)
names - an array of names@Deprecated public void addPlayer(java.lang.String name)
name - the name of the playerpublic void addPlayer(java.util.UUID uniqueId)
uniqueId - the UUID of the playerpublic void addPlayer(LocalPlayer player)
player - the player@Deprecated public void removePlayer(java.lang.String name)
name - the name of the playerpublic void removePlayer(java.util.UUID uuid)
uuid - the UUID of the playerpublic void removePlayer(LocalPlayer player)
player - the playerpublic boolean contains(LocalPlayer player)
Domain@Deprecated public java.util.Set<java.lang.String> getPlayers()
public java.util.Set<java.util.UUID> getUniqueIds()
public boolean contains(java.util.UUID uniqueId)
DomainThis method doesn't check for groups!
public boolean contains(java.lang.String playerName)
DomainThis method doesn't check for groups!
public int size()
Domainpublic void clear()
Domainpublic boolean isDirty()
ChangeTrackedisDirty in interface ChangeTrackedpublic void setDirty(boolean dirty)
ChangeTrackedsetDirty in interface ChangeTrackeddirty - a new dirty statepublic java.lang.String toString()
toString in class java.lang.Object