Paper/patches/server/0917-Add-missing-SpigotConfig-logCommands-check.patch
Nassim Jahnke 72e87abc2d
Strip raytracing for EntityLiving#hasLineOfSight
Co-authored-by: Paul Sauve <paul@technove.co>
2023-09-10 12:28:03 +10:00

21 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NonSwag <mrminecraft00@gmail.com>
Date: Thu, 8 Dec 2022 20:25:05 +0100
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 d7a4e200853f4eb980f1ea4a5c6a338039979cf1..4434cad1a854fb514245c4afb3e3d469efb223f9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2259,7 +2259,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMessages lastSeenMessages) {
// CraftBukkit start
String command = "/" + packet.command();
+ if (org.spigotmc.SpigotConfig.logCommands) { // Paper
ServerGamePacketListenerImpl.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + command);
+ } // Paper
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server));
this.cserver.getPluginManager().callEvent(event);