From 250d58514754c42a9b75a0270c0c2f11853990a4 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 3 Jul 2024 20:30:38 +1000 Subject: [PATCH] #1041: Improve getPlayer(String) docs to clarify it matches the name By: Phoenix616 --- paper-api/src/main/java/org/bukkit/Bukkit.java | 5 ++++- paper-api/src/main/java/org/bukkit/Server.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index acb00301aa..083b98a999 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/src/main/java/org/bukkit/Bukkit.java @@ -633,7 +633,10 @@ public final class Bukkit { } /** - * Gets a player object by the given username. + * Gets a player whose name matches the given name closest. + *

+ * Use {@link #getPlayerExact(String)} to get the player matching the input exactly + * and {@link #matchPlayer(String)} if you want a list of all players matching the input. *

* This method may not return objects for offline players. * diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index a422f88026..b574053537 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -544,7 +544,10 @@ public interface Server extends PluginMessageRecipient { public int getTicksPerSpawns(@NotNull SpawnCategory spawnCategory); /** - * Gets a player object by the given username. + * Gets a player whose name matches the given name closest. + *

+ * Use {@link #getPlayerExact(String)} to get the player matching the input exactly + * and {@link #matchPlayer(String)} if you want a list of all players matching the input. *

* This method may not return objects for offline players. *