diff options
author | TomTom <[email protected]> | 2023-11-03 15:05:57 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-11-03 14:05:57 +0000 |
commit | 487109fddc74813b81bf17dfe8ec7be443963d9d (patch) | |
tree | 8fbfe1ec07553dc9149882389257d948b0486e02 /patches/server/0529-Empty-commands-shall-not-be-dispatched.patch | |
parent | 8493340be4fa69fa9369719272e5dff1b7a2f455 (diff) | |
download | Paper-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.patch | 18 |
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()); |