Add deprecation warnings for names in Domains.

This commit is contained in:
wizjany 2020-08-21 15:51:33 -04:00
parent 91a1494634
commit 2ed60eba02
1 changed files with 6 additions and 0 deletions

View File

@ -73,7 +73,9 @@ public class PlayerDomain implements Domain, ChangeTracked {
* Add the given player to the domain, identified by the player's name.
*
* @param name the name of the player
* @deprecated names are deprecated in favor of UUIDs in MC 1.7+
*/
@Deprecated
public void addPlayer(String name) {
checkNotNull(name);
if (!name.trim().isEmpty()) {
@ -111,7 +113,9 @@ public class PlayerDomain implements Domain, ChangeTracked {
* Remove the given player from the domain, identified by the player's name.
*
* @param name the name of the player
* @deprecated names are deprecated in favor of UUIDs in MC 1.7+
*/
@Deprecated
public void removePlayer(String name) {
checkNotNull(name);
setDirty(true);
@ -152,7 +156,9 @@ public class PlayerDomain implements Domain, ChangeTracked {
* Get the set of player names.
*
* @return the set of player names
* @deprecated names are deprecated in favor of UUIDs in MC 1.7+
*/
@Deprecated
public Set<String> getPlayers() {
return Collections.unmodifiableSet(names);
}