aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0529-Empty-commands-shall-not-be-dispatched.patch
diff options
context:
space:
mode:
authorTomTom <[email protected]>2023-11-03 15:05:57 +0100
committerGitHub <[email protected]>2023-11-03 14:05:57 +0000
commit487109fddc74813b81bf17dfe8ec7be443963d9d (patch)
tree8fbfe1ec07553dc9149882389257d948b0486e02 /patches/server/0529-Empty-commands-shall-not-be-dispatched.patch
parent8493340be4fa69fa9369719272e5dff1b7a2f455 (diff)
downloadPaper-487109fddc74813b81bf17dfe8ec7be443963d9d.tar.gz
Paper-487109fddc74813b81bf17dfe8ec7be443963d9d.zip
Readd 0414 use distance map to optimise entity tracker (#9868)
Diffstat (limited to 'patches/server/0529-Empty-commands-shall-not-be-dispatched.patch')
-rw-r--r--patches/server/0529-Empty-commands-shall-not-be-dispatched.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0529-Empty-commands-shall-not-be-dispatched.patch b/patches/server/0529-Empty-commands-shall-not-be-dispatched.patch
new file mode 100644
index 0000000000..9b41ebaaf7
--- /dev/null
+++ b/patches/server/0529-Empty-commands-shall-not-be-dispatched.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mariell Hoversholm <[email protected]>
+Date: Wed, 6 Jan 2021 23:38:43 +0100
+Subject: [PATCH] Empty commands shall not be dispatched
+
+
+diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
+index 148cfe9eac43cafee016d58a1344a97a2e69aa77..c37d9fb4f1fb388e5c264404de378cee298fd253 100644
+--- a/src/main/java/net/minecraft/commands/Commands.java
++++ b/src/main/java/net/minecraft/commands/Commands.java
+@@ -269,6 +269,7 @@ public class Commands {
+ command = event.getCommand();
+
+ String[] args = command.split(" ");
++ if (args.length == 0) return 0; // Paper - empty commands shall not be dispatched
+
+ String cmd = args[0];
+ if (cmd.startsWith("minecraft:")) cmd = cmd.substring("minecraft:".length());