From 2ed60eba028f827533fe59f4e4aee054fad2e1ed Mon Sep 17 00:00:00 2001 From: wizjany Date: Fri, 21 Aug 2020 15:51:33 -0400 Subject: [PATCH] Add deprecation warnings for names in Domains. --- .../java/com/sk89q/worldguard/domains/PlayerDomain.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/worldguard-core/src/main/java/com/sk89q/worldguard/domains/PlayerDomain.java b/worldguard-core/src/main/java/com/sk89q/worldguard/domains/PlayerDomain.java index 3d82a66d..e731f6a0 100644 --- a/worldguard-core/src/main/java/com/sk89q/worldguard/domains/PlayerDomain.java +++ b/worldguard-core/src/main/java/com/sk89q/worldguard/domains/PlayerDomain.java @@ -73,7 +73,9 @@ public PlayerDomain(String[] names) { * 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 void addPlayer(LocalPlayer player) { * 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 boolean contains(LocalPlayer player) { * 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 getPlayers() { return Collections.unmodifiableSet(names); }