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 Pila de objetos |
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
Nombre | Type | Has Getter | Has Setter |
---|---|---|---|
Nombre canRestock | Type boolean | Has Getter true | Has Setter false |
Nombre isClientSide | Type boolean | Has Getter true | Has Setter false |
Nombre notifyTradeSound | Type SoundEvent | Has Getter true | Has Setter false |
Nombre offers | Type MerchantOffers | Has Getter true | Has Setter false |
Nombre showProgressBar | Type boolean | Has Getter true | Has Setter false |
Nombre tradingPlayer | Type Merchant | Has Getter true | Has Setter true |
Nombre villagerXp | Type int | Has Getter true | Has Setter false |