geforkt von Mirrors/Paper
fix #5526 - use correct type when sending message to clients
Dieser Commit ist enthalten in:
Ursprung
2b12d671fa
Commit
e4e3475ac3
@ -124,6 +124,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.TextReplacementConfig;
|
||||
+import net.kyori.adventure.text.event.ClickEvent;
|
||||
+import net.minecraft.network.chat.ChatMessageType;
|
||||
+import net.minecraft.network.chat.IChatBaseComponent;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
@ -271,7 +272,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ if (((LazyPlayerSet) event.recipients()).isLazy()) {
|
||||
+ final IChatBaseComponent vanilla = PaperAdventure.asVanilla(message);
|
||||
+ for (final EntityPlayer recipient : this.server.getPlayerList().players) {
|
||||
+ recipient.sendMessage(vanilla, this.player.getUniqueID());
|
||||
+ recipient.sendMessage(vanilla, ChatMessageType.CHAT, this.player.getUniqueID());
|
||||
+ }
|
||||
+ } else {
|
||||
+ for (final Player recipient : event.recipients()) {
|
||||
@ -1187,6 +1188,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
this.playerConnection.a((Packet) (new PacketPlayOutCombatEvent(this.getCombatTracker(), PacketPlayOutCombatEvent.EnumCombatEventType.ENTITY_DIED, ichatbasecomponent)), (future) -> {
|
||||
if (!future.isSuccess()) {
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.a(ichatbasecomponent, ChatMessageType.SYSTEM, uuid);
|
||||
}
|
||||
|
||||
+ public void sendMessage(final IChatBaseComponent message, final ChatMessageType type, final UUID sender) { this.a(message, type, sender); } // Paper - OBFHELPER
|
||||
public void a(IChatBaseComponent ichatbasecomponent, ChatMessageType chatmessagetype, UUID uuid) {
|
||||
this.playerConnection.a((Packet) (new PacketPlayOutChat(ichatbasecomponent, chatmessagetype, uuid)), (future) -> {
|
||||
if (!future.isSuccess() && (chatmessagetype == ChatMessageType.GAME_INFO || chatmessagetype == ChatMessageType.SYSTEM)) {
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/m
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
@@ -0,0 +0,0 @@ import net.kyori.adventure.text.event.ClickEvent;
|
||||
@@ -0,0 +0,0 @@ import net.minecraft.network.chat.ChatMessageType;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.EntityPlayer;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren