Package com.djrapitops.plan.storage.file
Class SpongePlanFiles
java.lang.Object
com.djrapitops.plan.storage.file.PlanFiles
com.djrapitops.plan.storage.file.SpongePlanFiles
- All Implemented Interfaces:
SubSystem
Implements jar resource fetching with Sponge Asset API.
-
Field Summary
Fields inherited from class com.djrapitops.plan.storage.file.PlanFiles
getResourceStream
-
Constructor Summary
ConstructorDescriptionSpongePlanFiles(File dataFolder, JarResource.StreamFunction getResourceStream, PlanPlugin plugin, dagger.Lazy<PlanConfig> config)
-
Method Summary
Modifier and TypeMethodDescriptiongetResourceFromJar(String resourceName)
Get a file in the jar as aResource
.Methods inherited from class com.djrapitops.plan.storage.file.PlanFiles
attemptToFind, disable, enable, getConfigFile, getCustomizableResource, getCustomizationDirectory, getDataDirectory, getDataFolder, getFileFromPluginFolder, getJSONStorageDirectory, getLocaleFile, getLogsDirectory, getLogsFolder, getResourceFromPluginFolder
-
Constructor Details
-
SpongePlanFiles
@Inject public SpongePlanFiles(@Named("dataFolder") File dataFolder, JarResource.StreamFunction getResourceStream, PlanPlugin plugin, dagger.Lazy<PlanConfig> config)
-
-
Method Details
-
getResourceFromJar
Description copied from class:PlanFiles
Get a file in the jar as aResource
.- Overrides:
getResourceFromJar
in classPlanFiles
- Parameters:
resourceName
- Path to the file inside jar/assets/plan/ folder.- Returns:
- a
Resource
for accessing the resource.
-