geforkt von Mirrors/Paper
aa52bf9e33
Mojang made some changes to priorities in 1.17 and it seems that these changes conflict with the changes made in this patch, which in some cases appears to cause excessive rescheduling of tasks. This, however, is not confirmed as such but seems to be the behavior that we're seeing to cause this issue, if mojang has adopted the changes we suggested, then a good chunk of this patch may be unneeded, but, this needs a much better look than I'm currently able to do
19 Zeilen
885 B
Diff
19 Zeilen
885 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/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
|
index f9b37c873b6b02f14bb7a7225197c552a7f7c5b9..5574c19d32bb8a0c08011be9ebb9105886459ec0 100644
|
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
|
@@ -230,6 +230,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());
|