Fix hasFiredAsync parameter when AsyncPlayerSendCommandsEvent is called (#10896)

This commit is contained in:
willkroboth 2024-06-17 20:16:55 +01:00 committed by GitHub
parent 122c9d3843
commit e41d44fa87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,7 +87,7 @@ index d9fc3c25bef251df6a53ee47ec224b07240a931c..2a22827f44dd0d524c22264447959a69
public boolean hasPermission(int level) {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index b754c0b3e2cd878fca5f702daca64f837ec83451..f15c388434a0a501f86868de35cc138756975027 100644
index b754c0b3e2cd878fca5f702daca64f837ec83451..b7c297fa41bb7d3c6a8e82520ec1a84e10f93014 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -488,6 +488,7 @@ public class Commands {
@ -102,7 +102,7 @@ index b754c0b3e2cd878fca5f702daca64f837ec83451..f15c388434a0a501f86868de35cc1387
private void runSync(ServerPlayer player, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
// Paper end - Perf: Async command map building
+ new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper - Brigadier API
+ new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, true).callEvent(); // Paper - Brigadier API
PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
event.getPlayer().getServer().getPluginManager().callEvent(event);