Class DiscordLinkStatusChangeEvent
java.lang.Object
org.bukkit.event.Event
net.essentialsx.api.v2.events.discordlink.DiscordLinkStatusChangeEvent
Fired when a User's link status has changed.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The cause of the link status change.Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionDiscordLinkStatusChangeEvent
(net.ess3.api.IUser user, net.essentialsx.api.v2.services.discord.InteractionMember member, String memberId, boolean state, DiscordLinkStatusChangeEvent.Cause cause) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
The cause which triggered this event.static HandlerList
net.essentialsx.api.v2.services.discord.InteractionMember
Gets the Discordmember
whose link status has been changed in this event.Gets the ID of the Discord member whose link status has been changed in this event.net.ess3.api.IUser
getUser()
Gets the Essentialsuser
whose link status has been changed in this event.boolean
isLinked()
Gets the new link status of thisuser
after this event.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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 Essentialsuser
whose link status has been changed in this event.- Returns:
- the user.
-
getMember
public net.essentialsx.api.v2.services.discord.InteractionMember getMember()Gets the Discordmember
whose link status has been changed in this event.This will return
null
ifgetCause()
returnsDiscordLinkStatusChangeEvent.Cause.UNSYNC_LEAVE
.- Returns:
- the member or null.
- See Also:
-
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 thisuser
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
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-