1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: MiniDigger | Martin <admin@minidigger.dev> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
This commit is contained in:
@ -151,8 +151,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* uses. Normal and immediate iterator use without consequences that
|
||||
* affect the collection are fully supported. The effects following
|
||||
* (non-exhaustive) {@link Entity#teleport(Location) teleportation},
|
||||
* {@link Player#setHealth(double) death}, and {@link Player#kickPlayer(
|
||||
* String) kicking} are undefined. Any use of this collection from
|
||||
* {@link Player#setHealth(double) death}, and {@link Player#kick(
|
||||
* Component) kicking} are undefined. Any use of this collection from
|
||||
* asynchronous threads is unsafe.
|
||||
* <p>
|
||||
* For safe consequential iteration or mimicking the old array behavior,
|
||||
@ -387,7 +387,9 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @deprecated use {@link #broadcast(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
@Deprecated // Paper
|
||||
public int broadcastMessage(@NotNull String message);
|
||||
default int broadcastMessage(@NotNull String message) {
|
||||
return this.broadcast(message, BROADCAST_CHANNEL_USERS);
|
||||
}
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
@ -1296,7 +1298,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @deprecated in favour of {@link #broadcast(net.kyori.adventure.text.Component, String)}
|
||||
*/
|
||||
@Deprecated // Paper
|
||||
public int broadcast(@NotNull String message, @NotNull String permission);
|
||||
default int broadcast(@NotNull String message, @NotNull String permission) {
|
||||
return this.broadcast(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message), permission);
|
||||
}
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Broadcast a message to all players.
|
||||
@ -1307,7 +1312,9 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @param message the message
|
||||
* @return the number of players
|
||||
*/
|
||||
int broadcast(net.kyori.adventure.text.@NotNull Component message);
|
||||
default int broadcast(net.kyori.adventure.text.@NotNull Component message) {
|
||||
return this.broadcast(message, BROADCAST_CHANNEL_USERS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcasts the specified message to every user with the given
|
||||
|
||||
Reference in New Issue
Block a user