aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0822-Don-t-broadcast-messages-to-command-blocks.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2023-09-23 11:45:34 +1000
committerNassim Jahnke <[email protected]>2023-09-23 11:45:34 +1000
commita353f4d207994e0f2dfe55047cffbcb98f74bafc (patch)
treed16ee406ab9cd0d19c35f1c318d59e28c23cf6d6 /patches/server/0822-Don-t-broadcast-messages-to-command-blocks.patch
parenta50d7c340b9922eab16fd9f246269b4c75453648 (diff)
downloadPaper-a353f4d207994e0f2dfe55047cffbcb98f74bafc.tar.gz
Paper-a353f4d207994e0f2dfe55047cffbcb98f74bafc.zip
Readd network optimization patch
Diffstat (limited to 'patches/server/0822-Don-t-broadcast-messages-to-command-blocks.patch')
-rw-r--r--patches/server/0822-Don-t-broadcast-messages-to-command-blocks.patch34
1 files changed, 0 insertions, 34 deletions
diff --git a/patches/server/0822-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0822-Don-t-broadcast-messages-to-command-blocks.patch
deleted file mode 100644
index c0bd53a43f..0000000000
--- a/patches/server/0822-Don-t-broadcast-messages-to-command-blocks.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <[email protected]>
-Date: Thu, 16 Jun 2022 14:22:56 -0700
-Subject: [PATCH] Don't broadcast messages to command blocks
-
-Previously the broadcast method would update the last output
-in command blocks, and if called asynchronously, would throw
-an error
-
-diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-index e05eb08a9c229b371887676da510df948b896a85..ceeedbd88c56c08ec8b047c9ca2f14cc581e12ad 100644
---- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-@@ -172,6 +172,7 @@ public abstract class BaseCommandBlock implements CommandSource {
- @Override
- public void sendSystemMessage(Component message) {
- if (this.trackOutput) {
-+ org.spigotmc.AsyncCatcher.catchOp("sendSystemMessage to a command block"); // Paper
- SimpleDateFormat simpledateformat = BaseCommandBlock.TIME_FORMAT;
- Date date = new Date();
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 2e734dea30809bed1b11905a34e54ab5fe65b6f6..8f3c46827225ea8194b7759b5fb5ad7dc6a2bee1 100644
---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1777,7 +1777,7 @@ public final class CraftServer implements Server {
- // Paper end
- Set<CommandSender> recipients = new HashSet<>();
- for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
-- if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
-+ if (permissible instanceof CommandSender && !(permissible instanceof org.bukkit.command.BlockCommandSender) && permissible.hasPermission(permission)) { // Paper - don't broadcast to BlockCommandSender (specifically Command Blocks)
- recipients.add((CommandSender) permissible);
- }
- }