Merchant
Link to merchant
Importing the class
Link to importing-the-class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.entity.type.villager.Merchant;
Methods
Link to methods
Name: canRestock
Return Type: boolean
ZenScript Copy// Merchant.canRestock() as boolean
myMerchant.canRestock();
Name: getNotifyTradeSound
Return Type: SoundEvent
ZenScript Copy// Merchant.getNotifyTradeSound() as SoundEvent
myMerchant.getNotifyTradeSound();
Name: getOffers
Return Type: MerchantOffers
ZenScript Copy// Merchant.getOffers() as MerchantOffers
myMerchant.getOffers();
Name: getTradingPlayer
Return Type: Player?
ZenScript Copy// Merchant.getTradingPlayer() as Player?
myMerchant.getTradingPlayer();
Name: getVillagerXp
Return Type: int
ZenScript Copy// Merchant.getVillagerXp() as int
myMerchant.getVillagerXp();
Name: isClientSide
Return Type: boolean
ZenScript Copy// Merchant.isClientSide() as boolean
myMerchant.isClientSide();
Name: notifyTrade
ZenScript CopyMerchant.notifyTrade(offer as MerchantOffer)
Parameter | Type |
---|---|
Parameter offer | Type MerchantOffer |
Name: notifyTradeUpdated
ZenScript CopyMerchant.notifyTradeUpdated(stack as ItemStack)
Parameter | Type |
---|---|
Parameter stack | Type format@@0 ItemStack |
Name: setTradingPlayer
ZenScript CopyMerchant.setTradingPlayer(player as Player?)
Parameter | Type |
---|---|
Parameter player | Type Player? |
Name: showProgressBar
Return Type: boolean
ZenScript Copy// Merchant.showProgressBar() as boolean
myMerchant.showProgressBar();
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name canRestock | Type boolean | Has Getter true | Has Setter false |
Name isClientSide | Type boolean | Has Getter true | Has Setter false |
Name notifyTradeSound | Type SoundEvent | Has Getter true | Has Setter false |
Name offers | Type MerchantOffers | Has Getter true | Has Setter false |
Name showProgressBar | Type boolean | Has Getter true | Has Setter false |
Name tradingPlayer | Type Merchant | Has Getter true | Has Setter true |
Name villagerXp | Type int | Has Getter true | Has Setter false |