diff options
author | md_5 <git@md-5.net> | 2017-07-28 16:57:59 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-07-28 16:57:59 +1000 |
commit | 650f5090d6dee8e7921eb55f43bf4ccee4470e82 (patch) | |
tree | 343065711aab93b2f57b60c6517d8db8aa7f5849 /src/main/java/org/bukkit | |
parent | 0196df734da5a305e5e744179a238cdda5e8f96c (diff) | |
download | bukkit-650f5090d6dee8e7921eb55f43bf4ccee4470e82.tar bukkit-650f5090d6dee8e7921eb55f43bf4ccee4470e82.tar.gz bukkit-650f5090d6dee8e7921eb55f43bf4ccee4470e82.tar.lz bukkit-650f5090d6dee8e7921eb55f43bf4ccee4470e82.tar.xz bukkit-650f5090d6dee8e7921eb55f43bf4ccee4470e82.zip |
Refine javadoc and formatting of previous commit
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java b/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java index 4ddf7ecc..ae563114 100644 --- a/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java +++ b/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java @@ -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 */ |