Interface Merchant
- All Superinterfaces:
Carrier,DataHolder,DataHolder.Mutable,Locatable,ValueContainer
- All Known Subinterfaces:
Trader,Villager,WanderingTrader
Represents a Merchant which can offer trades to customers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable -
Method Summary
Modifier and TypeMethodDescriptioncustomer()Gets the currently trading customer with this merchant.voidsetCustomer(@Nullable Humanoid humanoid) Sets the currently trading customer with this merchant.default ListValue.Mutable<TradeOffer>Methods inherited from interface org.spongepowered.api.data.DataHolder.Mutable
copyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undoMethods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation, world
-
Method Details
-
customer
Gets the currently trading customer with this merchant.- Returns:
- The currently trading customer if available
-
setCustomer
Sets the currently trading customer with this merchant.If the humanoid is available, a new trading window may open with this merchant.
- Parameters:
humanoid- The humanoid to trade with
-
tradeOffers
- Returns:
- The trade offers offered by the merchant
-