Module org.spongepowered.plugin.spi
Interface JVMPluginResource
- All Superinterfaces:
PluginResource,ResourceQueryable
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic JVMPluginResourcecreate(Environment environment, String locator, Path... paths) Creates aJVMPluginResourcefrom an array of paths.locateResource(String path) Resolves the location of a bundled resource, given a relative path.manifest()Retrieves the root path containing all the resources.Methods inherited from interface org.spongepowered.plugin.PluginResource
locator, pathMethods inherited from interface org.spongepowered.plugin.ResourceQueryable
openResource
-
Method Details
-
manifest
Manifest manifest() -
resourcesRoot
Path resourcesRoot()Retrieves the root path containing all the resources. This may or may not be the root of the file system containing the resources.- Returns:
- The root path containing all the resources.
-
property
Description copied from interface:PluginResource- Specified by:
propertyin interfacePluginResource- Parameters:
key- The key- Returns:
- The value or
Optional.empty()if not found
-
locateResource
Description copied from interface:ResourceQueryableResolves the location of a bundled resource, given a relative path.- Specified by:
locateResourcein interfaceResourceQueryable- Parameters:
path- The relative path- Returns:
- The resolved resource location, if available
-
create
Creates aJVMPluginResourcefrom an array of paths. Each path can point to a JAR file or a directory. When multiple paths are given, the resulting resource is a virtual union of all files contained by these paths.- Parameters:
environment- The environmentlocator- The locator that created this resourcepaths- The paths- Returns:
- The
JVMPluginResource.
-