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
This commit is contained in:
@ -20,7 +20,15 @@
|
|||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Executing command block");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Executing command block");
|
||||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Command to be executed");
|
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Command to be executed");
|
||||||
@@ -200,7 +204,7 @@
|
@@ -174,6 +178,7 @@
|
||||||
|
@Override
|
||||||
|
public void sendSystemMessage(Component message) {
|
||||||
|
if (this.trackOutput) {
|
||||||
|
+ org.spigotmc.AsyncCatcher.catchOp("sendSystemMessage to a command block"); // Paper - Don't broadcast messages to command blocks
|
||||||
|
SimpleDateFormat simpledateformat = BaseCommandBlock.TIME_FORMAT;
|
||||||
|
Date date = new Date();
|
||||||
|
|
||||||
|
@@ -200,7 +205,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public InteractionResult usedBy(Player player) {
|
public InteractionResult usedBy(Player player) {
|
||||||
|
|||||||
@ -1928,7 +1928,7 @@ public final class CraftServer implements Server {
|
|||||||
// Paper end
|
// Paper end
|
||||||
Set<CommandSender> recipients = new HashSet<>();
|
Set<CommandSender> recipients = new HashSet<>();
|
||||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
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 messages to command blocks
|
||||||
recipients.add((CommandSender) permissible);
|
recipients.add((CommandSender) permissible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user