SPIGOT-6408: Narrator chat only does not work

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2021-04-05 15:31:26 +10:00
parent 79672394a1
commit 0352f0e143

View File

@ -1023,8 +1023,8 @@
+ String message = String.format(queueEvent.getFormat(), queueEvent.getPlayer().getDisplayName(), queueEvent.getMessage());
+ PlayerConnection.this.minecraftServer.console.sendMessage(message);
+ if (((LazyPlayerSet) queueEvent.getRecipients()).isLazy()) {
+ for (Object player : PlayerConnection.this.minecraftServer.getPlayerList().players) {
+ ((EntityPlayer) player).sendMessage(PlayerConnection.this.player.getUniqueID(), CraftChatMessage.fromString(message));
+ for (EntityPlayer recipient : minecraftServer.getPlayerList().players) {
+ recipient.getBukkitEntity().sendMessage(PlayerConnection.this.player.getUniqueID(), message);
+ }
+ } else {
+ for (Player player : queueEvent.getRecipients()) {
@ -1053,8 +1053,8 @@
+ s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage());
+ minecraftServer.console.sendMessage(s);
+ if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
+ for (Object recipient : minecraftServer.getPlayerList().players) {
+ ((EntityPlayer) recipient).sendMessage(PlayerConnection.this.player.getUniqueID(), CraftChatMessage.fromString(s));
+ for (EntityPlayer recipient : minecraftServer.getPlayerList().players) {
+ recipient.getBukkitEntity().sendMessage(PlayerConnection.this.player.getUniqueID(), s);
+ }
+ } else {
+ for (Player recipient : event.getRecipients()) {