Package com.sk89q.worldedit.util.asset
Class AssetLoader<T>
java.lang.Object
com.sk89q.worldedit.util.asset.AssetLoader<T>
- Direct Known Subclasses:
ImageHeightmapLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe extensions that this asset loader supports.Loads an asset.protected abstract T
loadAssetFromPath
(Path path) Loads an asset from the given file if possible.
-
Constructor Details
-
AssetLoader
-
-
Method Details
-
getAsset
Loads an asset.- Parameters:
path
- path in assets directory, can be with and without its file extension- Returns:
- asset if successfully loaded, null otherwise
-
loadAssetFromPath
Loads an asset from the given file if possible.- Parameters:
path
- The file to load- Returns:
- loaded asset, or null otherwise
- Throws:
Exception
-
getAllowedExtensions
The extensions that this asset loader supports.- Returns:
- The supported extensions
-