Class RegionContainerImpl

java.lang.Object
com.sk89q.worldguard.protection.managers.RegionContainerImpl

public class RegionContainerImpl extends Object
Manages different RegionManagers for different worlds or dimensions.

This is an internal class. Do not use it.

  • Constructor Details

    • RegionContainerImpl

      public RegionContainerImpl(RegionDriver driver, FlagRegistry flagRegistry)
      Create a new instance.
      Parameters:
      driver - the region store driver
      flagRegistry - the flag registry
  • Method Details

    • getDriver

      public RegionDriver getDriver()
      Get the region store driver.
      Returns:
      the driver
    • load

      @Nullable public RegionManager load(String name)
      Load the RegionManager for the world with the given name, creating a new instance for the world if one does not exist yet.
      Parameters:
      name - the name of the world
      Returns:
      a region manager, or null if loading failed
    • unload

      public void unload(String name)
      Unload the region manager associated with the given world name.

      If no region manager has been loaded for the given name, then nothing will happen.

      Parameters:
      name - the name of the world
    • unloadAll

      public void unloadAll()
      Unload all region managers and save their contents before returning. This message may block for an extended period of time.
    • shutdown

      public void shutdown()
      Disable completely.
    • get

      @Nullable public RegionManager get(String name)
      Get the region manager for the given world name.
      Parameters:
      name - the name of the world
      Returns:
      a region manager, or null if one was never loaded
    • getLoaded

      public List<RegionManager> getLoaded()
      Get an immutable list of loaded region managers.
      Returns:
      an immutable list
    • getSaveFailures

      public Set<RegionManager> getSaveFailures()
      Get the a set of region managers that are failing to save.
      Returns:
      a set of region managers