Skip to content

Commit

Permalink
Fix hasFiredAsync parameter when AsyncPlayerSendCommandsEvent is …
Browse files Browse the repository at this point in the history
…called (#10896)
  • Loading branch information
willkroboth committed Jun 17, 2024
1 parent 122c9d3 commit e41d44f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/0280-Brigadier-Mojang-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);

Expand Down

0 comments on commit e41d44f

Please sign in to comment.