Interface WorldManager

    • Method Detail

      • importWorld

        WorldManager.WorldImportResult importWorld​(@NotNull
                                                   @NotNull org.bukkit.World world,
                                                   boolean vanilla,
                                                   @Nullable
                                                   @Nullable String generator)
        Attempt to import a world that has already been loaded by bukkit
        Parameters:
        world - Loaded world
        vanilla - Whether or not the world is a vanilla world
        generator - The generator name. If this is null, the generator will be guessed from the chunk generator
        Returns:
        The result of the import
      • loadWorlds

        void loadWorlds()
        Load all pre-configured worlds. This will not create the worlds, just load them into the system
      • createWorlds

        void createWorlds()
        Trigger the creation of all non-existent, but loaded worlds
      • addWorld

        void addWorld​(@NotNull
                      @NotNull HyperWorld hyperWorld)
        Add the world to the manager and create the configuration file
        Parameters:
        hyperWorld - World to add
      • registerWorld

        void registerWorld​(@NotNull
                           @NotNull HyperWorld hyperWorld)
        Register the world internally
        Parameters:
        hyperWorld - World to register
      • getWorlds

        @NotNull
        @NotNull Collection<HyperWorld> getWorlds()
        Get all registered worlds
        Returns:
        Immutable view of all recognized worlds
      • getWorld

        @Nullable
        @Nullable HyperWorld getWorld​(@NotNull
                                      @NotNull String name)
        Get a world using its name
        Parameters:
        name - World name
        Returns:
        World, if it exists
      • getWorld

        @Nullable
        @Nullable HyperWorld getWorld​(@NotNull
                                      @NotNull UUID uuid)
        Get a world using its UUID
        Parameters:
        uuid - World UUID
        Returns:
        World, if it exists
      • getWorld

        @Nullable
        @Nullable HyperWorld getWorld​(@NotNull
                                      @NotNull org.bukkit.World world)
        Get a world from a Bukkit world
        Parameters:
        world - Bukkit world
        Returns:
        World, if it exists
      • ignoreWorld

        void ignoreWorld​(@NotNull
                         @NotNull String world)
        Make a world ignored, this means that it won't be registered by the world manager when it is initialized
        Parameters:
        world - World to ignore
      • shouldIgnore

        boolean shouldIgnore​(@NotNull
                             @NotNull String name)
        Check whether or not a world is ignored
        Parameters:
        name - World name
        Returns:
        True if the world is ignored
        See Also:
        To ignore a world
      • getWorldDirectory

        @NotNull
        @NotNull Path getWorldDirectory()
        Get the directory containing world configurations
        Returns:
        Path to configurations
      • unregisterWorld

        void unregisterWorld​(@NotNull
                             @NotNull HyperWorld hyperWorld)
        Remove a world. This will not delete the world, just remove it from the internal maps
        Parameters:
        hyperWorld - World to remove