From b5d6fdee487aba24d6e71c057044f7fb76e1a3f6 Mon Sep 17 00:00:00 2001 From: NonSwag <54660361+NonSwag@users.noreply.github.com> Date: Sun, 5 May 2024 18:41:02 +0200 Subject: [PATCH] Add missing SpigotConfig logCommands check (#10659) --- .../Add-missing-SpigotConfig-logCommands-check.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/patches/server/Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/Add-missing-SpigotConfig-logCommands-check.patch index e92337bd43..a19c4ef5f7 100644 --- a/patches/server/Add-missing-SpigotConfig-logCommands-check.patch +++ b/patches/server/Add-missing-SpigotConfig-logCommands-check.patch @@ -3,11 +3,22 @@ From: NonSwag Date: Thu, 8 Dec 2022 20:25:05 +0100 Subject: [PATCH] Add missing SpigotConfig logCommands check +Co-authored-by: david diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl + private void performUnsignedChatCommand(String command) { + // CraftBukkit start + String command1 = "/" + command; ++ if (org.spigotmc.SpigotConfig.logCommands) { // Paper - Add missing SpigotConfig logCommands check + ServerGamePacketListenerImpl.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + command1); ++ } + + PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command1, new LazyPlayerSet(this.server)); + this.cserver.getPluginManager().callEvent(event); @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private void performSignedChatCommand(ServerboundChatCommandSignedPacket packet, LastSeenMessages lastSeenMessages) { // CraftBukkit start