示例#1
0
  @Override
  public ItemStack clone() {
    try {
      ItemStack itemStack = (ItemStack) super.clone();

      if (this.meta != null) {
        itemStack.meta = this.meta.clone();
      }

      if (this.data != null) {
        itemStack.data = this.data.clone();
      }

      return itemStack;
    } catch (CloneNotSupportedException e) {
      throw new Error(e);
    }
  }