papermc/Spigot-Server-Patches/0460-Broadcast-join-message-to-console.patch
2020-06-25 18:53:21 -07:00

23 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AvrooVulcan <avrovulcan.programming@gmail.com>
Date: Fri, 17 Apr 2020 00:15:23 +0100
Subject: [PATCH] Broadcast join message to console
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index a212c3bb7c80948cc329f21c3916f52ec02e06bf..769f8c147c8104ab21a33abb1471f76f3729f2b2 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -212,9 +212,9 @@ public abstract class PlayerList {
joinMessage = playerJoinEvent.getJoinMessage();
if (joinMessage != null && joinMessage.length() > 0) {
- for (IChatBaseComponent line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) {
- server.getPlayerList().sendAll(new PacketPlayOutChat(line, ChatMessageType.SYSTEM, SystemUtils.b));
- }
+ // Paper start - Removed sendAll for loop and broadcasted to console also
+ server.getPlayerList().sendMessage(CraftChatMessage.fromString(joinMessage));
+ // Paper end
}
// CraftBukkit end