Module org.spongepowered.plugin.spi
Interface JVMPluginResource
- All Superinterfaces:
PluginResource
,ResourceQueryable
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JVMPluginResource
create
(Environment environment, String locator, Path... paths) Creates aJVMPluginResource
from 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, path
Methods 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:
property
in interfacePluginResource
- Parameters:
key
- The key- Returns:
- The value or
Optional.empty()
if not found
-
locateResource
Description copied from interface:ResourceQueryable
Resolves the location of a bundled resource, given a relative path.- Specified by:
locateResource
in interfaceResourceQueryable
- Parameters:
path
- The relative path- Returns:
- The resolved resource location, if available
-
create
Creates aJVMPluginResource
from 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
.
-