Class BarterShopState
java.lang.Object
com.hypixel.hytale.builtin.adventure.shop.barter.BarterShopState
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<BarterShopState> private static BarterShopStateprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate static Pathstatic final BuilderCodec<BarterShopState.ShopInstanceState> private final Map<String, BarterShopState.ShopInstanceState> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static InstantcalculateNextScheduledRestock(Instant gameTime, int intervalDays, int restockHour) voidcheckRefresh(BarterShopAsset asset, Instant gameTime) booleanexecuteTrade(BarterShopAsset asset, int tradeIndex, int quantity, Instant gameTime) static BarterShopStateget()getOrCreateShopState(BarterShopAsset asset, Instant gameTime) getResolvedTrades(BarterShopAsset asset, Instant gameTime) int[]getStockArray(BarterShopAsset asset, Instant gameTime) static voidinitialize(Path dataDirectory) static voidload()static voidsave()static voidshutdown()
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
instance
-
saveDirectory
-
SHOP_INSTANCE_CODEC
-
CODEC
-
shopStates
-
-
Constructor Details
-
BarterShopState
public BarterShopState()
-
-
Method Details
-
initialize
-
get
-
load
public static void load() -
save
public static void save() -
shutdown
public static void shutdown() -
calculateNextScheduledRestock
-
getOrCreateShopState
@Nonnull public BarterShopState.ShopInstanceState getOrCreateShopState(BarterShopAsset asset, @Nonnull Instant gameTime) -
checkRefresh
-
getStockArray
-
getResolvedTrades
-
executeTrade
public boolean executeTrade(BarterShopAsset asset, int tradeIndex, int quantity, @Nonnull Instant gameTime)
-