mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
Refine javadoc and formatting of previous commit
By: md_5 <git@md-5.net>
This commit is contained in:
parent
32fa6a6240
commit
1c45976aee
1 changed files with 16 additions and 8 deletions
|
@ -1,16 +1,16 @@
|
|||
package org.bukkit.event.server;
|
||||
|
||||
import java.util.Set;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Event triggered for {@link org.bukkit.Server#broadcast(String, String)}
|
||||
* Event triggered for server broadcast messages such as from
|
||||
* {@link org.bukkit.Server#broadcast(String, String)}.
|
||||
*/
|
||||
public class BroadcastMessageEvent extends ServerEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private String message;
|
||||
private final Set<CommandSender> recipients;
|
||||
|
@ -22,7 +22,7 @@ public class BroadcastMessageEvent extends ServerEvent implements Cancellable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the message to broadcast
|
||||
* Get the message to broadcast.
|
||||
*
|
||||
* @return Message to broadcast
|
||||
*/
|
||||
|
@ -31,16 +31,24 @@ public class BroadcastMessageEvent extends ServerEvent implements Cancellable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the message to broadcast
|
||||
* Set the message to broadcast.
|
||||
*
|
||||
* @param message Message to broadcast
|
||||
* @param message New message to broadcast
|
||||
*/
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a set of recipients that this broadcast message will be displayed to.
|
||||
* Gets a set of recipients that this chat message will be displayed to.
|
||||
* <p>
|
||||
* The set returned is not guaranteed to be mutable and may auto-populate
|
||||
* on access. Any listener accessing the returned set should be aware that
|
||||
* it may reduce performance for a lazy set implementation.
|
||||
* <p>
|
||||
* Listeners should be aware that modifying the list may throw {@link
|
||||
* UnsupportedOperationException} if the event caller provides an
|
||||
* unmodifiable set.
|
||||
*
|
||||
* @return All CommandSenders who will see this chat message
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue