Refine javadoc and formatting of previous commit

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2017-07-28 16:57:59 +10:00
parent 32fa6a6240
commit 1c45976aee

View file

@ -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
*/