Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
4e958e229f
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: zml <zml@stellardrift.ca> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
19 Zeilen
922 B
Diff
19 Zeilen
922 B
Diff
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
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
index 22d748008d24fd6ed7cd8c4914e2ceb378f32c95..e56ff365118c50486f36cb15a4ca062c5a481674 100644
|
|
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
@@ -139,6 +139,7 @@ public class CommandDispatcher {
|
|
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());
|