Class ResourcePackLoader
java.lang.Object
org.geysermc.geyser.registry.loader.ResourcePackLoader
- All Implemented Interfaces:
RegistryLoader<Path,Map<UUID, org.geysermc.geyser.api.pack.ResourcePack>>
public class ResourcePackLoader
extends Object
implements RegistryLoader<Path,Map<UUID,org.geysermc.geyser.api.pack.ResourcePack>>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ResourcePackLoader
public ResourcePackLoader()
-
-
Method Details
-
load
Loop through the packs directory and locate valid resource pack files- Specified by:
loadin interfaceRegistryLoader<Path,Map<UUID, org.geysermc.geyser.api.pack.ResourcePack>> - Parameters:
directory- the input- Returns:
- the output
-
readPack
Reads a resource pack at the given file. Also searches for a file in the same directory, with the same name but suffixed by ".key", containing the content key. If such file does not exist, no content key is stored.- Parameters:
path- the file to read from, in ZIP format- Returns:
- a
ResourcePackrepresentation - Throws:
IllegalArgumentException- if the pack manifest was invalid or there was any processing exception
-