geforkt von Mirrors/Paper
d60497ebf2
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: ff64962b SPIGOT-7124: MapPalette.getColor(0) returns the wrong color CraftBukkit Changes: 8f3647242 SPIGOT-7127: /say doesn't work from console
34 Zeilen
1.6 KiB
Diff
34 Zeilen
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 9f34358dfcb95104c5bb9e63fbe295e6e049a55d..ef9c3a7b15a4901e1662e6d55504b9cbbb804ad3 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -654,6 +654,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
|