All Superinterfaces:
ConfigProvider<EnabledWorldsSetting>
All Known Implementing Classes:
BukkitWorldRepository

public interface WorldRepository extends ConfigProvider<EnabledWorldsSetting>
  • Method Details

    • get

      Returns the current EnabledWorldsSetting.
      Specified by:
      get in interface ConfigProvider<EnabledWorldsSetting>
      Returns:
      the current enabled worlds setting
    • enabledUids

      List<UUID> enabledUids()
      Returns a list of world uuids that are enabled by the plugin config. Only world uuids that match a current server world are included in the list.
      Returns:
      List of enabled world uuids
    • enabledNames

      List<String> enabledNames()
      get collection of enabled world names from registry
      Returns:
      a Collection of String containing enabled world names
    • aliasOrName

      Optional<String> aliasOrName(UUID worldUid)
    • isEnabled

      boolean isEnabled(UUID worldUID)
      Check if a world is enabled by bukkit world UID
      Parameters:
      worldUID - Unique Identifier for world
      Returns:
      true if world is enabled, false if disabled
    • isEnabled

      boolean isEnabled(String worldName)
      Check if a world is enabled by name
      Parameters:
      worldName - name of world as string to check
      Returns:
      true if world is enabled, false if disabled
    • contains

      @Contract(pure=true) boolean contains(UUID uuid)
      check if uuid is present in the registry
      Parameters:
      uuid - the uuid of a world
      Returns:
      boolean true if the world uuid is present in the registry, or false if not
    • spawnLocation

      Optional<org.bukkit.Location> spawnLocation(UUID worldUid)