Interface LevelProviderFactory

All Known Implementing Classes:
AnvilProviderFactory, LevelDBProviderFactory

public interface LevelProviderFactory
  • Method Summary

    Modifier and Type
    Method
    Description
    create​(String levelId, Path levelsPath, Executor executor)
    Creates new provider
    boolean
    isCompatible​(String levelId, Path levelsPath)
    Checks if level provider is compatible with directory given
  • Method Details

    • create

      LevelProvider create(String levelId, Path levelsPath, Executor executor) throws IOException
      Creates new provider
      Parameters:
      levelId - level ID
      levelsPath - path of the levels directory (NOT THE LEVEL DIRECTORY ITSELF)
      executor - executor to run tasks async
      Returns:
      chunk provider
      Throws:
      IOException - error created provider
    • isCompatible

      boolean isCompatible(String levelId, Path levelsPath)
      Checks if level provider is compatible with directory given
      Parameters:
      levelsPath - path of the levels directory (NOT THE LEVEL DIRECTORY ITSELF)
      levelId - level ID
      Returns:
      true if level is compatible.