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