Use CommandSourceStack in AsyncPlayerSendCommandsEvent (#10826)

This commit is contained in:
Jason Penilla 2024-05-30 11:32:43 -07:00 committed by GitHub
parent 8e6554a80a
commit 06e69c8991
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,13 +102,14 @@ index 0000000000000000000000000000000000000000..28b44789e3be586c4b680fff56e5d2ff
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java b/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java diff --git a/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java b/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..a56ab5a031f8e254bf4e5ea063df0fad2e585206 index 0000000000000000000000000000000000000000..ba5472a068075f8f7fb5b9bce05e783ca9b4ffdf
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java +++ b/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java
@@ -0,0 +1,72 @@ @@ -0,0 +1,73 @@
+package com.destroystokyo.paper.event.brigadier; +package com.destroystokyo.paper.event.brigadier;
+ +
+import com.mojang.brigadier.tree.RootCommandNode; +import com.mojang.brigadier.tree.RootCommandNode;
+import io.papermc.paper.command.brigadier.CommandSourceStack;
+import org.bukkit.Bukkit; +import org.bukkit.Bukkit;
+import org.bukkit.entity.Player; +import org.bukkit.entity.Player;
+import org.bukkit.event.HandlerList; +import org.bukkit.event.HandlerList;
@ -137,7 +138,7 @@ index 0000000000000000000000000000000000000000..a56ab5a031f8e254bf4e5ea063df0fad
+ * <p>This is a draft/experimental API and is subject to change.</p> + * <p>This is a draft/experimental API and is subject to change.</p>
+ */ + */
+@ApiStatus.Experimental +@ApiStatus.Experimental
+public class AsyncPlayerSendCommandsEvent <S extends com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource> extends PlayerEvent { +public class AsyncPlayerSendCommandsEvent<S extends CommandSourceStack> extends PlayerEvent {
+ +
+ private static final HandlerList handlers = new HandlerList(); + private static final HandlerList handlers = new HandlerList();
+ private final RootCommandNode<S> node; + private final RootCommandNode<S> node;