Class AssetTree
java.lang.Object
com.hypixel.hytale.builtin.asseteditor.AssetTree
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean(package private) List<AssetEditorFileEntry> private final booleanprivate final StampedLockprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate final Stringprivate final Path(package private) List<AssetEditorFileEntry> -
Constructor Summary
ConstructorsConstructorDescriptionAssetTree(Path rootPath, String packKey, boolean isReadOnly, boolean canBeDeleted, Collection<AssetTypeHandler> assetTypes) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAssetChanges(Map<Path, ModifiedAsset> createdDirectories, Map<Path, ModifiedAsset> modifiedAssets) ensureAsset(Path path, boolean isDirectory) getAssetFile(Path path) private List<AssetEditorFileEntry> getAssetListForPath(Path path) booleanisDirectoryEmpty(Path path) private voidload(Collection<AssetTypeHandler> assetTypes) private static voidloadServerAssets(Path root, Collection<AssetTypeHandler> assetTypes, List<AssetEditorFileEntry> files) removeAsset(Path path) voidreplaceAssetTree(AssetTree assetTree) voidsendPackets(EditorClient editorClient) private static voidwalkFileTree(Path root, Path dirPath, List<AssetEditorFileEntry> files)
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
lock
-
rootPath
-
packKey
-
isReadOnly
private final boolean isReadOnly -
canBeDeleted
private final boolean canBeDeleted -
serverAssets
List<AssetEditorFileEntry> serverAssets -
commonAssets
List<AssetEditorFileEntry> commonAssets
-
-
Constructor Details
-
AssetTree
-
AssetTree
public AssetTree(Path rootPath, String packKey, boolean isReadOnly, boolean canBeDeleted, @Nonnull Collection<AssetTypeHandler> assetTypes)
-
-
Method Details
-
replaceAssetTree
-
sendPackets
-
isDirectoryEmpty
-
ensureAsset
-
getAssetFile
-
removeAsset
-
applyAssetChanges
public void applyAssetChanges(@Nonnull Map<Path, ModifiedAsset> createdDirectories, @Nonnull Map<Path, ModifiedAsset> modifiedAssets) -
getAssetListForPath
-
load
-
loadServerAssets
private static void loadServerAssets(@Nonnull Path root, @Nonnull Collection<AssetTypeHandler> assetTypes, @Nonnull List<AssetEditorFileEntry> files) throws IOException - Throws:
IOException
-
walkFileTree
private static void walkFileTree(@Nonnull Path root, @Nonnull Path dirPath, @Nonnull List<AssetEditorFileEntry> files) throws IOException - Throws:
IOException
-