public interface Merchant
Modifier and Type | Method and Description |
---|---|
@NotNull MerchantRecipe |
getRecipe(int i)
Get the recipe at a certain index of this merchant's trade list.
|
int |
getRecipeCount()
Get the number of trades this merchant currently has available.
|
@NotNull List<MerchantRecipe> |
getRecipes()
Get a list of trades currently available from this merchant.
|
@Nullable HumanEntity |
getTrader()
Gets the player this merchant is trading with, or null if it is not
currently trading.
|
boolean |
isTrading()
Gets whether this merchant is currently trading.
|
void |
setRecipe(int i,
@NotNull MerchantRecipe recipe)
Set the recipe at a certain index of this merchant's trade list.
|
void |
setRecipes(@NotNull List<MerchantRecipe> recipes)
Set the list of trades currently available from this merchant.
|
@NotNull @NotNull List<MerchantRecipe> getRecipes()
void setRecipes(@NotNull @NotNull List<MerchantRecipe> recipes)
recipes
- a list of recipes@NotNull @NotNull MerchantRecipe getRecipe(int i) throws IndexOutOfBoundsException
i
- the indexIndexOutOfBoundsException
- if recipe index out of boundsvoid setRecipe(int i, @NotNull @NotNull MerchantRecipe recipe) throws IndexOutOfBoundsException
i
- the indexrecipe
- the recipeIndexOutOfBoundsException
- if recipe index out of boundsint getRecipeCount()
boolean isTrading()
@Nullable @Nullable HumanEntity getTrader()
Copyright © 2021. All rights reserved.