Class SimpleWorldManager

    • Method Detail

      • loadWorlds

        public void loadWorlds()
        Description copied from interface: WorldManager
        Load all pre-configured worlds. This will not create the worlds, just load them into the system
        Specified by:
        loadWorlds in interface WorldManager
      • createWorlds

        public void createWorlds()
        Description copied from interface: WorldManager
        Trigger the creation of all non-existent, but loaded worlds
        Specified by:
        createWorlds in interface WorldManager
      • onServerLoadEvent

        public void onServerLoadEvent​(org.bukkit.event.server.ServerLoadEvent event)
      • onPluginLoad

        public void onPluginLoad​(org.bukkit.event.server.PluginEnableEvent enableEvent)
      • importWorld

        public WorldManager.WorldImportResult importWorld​(@NotNull
                                                          @NotNull org.bukkit.World world,
                                                          boolean vanilla,
                                                          @Nullable
                                                          @Nullable String generator)
        Description copied from interface: WorldManager
        Attempt to import a world that has already been loaded by bukkit
        Specified by:
        importWorld in interface WorldManager
        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
      • addWorld

        public void addWorld​(@NotNull
                             @NotNull HyperWorld hyperWorld)
        Description copied from interface: WorldManager
        Add the world to the manager and create the configuration file
        Specified by:
        addWorld in interface WorldManager
        Parameters:
        hyperWorld - World to add
      • registerWorld

        public void registerWorld​(@NotNull
                                  @NotNull HyperWorld hyperWorld)
        Description copied from interface: WorldManager
        Register the world internally
        Specified by:
        registerWorld in interface WorldManager
        Parameters:
        hyperWorld - World to register
      • shouldIgnore

        public boolean shouldIgnore​(@NotNull
                                    @NotNull String name)
        Description copied from interface: WorldManager
        Check whether or not a world is ignored
        Specified by:
        shouldIgnore in interface WorldManager
        Parameters:
        name - World name
        Returns:
        True if the world is ignored
        See Also:
        To ignore a world
      • ignoreWorld

        public void ignoreWorld​(@NotNull
                                @NotNull String name)
        Description copied from interface: WorldManager
        Make a world ignored, this means that it won't be registered by the world manager when it is initialized
        Specified by:
        ignoreWorld in interface WorldManager
        Parameters:
        name - World to ignore
      • getWorld

        @Nullable
        public @Nullable HyperWorld getWorld​(@NotNull
                                             @NotNull String name)
        Description copied from interface: WorldManager
        Get a world using its name
        Specified by:
        getWorld in interface WorldManager
        Parameters:
        name - World name
        Returns:
        World, if it exists
      • getWorld

        @Nullable
        public @Nullable HyperWorld getWorld​(@NotNull
                                             @NotNull UUID uuid)
        Description copied from interface: WorldManager
        Get a world using its UUID
        Specified by:
        getWorld in interface WorldManager
        Parameters:
        uuid - World UUID
        Returns:
        World, if it exists
      • getWorld

        @Nullable
        public @Nullable HyperWorld getWorld​(@NotNull
                                             @NotNull org.bukkit.World world)
        Description copied from interface: WorldManager
        Get a world from a Bukkit world
        Specified by:
        getWorld in interface WorldManager
        Parameters:
        world - Bukkit world
        Returns:
        World, if it exists
      • getWorldDirectory

        @NotNull
        public @NotNull Path getWorldDirectory()
        Description copied from interface: WorldManager
        Get the directory containing world configurations
        Specified by:
        getWorldDirectory in interface WorldManager
        Returns:
        Path to configurations
      • unregisterWorld

        public void unregisterWorld​(@NotNull
                                    @NotNull HyperWorld hyperWorld)
        Description copied from interface: WorldManager
        Remove a world. This will not delete the world, just remove it from the internal maps
        Specified by:
        unregisterWorld in interface WorldManager
        Parameters:
        hyperWorld - World to remove