mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Add a better warning message than "Server performance will be affected" for CommandRegisteredEvent use (#10754)
This commit is contained in:
parent
93cb23c488
commit
e71c77f5e9
1 changed files with 2 additions and 0 deletions
|
@ -280,6 +280,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import com.mojang.brigadier.tree.ArgumentCommandNode;
|
+import com.mojang.brigadier.tree.ArgumentCommandNode;
|
||||||
+import com.mojang.brigadier.tree.LiteralCommandNode;
|
+import com.mojang.brigadier.tree.LiteralCommandNode;
|
||||||
+import com.mojang.brigadier.tree.RootCommandNode;
|
+import com.mojang.brigadier.tree.RootCommandNode;
|
||||||
|
+import org.bukkit.Warning;
|
||||||
+import org.bukkit.command.Command;
|
+import org.bukkit.command.Command;
|
||||||
+import org.bukkit.event.Cancellable;
|
+import org.bukkit.event.Cancellable;
|
||||||
+import org.bukkit.event.HandlerList;
|
+import org.bukkit.event.HandlerList;
|
||||||
|
@ -299,6 +300,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ */
|
+ */
|
||||||
+@ApiStatus.Experimental
|
+@ApiStatus.Experimental
|
||||||
+@Deprecated(since = "1.20.6")
|
+@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<S extends com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
|
+public class CommandRegisteredEvent<S extends com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
|
||||||
+
|
+
|
||||||
+ private static final HandlerList handlers = new HandlerList();
|
+ private static final HandlerList handlers = new HandlerList();
|
||||||
|
|
Loading…
Reference in a new issue