Class CommandBroadcastEvent

java.lang.Object
org.bukkit.event.Event
net.forthecrown.grenadier.CommandBroadcastEvent
All Implemented Interfaces:
Cancellable

public class CommandBroadcastEvent extends Event implements Cancellable
  • Constructor Details

  • Method Details

    • getSource

      public CommandSource getSource()
      Gets the source of the broadcast
      Returns:
      broadcast source
    • getMessage

      public Component getMessage()
      Gets the message of the announcement
      Returns:
      Announcement message
    • setMessage

      public void setMessage(Component message)
      Sets the announcement message
      Parameters:
      message - new message
    • getViewers

      public Set<Audience> getViewers()
      Gets a mutable set of broadcast viewers.

      Unless manually added, this set will not contain the player the getSource() represents, or, in the case the source is the console, this set will not contain the console sender

      Returns:
      Viewers
    • getFormatter

      public CommandBroadcastEvent.Formatter getFormatter()
      Gets the broadcast message formatter
      Returns:
      Broadcast formatter
    • setFormatter

      public void setFormatter(CommandBroadcastEvent.Formatter formatter)
      Sets the broadcast message formatter
      Parameters:
      formatter - message formatter
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlerList

      public static HandlerList getHandlerList()
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event