Add missing SpigotConfig logCommands check

This commit is contained in:
david 2024-05-04 18:02:27 +02:00 committed by Jake Potrebic
parent 9d8d38d137
commit 686bf33252
No known key found for this signature in database
GPG Key ID: ECE0B3C133C016C5
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: david <mrminecraft00@gmail.com>
Date: Sat, 4 May 2024 18:01:59 +0200
Subject: [PATCH] Add missing SpigotConfig logCommands check
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8e67853a7a93fa736c147e8b2df537746dc8e94f..5e9202bc7fc649764568b55d66ba0d684118c00c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2181,7 +2181,9 @@ 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);