public class DirectoryYamlDriver extends java.lang.Object implements RegionDriver
YamlRegionFile.| Constructor and Description |
|---|
DirectoryYamlDriver(java.io.File rootDir,
java.lang.String filename)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
RegionDatabase |
get(java.lang.String id)
Get a region database for a world.
|
java.util.List<RegionDatabase> |
getAll()
Fetch all the region databases that have been stored using this driver.
|
public DirectoryYamlDriver(java.io.File rootDir,
java.lang.String filename)
rootDir - the directory where the world folders residefilename - the filename (i.e. "regions.yml")public RegionDatabase get(java.lang.String id)
RegionDriverThe given name should be a unique name for the world. Due to legacy reasons, there are no stipulations on the case sensitivity of the name. Historically, however, if the driver is a file-based driver, case-sensitivity will vary on whether the underlying filesystem is case-sensitive.
This method should return quickly.
get in interface RegionDriverid - the name of the world, which may be case sensitivepublic java.util.List<RegionDatabase> getAll() throws StorageException
RegionDriverAs this may require a query to be performed, this method may block for a prolonged period of time.
getAll in interface RegionDriverStorageException - thrown if the fetch operation fails