diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index 9b2a9516c0..0c377ac318 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -637,6 +637,37 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ public void sendMap(@NotNull MapView map); + /** + * Add custom chat completion suggestions shown to the player while typing a + * message. + * + * @param completions the completions to send + */ + public void addCustomChatCompletions(@NotNull Collection completions); + + /** + * Remove custom chat completion suggestions shown to the player while + * typing a message. + * + * Online player names cannot be removed with this method. This will affect + * only custom completions added by {@link #addCustomChatCompletions(Collection)} + * or {@link #setCustomChatCompletions(Collection)}. + * + * @param completions the completions to remove + */ + public void removeCustomChatCompletions(@NotNull Collection completions); + + /** + * Set the list of chat completion suggestions shown to the player while + * typing a message. + *

+ * If completions were set previously, this method will remove them all and + * replace them with the provided completions. + * + * @param completions the completions to set + */ + public void setCustomChatCompletions(@NotNull Collection completions); + /** * Forces an update of the player's entire inventory. *