Class StatusUpdateEvent

java.lang.Object
me.remigio07.chatplugin.api.common.event.discord.StatusUpdateEvent
All Implemented Interfaces:
CancellableEvent, ChatPluginEvent

public class StatusUpdateEvent extends Object implements ChatPluginEvent, CancellableEvent
Represents the event called just before the DiscordBot's status is changed.
See Also:
  • Constructor Details

    • StatusUpdateEvent

      public StatusUpdateEvent(ActivityTypeAdapter activityType, String value)
      Constructs a new status update event.
      Parameters:
      activityType - Status' activity's type
      value - Status' value
  • Method Details

    • isCancelled

      public boolean isCancelled()
      Description copied from interface: CancellableEvent
      Checks if this event has been cancelled and will not be executed.
      Specified by:
      isCancelled in interface CancellableEvent
      Returns:
      Whether this event is cancelled
    • setCancelled

      public void setCancelled(boolean cancelled)
      Description copied from interface: CancellableEvent
      Sets the cancellation state of this event.

      It will be passed through other registered listeners even if it is cancelled, but it will not be executed.

      Specified by:
      setCancelled in interface CancellableEvent
      Parameters:
      cancelled - Whether this event should be cancelled
    • getActivityType

      public ActivityTypeAdapter getActivityType()
      Gets the new status' activity's type
      Returns:
      Status' activity's type
    • getValue

      public String getValue()
      Gets the new status' value.
      Returns:
      Status' value