Class PrivateMessageEvent

java.lang.Object
org.bukkit.event.Event
adhdmc.simplepms.events.PrivateMessageEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PrivateMessageEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when a private message is sent
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     
    private static final org.bukkit.event.HandlerList
     
    private final org.bukkit.command.CommandSender
     
    private final String
     
    private final org.bukkit.command.CommandSender
     
    private final HashSet<org.bukkit.entity.Player>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PrivateMessageEvent(org.bukkit.command.CommandSender initiator, org.bukkit.command.CommandSender recipient, String messageContent, HashSet<org.bukkit.entity.Player> spyingPlayers)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Gets the handlerList for this event
    @NotNull org.bukkit.event.HandlerList
     
    org.bukkit.command.CommandSender
    Gets the CommandSender who sent the message
    Gets the content of the message being sent
    org.bukkit.command.CommandSender
    Gets the CommandSender who is to receive the message
    Set<org.bukkit.entity.Player>
    Gets the list of players who currently have SocialSpy toggled on
    boolean
    Checks whether this event has been cancelled
    void
    setCancelled(boolean cancel)
    Sets whether this event should be cancelled

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • initiator

      private final org.bukkit.command.CommandSender initiator
    • recipient

      private final org.bukkit.command.CommandSender recipient
    • messageContent

      private final String messageContent
    • spyingPlayers

      private final HashSet<org.bukkit.entity.Player> spyingPlayers
    • cancelled

      private boolean cancelled
    • handlers

      private static final org.bukkit.event.HandlerList handlers
  • Constructor Details

    • PrivateMessageEvent

      public PrivateMessageEvent(org.bukkit.command.CommandSender initiator, org.bukkit.command.CommandSender recipient, String messageContent, HashSet<org.bukkit.entity.Player> spyingPlayers)
  • Method Details

    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Gets the handlerList for this event
      Returns:
      HandlerList
    • getInitiator

      public org.bukkit.command.CommandSender getInitiator()
      Gets the CommandSender who sent the message
      Returns:
      CommandSender
    • getRecipient

      public org.bukkit.command.CommandSender getRecipient()
      Gets the CommandSender who is to receive the message
      Returns:
      CommandSender
    • getMessageContent

      public String getMessageContent()
      Gets the content of the message being sent
      Returns:
      String
    • getSpyingPlayers

      public Set<org.bukkit.entity.Player> getSpyingPlayers()
      Gets the list of players who currently have SocialSpy toggled on
      Returns:
      Set<Player>
    • isCancelled

      public boolean isCancelled()
      Checks whether this event has been cancelled
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      boolean
    • setCancelled

      public void setCancelled(boolean cancel)
      Sets whether this event should be cancelled
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancel - boolean