Merchant
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Members
Getter
Checks if the merchant can restock.
Return Type:
bool
canRestock() as bool
Checks if the merchant can restock.
Returns: true if the merchant can restock.
Return Type:
bool
Getter
Checks if the merchant is on the client side.
Return Type:
bool
isClientSide() as bool
Checks if the merchant is on the client side.
Returns: true if the merchant is on the client side.
Return Type:
bool
notifyTrade(offer as MerchantOffer)
Notifies the merchant that a trade has occurred.
Parameters:
Getter
Gets the notify trade sound of the merchant.
Return Type:
SoundEvent
notifyTradeSound() as SoundEvent
Gets the notify trade sound of the merchant.
Returns: The notify trade sound of the merchant.
Return Type:
SoundEvent
Getter
offers() as MerchantOffers
Gets the
MerchantOffers
of the merchant.Returns: The MerchantOffers
of the merchant.
Return Type:
MerchantOffers
openTradingScreen(player as Player, displayName as Component, level as int)
Getter
Gets if the merchant should show the progress bar.
Return Type:
bool
showProgressBar() as bool
Gets if the merchant should show the progress bar.
Returns: If the merchant should show the progress bar.
Return Type:
bool
Getter
Gets the villager XP of the merchant.
Return Type:
int
villagerXp() as int
Gets the villager XP of the merchant.
Returns: The villager XP of the merchant.
Return Type:
int