Class UserMailEvent

java.lang.Object
org.bukkit.event.Event
net.essentialsx.api.v2.events.UserMailEvent
All Implemented Interfaces:
Cancellable

public class UserMailEvent extends Event implements Cancellable
Called when mail is sent to a IUser by another player or the console.

Note: This event has no guarantee of the thread it is fired on, please use Event.isAsynchronous()} to see if this event is off the main Bukkit thread.

  • Constructor Details

  • Method Details

    • getRecipient

      public IUser getRecipient()
      Gets the recipient of this mail.
      Returns:
      the recipient.
    • getMessage

      public MailMessage getMessage()
      Gets the underlying MailMessage for this mail.
      Returns:
      the message.
    • setCancelled

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

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

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()