Modifier and Type | Method | Description |
---|---|---|
@NotNull Merchant |
getMerchant() |
Gets the Merchant associated with this inventory.
|
@Nullable MerchantRecipe |
getSelectedRecipe() |
Get the currently active recipe.
|
int |
getSelectedRecipeIndex() |
Get the index of the currently selected recipe.
|
addItem, all, all, clear, clear, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getHolder, getItem, getLocation, getMaxStackSize, getSize, getStorageContents, getType, getViewers, iterator, iterator, remove, remove, removeItem, removeItemAnySlot, setContents, setItem, setMaxStackSize, setStorageContents
forEach, spliterator
int getSelectedRecipeIndex()
@Nullable @Nullable MerchantRecipe getSelectedRecipe()
This will be null
if the items provided by the player do
not match the ingredients of the selected recipe. This does not
necessarily match the recipe selected by the player: If the player has
selected the first recipe, the merchant will search all of its offers
for a matching recipe to activate.
@NotNull @NotNull Merchant getMerchant()
Copyright © 2020. All rights reserved.