Custom Chat Completion Suggestions API
This commit is contained in:
@@ -698,6 +698,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
// Paper end - Add sendOpLevel API
|
// Paper end - Add sendOpLevel API
|
||||||
|
|
||||||
|
// Paper start - custom chat completions API
|
||||||
|
@Override
|
||||||
|
public void addAdditionalChatCompletions(@NotNull Collection<String> completions) {
|
||||||
|
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundCustomChatCompletionsPacket(
|
||||||
|
net.minecraft.network.protocol.game.ClientboundCustomChatCompletionsPacket.Action.ADD,
|
||||||
|
new ArrayList<>(completions)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeAdditionalChatCompletions(@NotNull Collection<String> completions) {
|
||||||
|
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundCustomChatCompletionsPacket(
|
||||||
|
net.minecraft.network.protocol.game.ClientboundCustomChatCompletionsPacket.Action.REMOVE,
|
||||||
|
new ArrayList<>(completions)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
// Paper end - custom chat completions API
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCompassTarget(Location loc) {
|
public void setCompassTarget(Location loc) {
|
||||||
Preconditions.checkArgument(loc != null, "Location cannot be null");
|
Preconditions.checkArgument(loc != null, "Location cannot be null");
|
||||||
|
|||||||
Reference in New Issue
Block a user