Class SlimeWorldManager

java.lang.Object
ua.mcchickenstudio.opencreative.managers.worlds.SlimeWorldManager
All Implemented Interfaces:
Manager, Startable, WorldManager

public final class SlimeWorldManager extends Object implements WorldManager, Startable

SlimeWorldManager

This class represents an advanced slime world manager, that requires using AdvancedSlimePaper instead of PaperMC.
  • Constructor Details

    • SlimeWorldManager

      public SlimeWorldManager()
  • Method Details

    • start

      public void start()
      Description copied from interface: Startable
      Does tasks on start.
      Specified by:
      start in interface Startable
    • createWorld

      @NotNull public @NotNull CompletableFuture<org.bukkit.World> createWorld(@NotNull @NotNull org.bukkit.WorldCreator creator, @NotNull @NotNull Planet planet)
      Description copied from interface: WorldManager
      Creates a new world.

      If specified world is already loaded, it will return that world.

      Specified by:
      createWorld in interface WorldManager
      Parameters:
      creator - world creator with world info.
      planet - planet of world.
      Returns:
      future with world, or error - if failed to load.
    • loadWorld

      @NotNull public @NotNull CompletableFuture<org.bukkit.World> loadWorld(@NotNull @NotNull org.bukkit.WorldCreator creator, @NotNull @NotNull Planet planet)
      Description copied from interface: WorldManager
      Loads world.

      If specified world is already loaded, it will return that world.

      Specified by:
      loadWorld in interface WorldManager
      Parameters:
      creator - world creator with world info.
      planet - planet of world.
      Returns:
      future with world, or error - if failed to load.
    • unloadWorld

      @NotNull public @NotNull CompletableFuture<Void> unloadWorld(@Nullable @Nullable org.bukkit.World world, boolean save, @NotNull @NotNull Planet planet)
      Description copied from interface: WorldManager
      Unloads world.

      NOTE: When using async methods, please check OpenCreative.getPlugin().isEnabled() to make sure if plugin can schedule async tasks or not (when server is shutting down).

      Specified by:
      unloadWorld in interface WorldManager
      Parameters:
      world - world to unload.
      save - save or don't save.
      planet - planet of world.
      Returns:
      future.
    • getName

      @NotNull public @NotNull String getName()
      Description copied from interface: Manager
      Returns name of manager, that will be displayed by request in the logs.
      Specified by:
      getName in interface Manager
      Returns:
      name of manager.