Class ResetCommand


public class ResetCommand extends AbstractAsyncWorldCommand
  • Constructor Details

    • ResetCommand

      public ResetCommand()
  • Method Details

    • execute

      @Nonnull public static CompletableFuture<?> execute(@Nonnull World world)
      Cancels all world-events and resets the gameplay and global event state.

      The global event state covers the whole universe, so only an all-worlds reset clears it. A single-world reset that cleared it would leave the other worlds running global events that the manager no longer holds, and no command could then find or stop them.

      Parameters:
      world - the world to reset, and the fallback thread for the returned future
      Returns:
      a future that completes when every reset task has run