Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-14 20:10:05 +01:00
Add missing SpigotConfig logCommands check (#10659)
Dieser Commit ist enthalten in:
Ursprung
0e43d3c103
Commit
54c5ecb4e4
@ -3,12 +3,23 @@ From: NonSwag <mrminecraft00@gmail.com>
|
||||
Date: Thu, 8 Dec 2022 20:25:05 +0100
|
||||
Subject: [PATCH] Add missing SpigotConfig logCommands check
|
||||
|
||||
Co-authored-by: david <mrminecraft00@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f8bfc87b044e538e068c021cfc3f8de43b15e84d..a63a61852371df86f379effa5c9f127b3bcb347b 100644
|
||||
index f8bfc87b044e538e068c021cfc3f8de43b15e84d..f55255a6bab7524d37688b9fa5c9ca238fcd2656 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2081,7 +2081,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2041,7 +2041,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);
|
||||
@@ -2081,7 +2083,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
private void performSignedChatCommand(ServerboundChatCommandSignedPacket packet, LastSeenMessages lastSeenMessages) {
|
||||
// CraftBukkit start
|
||||
String command = "/" + packet.command();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a63a61852371df86f379effa5c9f127b3bcb347b..7c11e29378b1fd9535237e760384fa3904465056 100644
|
||||
index f55255a6bab7524d37688b9fa5c9ca238fcd2656..ea8ba0c7306dffc8152be23f1b1dc452379f2ebb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3423,7 +3423,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3425,7 +3425,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
|
||||
this.chatMessageChain.append(() -> {
|
||||
this.player.setChatSession(session);
|
||||
|
@ -26,7 +26,7 @@ index 68c062cbaa030d62d97c9c003651f8fc17a00a6b..6247a21c9c391abf1f6db3482c659593
|
||||
UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())),
|
||||
UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())),
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7e800eadd7b7e39468f4c55830bf041ed99b92eb..0b5a0784792814367c79cd5e0409443009e82b73 100644
|
||||
index e98d07dfa5c0d65f363dfc066d4058eac9f76e93..f4c5e1fc14ddcc90703ca1a1ec09617c5c3c6b79 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -51,7 +51,7 @@ index 7e800eadd7b7e39468f4c55830bf041ed99b92eb..0b5a0784792814367c79cd5e04094430
|
||||
}
|
||||
|
||||
private int getMaximumFlyingTicks(Entity vehicle) {
|
||||
@@ -3421,6 +3429,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3423,6 +3431,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
private void resetPlayerChatState(RemoteChatSession session) {
|
||||
this.chatSession = session;
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0b5a0784792814367c79cd5e0409443009e82b73..64c42e4ea8d17c8110f1df043cb3b7b3cbb52b8a 100644
|
||||
index f4c5e1fc14ddcc90703ca1a1ec09617c5c3c6b79..0595381e4b3296e047df1ef9bff1f06766de3788 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1266,8 +1266,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -91,7 +91,7 @@ index 0b5a0784792814367c79cd5e0409443009e82b73..64c42e4ea8d17c8110f1df043cb3b7b3
|
||||
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
|
||||
} else {
|
||||
@@ -3452,4 +3482,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3454,4 +3484,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
|
||||
}
|
||||
|
@ -18,10 +18,10 @@ index b69fa76003d948e307cf83d72a57513a984e622d..913327c9bb937c95e487ba21cf8e2084
|
||||
DataComponentType datacomponenttype;
|
||||
int k;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ff8593b3835be310affc39cde964fabfcc105094..eebc68f55374d5763c77d1fbf884b17612fcd1fb 100644
|
||||
index f197731f95ff2f3ee5a69d88d7bfaa5fea7c1c71..eea72bd54f69c872c416fd78ab76be124eca381c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2972,6 +2972,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2974,6 +2974,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
break;
|
||||
case SWAP:
|
||||
if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add CartographyItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index eebc68f55374d5763c77d1fbf884b17612fcd1fb..342d81e200df6df332655525326c164432355953 100644
|
||||
index eea72bd54f69c872c416fd78ab76be124eca381c..37b4d668ab043a8dec01e5d444c3624346e6043d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3094,6 +3094,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3096,6 +3096,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ index abb9a86cd42a34cf722a312068134e820ac21956..f168044d36f22080504da171e5ed31a6
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 5a99ca1121ef2163b194372c48bf03e95a96b8ea..8e67853a7a93fa736c147e8b2df537746dc8e94f 100644
|
||||
index b0d097508a86288c09af2f20f43173f04e252673..5e9202bc7fc649764568b55d66ba0d684118c00c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2004,6 +2004,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -92,7 +92,7 @@ index 5a99ca1121ef2163b194372c48bf03e95a96b8ea..8e67853a7a93fa736c147e8b2df53774
|
||||
this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524
|
||||
return;
|
||||
}
|
||||
@@ -2788,7 +2789,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2790,7 +2791,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
|
||||
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren