Class AssetModule

All Implemented Interfaces:
CommandOwner

public class AssetModule extends JavaPlugin
  • Field Details

  • Constructor Details

  • Method Details

    • get

      public static AssetModule get()
    • getBaseAssetPack

      @Nonnull public AssetPack getBaseAssetPack()
    • getAssetPacks

      @Nonnull public List<AssetPack> getAssetPacks()
    • getAssetMonitor

      @Nullable public AssetMonitor getAssetMonitor()
    • findAssetPackForPath

      @Nullable public AssetPack findAssetPackForPath(Path path)
    • isWithinPackSubDir

      public boolean isWithinPackSubDir(@Nonnull Path path, @Nonnull String subDir)
      Checks if a path is within any asset pack's specified subdirectory.
      Parameters:
      path - the path to check
      subDir - the subdirectory within packs (e.g. "Server/Imports/Models")
      Returns:
      true if the path is within any pack's subdirectory
    • isAssetPathImmutable

      public boolean isAssetPathImmutable(@Nonnull Path path)
      Parameters:
      path - the path to test
      Returns:
      true if the path is under an immutable asset pack
    • registerPack

      public boolean registerPack(@Nonnull String name, @Nonnull Path path, @Nonnull PluginManifest manifest, @Nonnull AssetPack.PackSource source)
    • unregisterPack

      public void unregisterPack(@Nonnull String name)
    • validatePackExistsOnDisk

      public boolean validatePackExistsOnDisk(@Nonnull AssetPack pack)
    • getAssetPack

      public AssetPack getAssetPack(@Nonnull String name)
    • initPendingStores

      public void initPendingStores()