Class DiscordLinkStatusChangeEvent

java.lang.Object
org.bukkit.event.Event
net.essentialsx.api.v2.events.discordlink.DiscordLinkStatusChangeEvent

public class DiscordLinkStatusChangeEvent extends Event
Fired when a User's link status has changed.
  • Constructor Details

    • DiscordLinkStatusChangeEvent

      public DiscordLinkStatusChangeEvent(net.ess3.api.IUser user, net.essentialsx.api.v2.services.discord.InteractionMember member, String memberId, boolean state, DiscordLinkStatusChangeEvent.Cause cause)
  • Method Details

    • getUser

      public net.ess3.api.IUser getUser()
      Gets the Essentials user whose link status has been changed in this event.
      Returns:
      the user.
    • getMember

      public net.essentialsx.api.v2.services.discord.InteractionMember getMember()
      Gets the Discord member whose link status has been changed in this event.

      This will return null if getCause() returns DiscordLinkStatusChangeEvent.Cause.UNSYNC_LEAVE.

      Returns:
      the member or null.
      See Also:
    • getMemberId

      public String getMemberId()
      Gets the ID of the Discord member whose link status has been changed in this event.

      Unlink getMember(), this method will never return null.

      Returns:
      the member's id.
    • isLinked

      public boolean isLinked()
      Gets the new link status of this user after this event.
      Returns:
      true if the user is linked to a discord account.
    • getCause

      The cause which triggered this event.
      Returns:
      the cause.
      See Also:
    • getHandlers

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

      public static HandlerList getHandlerList()