Class LoadedAssetsEvent<K, T extends JsonAsset<K>, M extends AssetMap<K,T>>

java.lang.Object
com.hypixel.hytale.assetstore.event.AssetsEvent<K,T>
com.hypixel.hytale.assetstore.event.LoadedAssetsEvent<K,T,M>
Type Parameters:
K - The type of the asset key.
T - The type of the asset.
M - The type of the asset map.
All Implemented Interfaces:
IBaseEvent<Class<T>>, IEvent<Class<T>>

public class LoadedAssetsEvent<K, T extends JsonAsset<K>, M extends AssetMap<K,T>> extends AssetsEvent<K,T>
An assets event that is called when assets are loaded into the asset store.
  • Constructor Details

    • LoadedAssetsEvent

      public LoadedAssetsEvent(@Nonnull Class<T> tClass, @Nonnull M assetMap, @Nonnull Map<K,T> loadedAssets, boolean initial, @Nonnull AssetUpdateQuery query)
      Default Constructor for a LoadedAssetsEvent instance.
      Parameters:
      tClass - The class type of the asset.
      assetMap - The asset map the assets were loaded into.
      loadedAssets - A map of the loaded assets.
      initial - Determines whether this was the initial load of assets.
      query - The query that was used to load the assets.
  • Method Details

    • getAssetClass

      public Class<T> getAssetClass()
      Returns:
      the class type of the asset.
    • getAssetMap

      public M getAssetMap()
      Returns:
      the asset map the assets were loaded into.
    • getLoadedAssets

      @Nonnull public Map<K,T> getLoadedAssets()
      Returns:
      a map of the loaded assets.
    • isInitial

      public boolean isInitial()
      Returns:
      true if this was the initial load of assets, false otherwise.
    • getQuery

      @Nonnull public AssetUpdateQuery getQuery()
      Returns:
      the query that was used to load the assets.
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object