2021-01-07 06:41:42 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
|
|
Date: Wed, 6 Jan 2021 23:38:43 +0100
|
|
|
|
Subject: [PATCH] Empty commands shall not be dispatched
|
|
|
|
|
|
|
|
|
2021-03-16 15:19:45 +08:00
|
|
|
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
2021-03-16 23:50:45 +08:00
|
|
|
index 07d3dec9f613013aac72f3f5db17089ebe5ee770..a70e0761aeddee8fafff971b5cbd0422ab560fb5 100644
|
2021-03-16 15:19:45 +08:00
|
|
|
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
|
|
|
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
2021-03-16 23:50:45 +08:00
|
|
|
@@ -223,6 +223,7 @@ public class CommandDispatcher {
|
2021-01-07 06:41:42 +08:00
|
|
|
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());
|