Add API for custom chat completions like on Paper (#1232)
* Add API for custom chat completions like on Paper, renamed enum constant to match its function, NMS and wiki-vg * add null and version checks
This commit is contained in:
@@ -309,4 +309,33 @@ public interface Player extends
|
||||
* @return the player's client brand
|
||||
*/
|
||||
@Nullable String getClientBrand();
|
||||
|
||||
|
||||
/**
|
||||
* Add custom chat completion suggestions shown to the player while typing a message.
|
||||
*
|
||||
* @param completions the completions to send
|
||||
*/
|
||||
void addCustomChatCompletions(@NotNull Collection<String> completions);
|
||||
|
||||
/**
|
||||
* Remove custom chat completion suggestions shown to the player while typing a message.
|
||||
*
|
||||
* <p>Online player names can't be removed with this method, it will only affect
|
||||
* custom completions added by {@link #addCustomChatCompletions(Collection)}
|
||||
* or {@link #setCustomChatCompletions(Collection)}.
|
||||
*
|
||||
* @param completions the completions to remove
|
||||
*/
|
||||
void removeCustomChatCompletions(@NotNull Collection<String> completions);
|
||||
|
||||
/**
|
||||
* Set the list of chat completion suggestions shown to the player while typing a message.
|
||||
*
|
||||
* <p>If completions were set previously, this method will remove them all
|
||||
* and replace them with the provided completions.
|
||||
*
|
||||
* @param completions the completions to set
|
||||
*/
|
||||
void setCustomChatCompletions(@NotNull Collection<String> completions);
|
||||
}
|
Reference in New Issue
Block a user