Commits

md_5 authored b435e8e8d33
SPIGOT-7349: Player#setDisplayName not working when message/format unmodified
No tags

nms-patches/net/minecraft/network/chat/ChatMessageType.patch

Deleted
1 ---- a/net/minecraft/network/chat/ChatMessageType.java
2 -+++ b/net/minecraft/network/chat/ChatMessageType.java
3 -@@ -2,6 +2,7 @@
4 -
5 - import com.mojang.serialization.Codec;
6 - import com.mojang.serialization.codecs.RecordCodecBuilder;
7 -+import java.util.List;
8 - import java.util.Optional;
9 - import javax.annotation.Nullable;
10 - import net.minecraft.commands.CommandListenerWrapper;
11 -@@ -27,6 +28,7 @@
12 - public static final ResourceKey<ChatMessageType> TEAM_MSG_COMMAND_INCOMING = create("team_msg_command_incoming");
13 - public static final ResourceKey<ChatMessageType> TEAM_MSG_COMMAND_OUTGOING = create("team_msg_command_outgoing");
14 - public static final ResourceKey<ChatMessageType> EMOTE_COMMAND = create("emote_command");
15 -+ public static final ResourceKey<ChatMessageType> RAW = create("raw"); // CraftBukkit
16 -
17 - private static ResourceKey<ChatMessageType> create(String s) {
18 - return ResourceKey.create(Registries.CHAT_TYPE, new MinecraftKey(s));
19 -@@ -40,6 +42,7 @@
20 - bootstapcontext.register(ChatMessageType.TEAM_MSG_COMMAND_INCOMING, new ChatMessageType(ChatDecoration.teamMessage("chat.type.team.text"), ChatDecoration.withSender("chat.type.text.narrate")));
21 - bootstapcontext.register(ChatMessageType.TEAM_MSG_COMMAND_OUTGOING, new ChatMessageType(ChatDecoration.teamMessage("chat.type.team.sent"), ChatDecoration.withSender("chat.type.text.narrate")));
22 - bootstapcontext.register(ChatMessageType.EMOTE_COMMAND, new ChatMessageType(ChatDecoration.withSender("chat.type.emote"), ChatDecoration.withSender("chat.type.emote")));
23 -+ bootstapcontext.register(ChatMessageType.RAW, new ChatMessageType(new ChatDecoration("%s", List.of(ChatDecoration.a.CONTENT), ChatModifier.EMPTY), new ChatDecoration("%s", List.of(ChatDecoration.a.CONTENT), ChatModifier.EMPTY))); // CraftBukkit
24 - }
25 -
26 - public static ChatMessageType.a bind(ResourceKey<ChatMessageType> resourcekey, Entity entity) {

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut