Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@64828f3 Clean up thread pool usage (#11681)
PaperMC/Paper@5ab6789 Copy dispatcher root children before passing it into async tree building
PaperMC/Paper@47f2071 Deprecate ChatVisibility#UNKNOWN (#11683)
  • Loading branch information
granny committed Nov 30, 2024
1 parent 2b694c9 commit 96d7ef7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.21.3-R0.1-SNAPSHOT

mcVersion = 1.21.3
paperCommit = 9953384d89548c0c53a57e2a60abace9ad19b177
paperCommit = 47f207135044e8835c529561d0d0029f0ae3fba8

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0042-Skip-events-if-there-s-no-listeners.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] Skip events if there's no listeners


diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index 260350422fc724ba5cd5769cbb387b6007f36a84..b7783480cc6a51a1f18789b7f3fc35faf5573f8d 100644
index 5f3669e3eb371d65dd27c37053d4bc5640d93774..bb82e6519e6f1a6a8d87fb6293681fe32b39a6a1 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -514,6 +514,7 @@ public class Commands {
@@ -511,6 +511,7 @@ public class Commands {
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, true).callEvent(); // Paper - Brigadier API
+ if (PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Purpur - skip all this crap if there's nothing listening
PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
event.getPlayer().getServer().getPluginManager().callEvent(event);

@@ -524,6 +525,7 @@ public class Commands {
@@ -521,6 +522,7 @@ public class Commands {
}
}
// CraftBukkit end
Expand Down

0 comments on commit 96d7ef7

Please sign in to comment.