Contents
Class AssetPack
java.lang.Object
com.hypixel.hytale.assetstore.AssetPack
- All Implemented Interfaces:
Mod
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhere a pack was loaded from, ordered by priority (highest first).Nested classes/interfaces inherited from interface Mod
Mod.EntryNode<T> -
Constructor Summary
ConstructorsConstructorDescriptionAssetPack(Path packLocation, String name, Path root, FileSystem fileSystem, boolean isImmutable, PluginManifest manifest, AssetPack.PackSource source) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the given path is inside this pack.booleanbooleanChecks whether the pack still exists on disk.getName()getRoot()inthashCode()booleanbooleanResolves a relative path within this pack, preventing path traversal.toString()tryRelativize(Path path) Relativizes the given path against this pack's root.
-
Constructor Details
-
AssetPack
public AssetPack(Path packLocation, @Nonnull String name, @Nonnull Path root, @Nullable FileSystem fileSystem, boolean isImmutable, PluginManifest manifest, @Nonnull AssetPack.PackSource source)
-
-
Method Details
-
getName
-
getRoot
-
getFileSystem
-
getManifest
- Specified by:
getManifestin interfaceMod
-
isImmutable
public boolean isImmutable() -
getPackLocation
-
getSource
-
contains
Checks whether the given path is inside this pack. Safe to call with paths from other filesystems (returns false). -
resolve
Resolves a relative path within this pack, preventing path traversal. Accepts paths from other filesystems, seePathUtil.resolvePathWithinDir(Path, Path).- Returns:
- the resolved path, or null if the path would escape the pack
-
tryRelativize
-
existsOnDisk
public boolean existsOnDisk()Checks whether the pack still exists on disk. Zip and jar backed packs are always considered present while their filesystem is open. -
isCoreMod
-
equals
-
hashCode
-
toString
-