geforkt von Mirrors/Paper
928bcc8d3a
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: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
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 3834952589a0becf88a4fdc328ca4f3e6c5b1aa6..781c0e10b523c55989f368b4507137343dcffdab 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -659,6 +659,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
|