Interface DataFolder
- All Superinterfaces:
GetClassLoader
An interface for
Expansion
to make it easier to get the data folder-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull File
Get the data folder of the expansiondefault @Nullable InputStream
getResource
(@NotNull String path) Get the resource from the expansion jarstatic String
normalizeJarPath
(String path) default void
saveResource
(@NotNull String path, boolean replace) Copy the resource from the expansion jarMethods inherited from interface me.hsgamer.hscore.expansion.extra.expansion.GetClassLoader
getExpansionClassLoader
-
Method Details
-
normalizeJarPath
-
getDataFolder
Get the data folder of the expansion- Returns:
- the data folder
-
getResource
Get the resource from the expansion jar- Parameters:
path
- path to resource- Returns:
- the InputStream of the resource, or null if it's not found
-
saveResource
Copy the resource from the expansion jar- Parameters:
path
- path to resourcereplace
- whether it replaces the existed one
-