Class BarterShopAsset

java.lang.Object
com.hypixel.hytale.builtin.adventure.shop.barter.BarterShopAsset
All Implemented Interfaces:
JsonAsset<String>, JsonAssetWithMap<String, DefaultAssetMap<String, BarterShopAsset>>

public class BarterShopAsset extends Object implements JsonAssetWithMap<String, DefaultAssetMap<String, BarterShopAsset>>
Asset definition for a barter shop, containing trades and refresh settings. Loaded from Server/BarterShops/*.json files.
  • Field Details

  • Constructor Details

  • Method Details

    • getAssetStore

      @Nonnull public static AssetStore<String, BarterShopAsset, DefaultAssetMap<String, BarterShopAsset>> getAssetStore()
    • getAssetMap

      public static DefaultAssetMap<String, BarterShopAsset> getAssetMap()
    • getId

      public String getId()
      Specified by:
      getId in interface JsonAsset<String>
    • getDisplayNameKey

      public String getDisplayNameKey()
    • getRefreshInterval

      public RefreshInterval getRefreshInterval()
    • getTrades

      public BarterTrade[] getTrades()
    • getTradeSlots

      @Nullable public TradeSlot[] getTradeSlots()
      Returns:
      the trade slot definitions for this shop, or null if using legacy Trades array
    • hasTradeSlots

      public boolean hasTradeSlots()
      Check if this shop uses the new TradeSlots system.
      Returns:
      true if using TradeSlots, false if using legacy Trades array
    • getRestockHour

      public int getRestockHour()
      Get the hour (in 24h format) when this shop restocks.
      Returns:
      the configured restocking hour, or DEFAULT_RESTOCK_HOUR (7 AM) if not specified
    • toString

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