Bukkit#broadcastMessage does not reach all players #382

Closed
opened 2025-07-15 02:02:25 +02:00 by RanMinecraft · 7 comments
RanMinecraft commented 2025-07-15 02:02:25 +02:00 (Migrated from github.com)

Expected behavior

All online players should receive messages

Observed/Actual behavior

Some of player didnt receive broadcast message

Image

Steps/models to reproduce

Bukkit.broadcastMessage("test1 ");
or
Bukkit.broadcast(Component.text("test2 "));

Plugin and Datapack List

a broadcast test plugin

Folia version

1.21.7 latest version

Other

No response

### Expected behavior All online players should receive messages ### Observed/Actual behavior Some of player didnt receive broadcast message <img width="976" height="311" alt="Image" src="https://github.com/user-attachments/assets/7f322e67-ccf4-4951-b387-eb0426b85d15" /> ### Steps/models to reproduce `Bukkit.broadcastMessage("test1 ");` or `Bukkit.broadcast(Component.text("test2 "));` ### Plugin and Datapack List a broadcast test plugin ### Folia version 1.21.7 latest version ### Other _No response_
RanMinecraft commented 2025-07-28 17:40:54 +02:00 (Migrated from github.com)

Same happen on 1.21.8

Same happen on 1.21.8
Dueris commented 2025-07-28 18:32:54 +02:00 (Migrated from github.com)

What tick is this being run on? A region tick or the global tick? And if it's the region tick, are you(the player) in a different region or the same region?

What tick is this being run on? A region tick or the global tick? And if it's the region tick, are you(the player) in a different region or the same region?
RanMinecraft commented 2025-07-29 17:29:29 +02:00 (Migrated from github.com)

What tick is this being run on? A region tick or the global tick? And if it's the region tick, are you(the player) in a different region or the same region?

public boolean onCommand(@NotNull CommandSender sender,
                             @NotNull Command cmd,
                             @NotNull String label,
                             String @NotNull [] args) {
                Bukkit.broadcastMessage("test 1");
                Bukkit.getServer().getGlobalRegionScheduler().run(plugin, _ -> {
                    Bukkit.broadcastMessage("test 2");
                });
                Bukkit.getServer().getAsyncScheduler().runNow(plugin, _ -> {
                    Bukkit.broadcastMessage("test 3");
                });
Image
> What tick is this being run on? A region tick or the global tick? And if it's the region tick, are you(the player) in a different region or the same region? ``` public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, String @NotNull [] args) { Bukkit.broadcastMessage("test 1"); Bukkit.getServer().getGlobalRegionScheduler().run(plugin, _ -> { Bukkit.broadcastMessage("test 2"); }); Bukkit.getServer().getAsyncScheduler().runNow(plugin, _ -> { Bukkit.broadcastMessage("test 3"); }); ``` <img width="1066" height="130" alt="Image" src="https://github.com/user-attachments/assets/35bfe64f-3a7e-4ddb-a4cc-cd2190d7bf7b" />
masmc05 commented 2025-07-29 17:52:05 +02:00 (Migrated from github.com)

Are you sure the player has https://jd.papermc.io/paper/1.21.8/org/bukkit/Server.html#BROADCAST_CHANNEL_USERS bukkit.broadcast.user permission, as referenced in broadcast's javadocs?

Are you sure the player has <https://jd.papermc.io/paper/1.21.8/org/bukkit/Server.html#BROADCAST_CHANNEL_USERS> `bukkit.broadcast.user` permission, as referenced in broadcast's javadocs?
RanMinecraft commented 2025-07-30 16:15:10 +02:00 (Migrated from github.com)

Are you sure the player has https://jd.papermc.io/paper/1.21.8/org/bukkit/Server.html#BROADCAST_CHANNEL_USERS bukkit.broadcast.user permission, as referenced in broadcast's javadocs?

Image
for (Player player : Bukkit.getOnlinePlayers()) {
     Bukkit.broadcastMessage(player.getName() + " " + player.hasPermission(BROADCAST_CHANNEL_USERS));
}

But player does receive broadcast message after make him operator
With the same plugin on paper or purpur , anyone can receive it.

> Are you sure the player has https://jd.papermc.io/paper/1.21.8/org/bukkit/Server.html#BROADCAST_CHANNEL_USERS `bukkit.broadcast.user` permission, as referenced in broadcast's javadocs? <img width="778" height="90" alt="Image" src="https://github.com/user-attachments/assets/ff8176ff-8499-499b-bcef-cce67d7315e6" /> ``` for (Player player : Bukkit.getOnlinePlayers()) { Bukkit.broadcastMessage(player.getName() + " " + player.hasPermission(BROADCAST_CHANNEL_USERS)); } ``` But player does receive broadcast message after make him operator With the same plugin on paper or purpur , anyone can receive it.
masmc05 commented 2025-07-30 17:55:02 +02:00 (Migrated from github.com)

Can you try Bukkit.getServer().sendMessage() if it would fit you as a temporary replacement until this will be fixed?

Can you try `Bukkit.getServer().sendMessage()` if it would fit you as a temporary replacement until this will be fixed?
RanMinecraft commented 2025-07-31 23:10:43 +02:00 (Migrated from github.com)

Bukkit.getServer().sendMessage() it work!

`Bukkit.getServer().sendMessage()` it work!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia#382
No description provided.