From 487109fddc74813b81bf17dfe8ec7be443963d9d Mon Sep 17 00:00:00 2001 From: TomTom <93038247+AverageGithub@users.noreply.github.com> Date: Fri, 3 Nov 2023 15:05:57 +0100 Subject: Readd 0414 use distance map to optimise entity tracker (#9868) --- .../0529-Empty-commands-shall-not-be-dispatched.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 patches/server/0529-Empty-commands-shall-not-be-dispatched.patch (limited to 'patches/server/0529-Empty-commands-shall-not-be-dispatched.patch') 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 +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()); -- cgit v1.2.3