From e71c77f5e9483741ce1e1b10d0f02ffb5cbaad72 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Mon, 20 May 2024 11:15:21 -0700 Subject: [PATCH] Add a better warning message than "Server performance will be affected" for CommandRegisteredEvent use (#10754) --- patches/api/Brigadier-based-command-API.patch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/patches/api/Brigadier-based-command-API.patch b/patches/api/Brigadier-based-command-API.patch index 59b19285b7..e2cb44e41b 100644 --- a/patches/api/Brigadier-based-command-API.patch +++ b/patches/api/Brigadier-based-command-API.patch @@ -280,6 +280,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import com.mojang.brigadier.tree.ArgumentCommandNode; +import com.mojang.brigadier.tree.LiteralCommandNode; +import com.mojang.brigadier.tree.RootCommandNode; ++import org.bukkit.Warning; +import org.bukkit.command.Command; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; @@ -299,6 +300,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ +@ApiStatus.Experimental +@Deprecated(since = "1.20.6") ++@Warning(reason = "This event has been superseded by the Commands API and will be removed in a future release. Listen to LifecycleEvents.COMMANDS instead.") +public class CommandRegisteredEvent extends ServerEvent implements Cancellable { + + private static final HandlerList handlers = new HandlerList();