接口 CraftingInventory
合成台的用户界面接口.
-
方法概要
从接口继承的方法 org.bukkit.inventory.Inventory
addItem, all, all, clear, clear, contains, contains, contains, contains, containsAtLeast, first, first, firstEmpty, getContents, getHolder, getItem, getLocation, getMaxStackSize, getSize, getStorageContents, getType, getViewers, isEmpty, iterator, iterator, remove, remove, removeItem, setContents, setItem, setMaxStackSize, setStorageContents从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
方法详细资料
-
getResult
获取合成台产生的合成品.原文:Check what item is in the result slot of this crafting inventory.
- 返回:
- 合成品.
-
getMatrix
获取合成公式.原文:Get the contents of the crafting matrix.
- 返回:
- 合成公式. 个别条目可能为null.
-
setResult
设置最终合成品.原文:Set the item in the result slot of the crafting inventory.
- 参数:
newResult- 新合成品.
-
setMatrix
替换合成矩阵的内容.原文:Replace the contents of the crafting matrix.
- 参数:
contents- 新的内容. 个别条目可能为null.- 抛出:
IllegalArgumentException- 如果contents的长度大于合成矩阵的大小.
-
getRecipe
获取当前合成台上形成的合成配方(如果有的话).原文:Get the current recipe formed on the crafting inventory, if any.
- 返回:
- 配方, 如果当前内容不匹配任何配方则返回null.
-