Class ShutdownEvent

java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.general.ShutdownEvent
All Implemented Interfaces:
Cancellable

public final class ShutdownEvent extends Event implements Cancellable
Called when the game/server shuts down. This event does not get triggered when the server process was killed or when the server crashes.
  • Method Details

    • isForceShutdown

      public boolean isForceShutdown()
      Gets whether or not this is an immediate force shutdown. In this case you cannot cancel the event!
      Returns:
      true if this is a force-shutdown (e.g via "shutdown now" command), false if not
    • isCancelled

      public boolean isCancelled()
      /////////////////////////////////////////////////////////////////////////
      Specified by:
      isCancelled in interface Cancellable
      Returns:
      true if the event is cancelled, or false if not.
    • setCancelled

      public void setCancelled(boolean cancel)
      Description copied from interface: Cancellable
      Cancels this event. This means it will no longer be executed, but other plugins will still receive the event.

      Specified by:
      setCancelled in interface Cancellable
      Parameters:
      cancel - set to true if you want to cancel this event.