mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 05:25:42 +01:00
8d040fad9b
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 465c4964 PR-843: Add damage methods to FallingBlock 46ba7c9f SPIGOT-7335: Fix typo in TextDisplay#TextAlignment enum name CraftBukkit Changes: 818582f40 PR-1169: Add damage methods to FallingBlock 15a3eac66 SPIGOT-7335: Fix typo in TextDisplay#TextAlignment enum name f01fb4979 SPIGOT-7336: Fix typo in internal method name
34 lines
1.6 KiB
Diff
34 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
|
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 1b9c9e8e0a3c94022360b789e87c7a104da08995..18e8fb6c16cac2b45de3e42a5f9dcd098e5633e6 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -670,6 +670,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
|
|
this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false);
|
|
}
|
|
+
|
|
+ @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
|
|
|
|
@Override
|