程序包 org.bukkit.inventory

# 接口 AnvilInventory

所有超级接口:
  `Inventory`, `Iterable<ItemStack>`

public interface AnvilInventory extends Inventory
铁毡的背包界面接口

- ## 方法概要

  修饰符和类型
  方法
  说明
  `int`
  `getMaximumRepairCost()`
  Get the maximum experience cost (in levels) to be allowed by the current repair.
  `@Nullable String`
  `getRenameText()`
  获取要对于重命名的物品的字符串, 当返回空字符串时则表示是物品的默认名称
  `int`
  `getRepairCost()`
  获取完成当前修复所需要的等级
  `int`
  `getRepairCostAmount()`
  Get the item cost (in amount) to complete the current repair.
  `void`
  `setMaximumRepairCost(int levels)`
  Set the maximum experience cost (in levels) to be allowed by the current repair.
  `void`
  `setRepairCost(int levels)`
  设置完成当前修复所需要的等级.
  `void`
  `setRepairCostAmount(int amount)`
  Set the item cost (in amount) to complete the current repair.

  ### 从接口继承的方法 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`

- ## 方法详细资料

  - ### getRenameText

    @Nullable @Nullable String getRenameText()
    获取要对于重命名的物品的字符串, 当返回空字符串时则表示是物品的默认名称

    原文: Get the name to be applied to the repaired item. An empty string denotes the default item name.

    返回:
      重命名的字符串

  - ### getRepairCostAmount

    int getRepairCostAmount()
    Get the item cost (in amount) to complete the current repair.
    返回:
      the amount

  - ### setRepairCostAmount

    void setRepairCostAmount(int amount)
    Set the item cost (in amount) to complete the current repair.
    参数:
      `amount` - the amount

  - ### getRepairCost

    int getRepairCost()
    获取完成当前修复所需要的等级

    原文: Get the experience cost (in levels) to complete the current repair.

    返回:
      需要花费的经验

  - ### setRepairCost

    void setRepairCost(int levels)
    设置完成当前修复所需要的等级.

    原文:Set the experience cost (in levels) to complete the current repair.

    参数:
      `levels` - 给定的等级

  - ### getMaximumRepairCost

    int getMaximumRepairCost()
    Get the maximum experience cost (in levels) to be allowed by the current repair. If the result of `getRepairCost()` exceeds the returned value, the repair result will be air to due being "too expensive".

    By default, this level is set to 40. Players in creative mode ignore the maximum repair cost.

    返回:
      the maximum experience cost

  - ### setMaximumRepairCost

    void setMaximumRepairCost(int levels)
    Set the maximum experience cost (in levels) to be allowed by the current repair. The default value set by vanilla Minecraft is 40.
    参数:
      `levels` - the maximum experience cost