aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch
diff options
context:
space:
mode:
authorBjarne Koll <[email protected]>2024-10-25 13:52:04 +0200
committerBjarne Koll <[email protected]>2024-10-25 14:25:28 +0200
commit6fb86bb20a492c5a4f786eb03475940a007199a9 (patch)
tree4479b6fd0398e1787e61d2d0294901b2843630fd /patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch
parent0f011a31b1e868636f53be02f7f09f80e8e90133 (diff)
downloadPaper-6fb86bb20a492c5a4f786eb03475940a007199a9.tar.gz
Paper-6fb86bb20a492c5a4f786eb03475940a007199a9.zip
Compiler issues v2
Diffstat (limited to 'patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch')
-rw-r--r--patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch b/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch
new file mode 100644
index 0000000000..d204b1a24f
--- /dev/null
+++ b/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch
@@ -0,0 +1,35 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Owen1212055 <[email protected]>
+Date: Sat, 30 Jul 2022 11:23:05 -0400
+Subject: [PATCH] Custom Chat Completion Suggestions API
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+index c45753f4b65b189ebfdaea4fb0ec51217dd990c3..2b5eb586eda41d465f3f1faae8159f6fbe346312 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+@@ -708,6 +708,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+ }
+ // 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
+ public void setCompassTarget(Location loc) {
+ Preconditions.checkArgument(loc != null, "Location cannot be null");