Scissors-Website/public/javadoc/1.17.1/org/bukkit/inventory/ItemStack.html
2022-07-05 18:33:56 -05:00

1368 lines
137 KiB
HTML

<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>ItemStack (Scissors-API 1.17.1-R0.1-SNAPSHOT API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.bukkit.inventory, class: ItemStack">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../script-dir/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.bukkit.inventory</a></div>
<h1 title="Class ItemStack" class="title">Class ItemStack</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.bukkit.inventory.ItemStack</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a></code>, <code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEventSource.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEventSource</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.ShowItem.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent.ShowItem</a>&gt;</code>, <code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/translation/Translatable.html" title="class or interface in net.kyori.adventure.translation" class="external-link">Translatable</a></code>, <code><a href="../configuration/serialization/ConfigurationSerializable.html" title="interface in org.bukkit.configuration.serialization">ConfigurationSerializable</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">ItemStack</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
implements <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a>, <a href="../configuration/serialization/ConfigurationSerializable.html" title="interface in org.bukkit.configuration.serialization">ConfigurationSerializable</a>, <a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEventSource.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEventSource</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.ShowItem.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent.ShowItem</a>&gt;, <a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/translation/Translatable.html" title="class or interface in net.kyori.adventure.translation" class="external-link">Translatable</a></span></div>
<div class="block">Represents a stack of items.
<p>
<b>IMPORTANT: An <i>Item</i>Stack is only designed to contain <i>items</i>. Do not
use this class to encapsulate Materials for which <a href="../Material.html#isItem()"><code>Material.isItem()</code></a>
returns false.</b></div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ItemStack</a>()</code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>&nbsp;</code></div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.bukkit.inventory.ItemStack)" class="member-name-link">ItemStack</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&nbsp;stack)</code></div>
<div class="col-last odd-row-color">
<div class="block">Creates a new item stack derived from the specified stack</div>
</div>
<div class="col-first even-row-color"><code>&nbsp;</code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.bukkit.Material)" class="member-name-link">ItemStack</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type)</code></div>
<div class="col-last even-row-color">
<div class="block">Defaults stack size to 1, with no extra data.</div>
</div>
<div class="col-first odd-row-color"><code>&nbsp;</code></div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.bukkit.Material,int)" class="member-name-link">ItemStack</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type,
int&nbsp;amount)</code></div>
<div class="col-last odd-row-color">
<div class="block">An item stack with no extra data.</div>
</div>
<div class="col-first even-row-color"><code>&nbsp;</code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.bukkit.Material,int,short)" class="member-name-link">ItemStack</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type,
int&nbsp;amount,
short&nbsp;damage)</code></div>
<div class="col-last even-row-color">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">see <a href="#setDurability(short)"><code>setDurability(short)</code></a></div>
</div>
</div>
<div class="col-first odd-row-color"><code>&nbsp;</code></div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.bukkit.Material,int,short,java.lang.Byte)" class="member-name-link">ItemStack</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type,
int&nbsp;amount,
short&nbsp;damage,
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Byte.html" title="class or interface in java.lang" class="external-link">Byte</a>&nbsp;data)</code></div>
<div class="col-last odd-row-color">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">this method uses an ambiguous data byte object</div>
</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab6', 3)" class="table-tab">Deprecated Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add()" class="member-name-link">add</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds 1 to this itemstack.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(int)" class="member-name-link">add</a><wbr>(int&nbsp;qty)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds quantity to this itemstack.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addEnchantment(org.bukkit.enchantments.Enchantment,int)" class="member-name-link">addEnchantment</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench,
int&nbsp;level)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds the specified <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments"><code>Enchantment</code></a> to this item stack.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addEnchantments(java.util.Map)" class="member-name-link">addEnchantments</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&gt;&nbsp;enchantments)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds the specified enchantments to this item stack.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addItemFlags(org.bukkit.inventory.ItemFlag...)" class="member-name-link">addItemFlags</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemFlag.html" title="enum class in org.bukkit.inventory">ItemFlag</a>...&nbsp;itemFlags)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set itemflags which should be ignored when rendering a ItemStack in the Client.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addUnsafeEnchantment(org.bukkit.enchantments.Enchantment,int)" class="member-name-link">addUnsafeEnchantment</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench,
int&nbsp;level)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds the specified <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments"><code>Enchantment</code></a> to this item stack.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addUnsafeEnchantments(java.util.Map)" class="member-name-link">addUnsafeEnchantments</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&gt;&nbsp;enchantments)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds the specified enchantments to this item stack in an unsafe manner.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.ShowItem.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent.ShowItem</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#asHoverEvent(java.util.function.UnaryOperator)" class="member-name-link">asHoverEvent</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/UnaryOperator.html" title="class or interface in java.util.function" class="external-link">UnaryOperator</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.ShowItem.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent.ShowItem</a>&gt;&nbsp;op)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates a hover event with value derived from this object.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#asOne()" class="member-name-link">asOne</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clones the itemstack and returns it a single quantity.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#asQuantity(int)" class="member-name-link">asQuantity</a><wbr>(int&nbsp;qty)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Clones the itemstack and returns it as the specified quantity</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#canRepair(org.bukkit.inventory.ItemStack)" class="member-name-link">canRepair</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&nbsp;toBeRepaired)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Checks if this itemstack can repair another.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clone()" class="member-name-link">clone</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#containsEnchantment(org.bukkit.enchantments.Enchantment)" class="member-name-link">containsEnchantment</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Checks if this ItemStack contains the given <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments"><code>Enchantment</code></a></div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#deserialize(java.util.Map)" class="member-name-link">deserialize</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&gt;&nbsp;args)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Required method for configuration serialization</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#deserializeBytes(byte%5B%5D)" class="member-name-link">deserializeBytes</a><wbr>(@org.jetbrains.annotations.NotNull byte[]&nbsp;bytes)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Deserializes this itemstack from raw NBT bytes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/Component.html" title="class or interface in net.kyori.adventure.text" class="external-link">Component</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#displayName()" class="member-name-link">displayName</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the formatted display name of the <a href="ItemStack.html" title="class in org.bukkit.inventory"><code>ItemStack</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;M extends <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta">ItemMeta</a>&gt;<br>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#editMeta(java.lang.Class,java.util.function.Consumer)" class="member-name-link">editMeta</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;M&gt;&nbsp;metaClass,
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a>&lt;<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> ? super M&gt;&nbsp;consumer)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Edits the <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a> of this stack if the meta is of the specified type.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#editMeta(java.util.function.Consumer)" class="member-name-link">editMeta</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a>&lt;? super <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta">ItemMeta</a>&gt;&nbsp;consumer)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Edits the <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a> of this stack.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#ensureServerConversions()" class="member-name-link">ensureServerConversions</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;obj)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getAmount()" class="member-name-link">getAmount</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the amount of items in this stack</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="../material/MaterialData.html" title="class in org.bukkit.material">MaterialData</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getData()" class="member-name-link">getData</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the MaterialData for this stack of items</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code>short</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#getDurability()" class="member-name-link">getDurability</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">see <a href="#setDurability(short)"><code>setDurability(short)</code></a></div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getEnchantmentLevel(org.bukkit.enchantments.Enchantment)" class="member-name-link">getEnchantmentLevel</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the level of the specified enchantment on this item stack</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getEnchantments()" class="member-name-link">getEnchantments</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets a map containing all enchantments and their levels on this item.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getI18NDisplayName()" class="member-name-link">getI18NDisplayName</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the Display name as seen in the Client.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="ItemFlag.html" title="enum class in org.bukkit.inventory">ItemFlag</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getItemFlags()" class="member-name-link">getItemFlags</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get current set itemFlags.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta">ItemMeta</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getItemMeta()" class="member-name-link">getItemMeta</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get a copy of this ItemStack's <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#getLore()" class="member-name-link">getLore</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">in favor of <a href="#lore()"><code>lore()</code></a></div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaxItemUseDuration()" class="member-name-link">getMaxItemUseDuration</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaxStackSize()" class="member-name-link">getMaxStackSize</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Get the maximum stacksize for the material hold in this ItemStack.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../../io/papermc/paper/inventory/ItemRarity.html" title="enum class in io.papermc.paper.inventory">ItemRarity</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRarity()" class="member-name-link">getRarity</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the item rarity of the itemstack.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#getTranslationKey()" class="member-name-link">getTranslationKey</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">use <a href="#translationKey()"><code>translationKey()</code></a></div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getType()" class="member-name-link">getType</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the type of this item</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hashCode()" class="member-name-link">hashCode</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hasItemFlag(org.bukkit.inventory.ItemFlag)" class="member-name-link">hasItemFlag</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemFlag.html" title="enum class in org.bukkit.inventory">ItemFlag</a>&nbsp;flag)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Check if the specified flag is present on this item.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hasItemMeta()" class="member-name-link">hasItemMeta</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Checks to see if any meta data has been defined.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isRepairableBy(org.bukkit.inventory.ItemStack)" class="member-name-link">isRepairableBy</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&nbsp;repairMaterial)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Checks if an itemstack can repair this itemstack.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isSimilar(org.bukkit.inventory.ItemStack)" class="member-name-link">isSimilar</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&nbsp;stack)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">This method is the same as equals, but does not consider stack size
(amount).</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/Component.html" title="class or interface in net.kyori.adventure.text" class="external-link">Component</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#lore()" class="member-name-link">lore</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">If the item has lore, returns it, else it will return null</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#lore(java.util.List)" class="member-name-link">lore</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/Component.html" title="class or interface in net.kyori.adventure.text" class="external-link">Component</a>&gt;&nbsp;lore)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the lore for this item.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeEnchantment(org.bukkit.enchantments.Enchantment)" class="member-name-link">removeEnchantment</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Removes the specified <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments"><code>Enchantment</code></a> if it exists on this
ItemStack</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeItemFlags(org.bukkit.inventory.ItemFlag...)" class="member-name-link">removeItemFlags</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemFlag.html" title="enum class in org.bukkit.inventory">ItemFlag</a>...&nbsp;itemFlags)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Remove specific set of itemFlags.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#serialize()" class="member-name-link">serialize</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates a Map representation of this class.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>@org.jetbrains.annotations.NotNull byte[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#serializeAsBytes()" class="member-name-link">serializeAsBytes</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Serializes this itemstack to raw bytes in NBT.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setAmount(int)" class="member-name-link">setAmount</a><wbr>(int&nbsp;amount)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the amount of items in this stack</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setData(org.bukkit.material.MaterialData)" class="member-name-link">setData</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="../material/MaterialData.html" title="class in org.bukkit.material">MaterialData</a>&nbsp;data)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the MaterialData for this stack of items</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#setDurability(short)" class="member-name-link">setDurability</a><wbr>(short&nbsp;durability)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">durability is now part of ItemMeta.</div>
</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setItemMeta(org.bukkit.inventory.meta.ItemMeta)" class="member-name-link">setItemMeta</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta">ItemMeta</a>&nbsp;itemMeta)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Set the ItemMeta of this ItemStack.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#setLore(java.util.List)" class="member-name-link">setLore</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;&nbsp;lore)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">in favour of <a href="#lore(java.util.List)"><code>lore(List)</code></a></div>
</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setType(org.bukkit.Material)" class="member-name-link">setType</a><wbr>(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the type of this item</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#subtract()" class="member-name-link">subtract</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Subtracts 1 to this itemstack.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#subtract(int)" class="member-name-link">subtract</a><wbr>(int&nbsp;qty)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Subtracts quantity to this itemstack.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#translationKey()" class="member-name-link">translationKey</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the translation key.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-net.kyori.adventure.text.event.HoverEventSource">Methods inherited from interface&nbsp;net.kyori.adventure.text.event.<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEventSource.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEventSource</a></h3>
<code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEventSource.html#asHoverEvent()" title="class or interface in net.kyori.adventure.text.event" class="external-link">asHoverEvent</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>ItemStack</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">ItemStack</span>()</div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.bukkit.Material)">
<h3>ItemStack</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ItemStack</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type)</span></div>
<div class="block">Defaults stack size to 1, with no extra data.
<p>
<b>IMPORTANT: An <i>Item</i>Stack is only designed to contain
<i>items</i>. Do not use this class to encapsulate Materials for which
<a href="../Material.html#isItem()"><code>Material.isItem()</code></a> returns false.</b></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - item material</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.bukkit.Material,int)">
<h3>ItemStack</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ItemStack</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type,
int&nbsp;amount)</span></div>
<div class="block">An item stack with no extra data.
<p>
<b>IMPORTANT: An <i>Item</i>Stack is only designed to contain
<i>items</i>. Do not use this class to encapsulate Materials for which
<a href="../Material.html#isItem()"><code>Material.isItem()</code></a> returns false.</b></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - item material</dd>
<dd><code>amount</code> - stack size</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.bukkit.Material,int,short)">
<h3>ItemStack</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="element-name">ItemStack</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type,
int&nbsp;amount,
short&nbsp;damage)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">see <a href="#setDurability(short)"><code>setDurability(short)</code></a></div>
</div>
<div class="block">An item stack with the specified damage / durability</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - item material</dd>
<dd><code>amount</code> - stack size</dd>
<dd><code>damage</code> - durability / damage</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.bukkit.Material,int,short,java.lang.Byte)">
<h3>ItemStack</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="element-name">ItemStack</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type,
int&nbsp;amount,
short&nbsp;damage,
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Byte.html" title="class or interface in java.lang" class="external-link">Byte</a>&nbsp;data)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">this method uses an ambiguous data byte object</div>
</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - the type</dd>
<dd><code>amount</code> - the amount in the stack</dd>
<dd><code>damage</code> - the damage value of the item</dd>
<dd><code>data</code> - the data value or null</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.bukkit.inventory.ItemStack)">
<h3>ItemStack</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">ItemStack</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&nbsp;stack)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Creates a new item stack derived from the specified stack</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>stack</code> - the stack to copy</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the specified stack is null or
returns an item meta not created by the item factory</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getType()">
<h3>getType</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a></span>&nbsp;<span class="element-name">getType</span>()</div>
<div class="block">Gets the type of this item</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Type of the items in this stack</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setType(org.bukkit.Material)">
<h3>setType</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setType</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../Material.html" title="enum class in org.bukkit">Material</a>&nbsp;type)</span></div>
<div class="block">Sets the type of this item
<p>
Note that in doing so you will reset the MaterialData for this stack.
<p>
<b>IMPORTANT: An <i>Item</i>Stack is only designed to contain
<i>items</i>. Do not use this class to encapsulate Materials for which
<a href="../Material.html#isItem()"><code>Material.isItem()</code></a> returns false.</b></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - New type to set the items in this stack to</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getAmount()">
<h3>getAmount</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getAmount</span>()</div>
<div class="block">Gets the amount of items in this stack</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Amount of items in this stack</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setAmount(int)">
<h3>setAmount</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setAmount</span><wbr><span class="parameters">(int&nbsp;amount)</span></div>
<div class="block">Sets the amount of items in this stack</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>amount</code> - New amount of items in this stack</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getData()">
<h3>getData</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="../material/MaterialData.html" title="class in org.bukkit.material">MaterialData</a></span>&nbsp;<span class="element-name">getData</span>()</div>
<div class="block">Gets the MaterialData for this stack of items</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>MaterialData for this item</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setData(org.bukkit.material.MaterialData)">
<h3>setData</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setData</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="../material/MaterialData.html" title="class in org.bukkit.material">MaterialData</a>&nbsp;data)</span></div>
<div class="block">Sets the MaterialData for this stack of items</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>data</code> - New MaterialData for this item</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setDurability(short)">
<h3>setDurability</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setDurability</span><wbr><span class="parameters">(short&nbsp;durability)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">durability is now part of ItemMeta. To avoid confusion and
misuse, <a href="#getItemMeta()"><code>getItemMeta()</code></a>, <a href="#setItemMeta(org.bukkit.inventory.meta.ItemMeta)"><code>setItemMeta(ItemMeta)</code></a> and
<a href="meta/Damageable.html#setDamage(int)"><code>Damageable.setDamage(int)</code></a> should be used instead. This is because
any call to this method will be overwritten by subsequent setting of
ItemMeta which was created before this call.</div>
</div>
<div class="block">Sets the durability of this item</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>durability</code> - Durability of this item</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDurability()">
<h3>getDurability</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">short</span>&nbsp;<span class="element-name">getDurability</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">see <a href="#setDurability(short)"><code>setDurability(short)</code></a></div>
</div>
<div class="block">Gets the durability of this item</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Durability of this item</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxStackSize()">
<h3>getMaxStackSize</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getMaxStackSize</span>()</div>
<div class="block">Get the maximum stacksize for the material hold in this ItemStack.
(Returns -1 if it has no idea)</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The maximum you can stack this material to.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="equals(java.lang.Object)">
<h3>equals</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">equals</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;obj)</span></div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isSimilar(org.bukkit.inventory.ItemStack)">
<h3>isSimilar</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isSimilar</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&nbsp;stack)</span></div>
<div class="block">This method is the same as equals, but does not consider stack size
(amount).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>stack</code> - the item stack to compare to</dd>
<dt>Returns:</dt>
<dd>true if the two stacks are equal, ignoring the amount</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clone()">
<h3>clone</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">clone</span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hashCode()">
<h3>hashCode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">hashCode</span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="containsEnchantment(org.bukkit.enchantments.Enchantment)">
<h3>containsEnchantment</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">containsEnchantment</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench)</span></div>
<div class="block">Checks if this ItemStack contains the given <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments"><code>Enchantment</code></a></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>ench</code> - Enchantment to test</dd>
<dt>Returns:</dt>
<dd>True if this has the given enchantment</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getEnchantmentLevel(org.bukkit.enchantments.Enchantment)">
<h3>getEnchantmentLevel</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getEnchantmentLevel</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench)</span></div>
<div class="block">Gets the level of the specified enchantment on this item stack</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>ench</code> - Enchantment to check</dd>
<dt>Returns:</dt>
<dd>Level of the enchantment, or 0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getEnchantments()">
<h3>getEnchantments</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&gt;</span>&nbsp;<span class="element-name">getEnchantments</span>()</div>
<div class="block">Gets a map containing all enchantments and their levels on this item.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Map of enchantments.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addEnchantments(java.util.Map)">
<h3>addEnchantments</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addEnchantments</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&gt;&nbsp;enchantments)</span></div>
<div class="block">Adds the specified enchantments to this item stack.
<p>
This method is the same as calling <a href="#addEnchantment(org.bukkit.enchantments.Enchantment,int)"><code>addEnchantment(org.bukkit.enchantments.Enchantment, int)</code></a> for each
element of the map.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>enchantments</code> - Enchantments to add</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the specified enchantments is null</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if any specific enchantment or level
is null. <b>Warning</b>: Some enchantments may be added before this
exception is thrown.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addEnchantment(org.bukkit.enchantments.Enchantment,int)">
<h3>addEnchantment</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addEnchantment</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench,
int&nbsp;level)</span></div>
<div class="block">Adds the specified <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments"><code>Enchantment</code></a> to this item stack.
<p>
If this item stack already contained the given enchantment (at any
level), it will be replaced.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>ench</code> - Enchantment to add</dd>
<dd><code>level</code> - Level of the enchantment</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if enchantment null, or enchantment is
not applicable</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addUnsafeEnchantments(java.util.Map)">
<h3>addUnsafeEnchantments</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addUnsafeEnchantments</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link">Integer</a>&gt;&nbsp;enchantments)</span></div>
<div class="block">Adds the specified enchantments to this item stack in an unsafe manner.
<p>
This method is the same as calling <a href="#addUnsafeEnchantment(org.bukkit.enchantments.Enchantment,int)"><code>addUnsafeEnchantment(org.bukkit.enchantments.Enchantment, int)</code></a> for
each element of the map.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>enchantments</code> - Enchantments to add</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addUnsafeEnchantment(org.bukkit.enchantments.Enchantment,int)">
<h3>addUnsafeEnchantment</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addUnsafeEnchantment</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench,
int&nbsp;level)</span></div>
<div class="block">Adds the specified <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments"><code>Enchantment</code></a> to this item stack.
<p>
If this item stack already contained the given enchantment (at any
level), it will be replaced.
<p>
This method is unsafe and will ignore level restrictions or item type.
Use at your own discretion.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>ench</code> - Enchantment to add</dd>
<dd><code>level</code> - Level of the enchantment</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="removeEnchantment(org.bukkit.enchantments.Enchantment)">
<h3>removeEnchantment</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">removeEnchantment</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments">Enchantment</a>&nbsp;ench)</span></div>
<div class="block">Removes the specified <a href="../enchantments/Enchantment.html" title="class in org.bukkit.enchantments"><code>Enchantment</code></a> if it exists on this
ItemStack</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>ench</code> - Enchantment to remove</dd>
<dt>Returns:</dt>
<dd>Previous level, or 0</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="serialize()">
<h3>serialize</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&gt;</span>&nbsp;<span class="element-name">serialize</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="../configuration/serialization/ConfigurationSerializable.html#serialize()">ConfigurationSerializable</a></code></span></div>
<div class="block">Creates a Map representation of this class.
<p>
This class must provide a method to restore this class, as defined in
the <a href="../configuration/serialization/ConfigurationSerializable.html" title="interface in org.bukkit.configuration.serialization"><code>ConfigurationSerializable</code></a> interface javadocs.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../configuration/serialization/ConfigurationSerializable.html#serialize()">serialize</a></code>&nbsp;in interface&nbsp;<code><a href="../configuration/serialization/ConfigurationSerializable.html" title="interface in org.bukkit.configuration.serialization">ConfigurationSerializable</a></code></dd>
<dt>Returns:</dt>
<dd>Map containing the current state of this class</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deserialize(java.util.Map)">
<h3>deserialize</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">deserialize</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&gt;&nbsp;args)</span></div>
<div class="block">Required method for configuration serialization</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>args</code> - map to deserialize</dd>
<dt>Returns:</dt>
<dd>deserialized item stack</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="../configuration/serialization/ConfigurationSerializable.html" title="interface in org.bukkit.configuration.serialization"><code>ConfigurationSerializable</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="editMeta(java.util.function.Consumer)">
<h3>editMeta</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">editMeta</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a>&lt;? super <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta">ItemMeta</a>&gt;&nbsp;consumer)</span></div>
<div class="block">Edits the <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a> of this stack.
<p>
The <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link"><code>Consumer</code></a> must only interact
with this stack's <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a> through the provided <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a> instance.
Calling this method or any other meta-related method of the <a href="ItemStack.html" title="class in org.bukkit.inventory"><code>ItemStack</code></a> class
(such as <a href="#getItemMeta()"><code>getItemMeta()</code></a>, <a href="#addItemFlags(org.bukkit.inventory.ItemFlag...)"><code>addItemFlags(ItemFlag...)</code></a>, <a href="#lore()"><code>lore()</code></a>, etc.)
from inside the consumer is disallowed and will produce undefined results or exceptions.
</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>consumer</code> - the meta consumer</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the edit was successful, <code>false</code> otherwise</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="editMeta(java.lang.Class,java.util.function.Consumer)">
<h3>editMeta</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;M extends <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta">ItemMeta</a>&gt;</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">editMeta</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;M&gt;&nbsp;metaClass,
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a>&lt;<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> ? super M&gt;&nbsp;consumer)</span></div>
<div class="block">Edits the <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a> of this stack if the meta is of the specified type.
<p>
The <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link"><code>Consumer</code></a> must only interact
with this stack's <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a> through the provided <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a> instance.
Calling this method or any other meta-related method of the <a href="ItemStack.html" title="class in org.bukkit.inventory"><code>ItemStack</code></a> class
(such as <a href="#getItemMeta()"><code>getItemMeta()</code></a>, <a href="#addItemFlags(org.bukkit.inventory.ItemFlag...)"><code>addItemFlags(ItemFlag...)</code></a>, <a href="#lore()"><code>lore()</code></a>, etc.)
from inside the consumer is disallowed and will produce undefined results or exceptions.
</p></div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>M</code> - the meta type</dd>
<dt>Parameters:</dt>
<dd><code>metaClass</code> - the type of meta to edit</dd>
<dd><code>consumer</code> - the meta consumer</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the edit was successful, <code>false</code> otherwise</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getItemMeta()">
<h3>getItemMeta</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta">ItemMeta</a></span>&nbsp;<span class="element-name">getItemMeta</span>()</div>
<div class="block">Get a copy of this ItemStack's <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta"><code>ItemMeta</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>a copy of the current ItemStack's ItemData</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hasItemMeta()">
<h3>hasItemMeta</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">hasItemMeta</span>()</div>
<div class="block">Checks to see if any meta data has been defined.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Returns true if some meta data has been set for this item</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setItemMeta(org.bukkit.inventory.meta.ItemMeta)">
<h3>setItemMeta</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">setItemMeta</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="meta/ItemMeta.html" title="interface in org.bukkit.inventory.meta">ItemMeta</a>&nbsp;itemMeta)</span></div>
<div class="block">Set the ItemMeta of this ItemStack.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>itemMeta</code> - new ItemMeta, or null to indicate meta data be cleared.</dd>
<dt>Returns:</dt>
<dd>True if successfully applied ItemMeta, see <a href="ItemFactory.html#isApplicable(org.bukkit.inventory.meta.ItemMeta,org.bukkit.inventory.ItemStack)"><code>ItemFactory.isApplicable(ItemMeta, ItemStack)</code></a></dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if the item meta was not created by
the <a href="ItemFactory.html" title="interface in org.bukkit.inventory"><code>ItemFactory</code></a></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="asHoverEvent(java.util.function.UnaryOperator)">
<h3>asHoverEvent</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.ShowItem.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent.ShowItem</a>&gt;</span>&nbsp;<span class="element-name">asHoverEvent</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/function/UnaryOperator.html" title="class or interface in java.util.function" class="external-link">UnaryOperator</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.ShowItem.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent.ShowItem</a>&gt;&nbsp;op)</span></div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEventSource.html#asHoverEvent(java.util.function.UnaryOperator)" title="class or interface in net.kyori.adventure.text.event" class="external-link">net.kyori.adventure.text.event.HoverEventSource</a></code></span></div>
<div class="block">Creates a hover event with value derived from this object.
<p>The event value will be passed through the provided callback to allow
transforming the original value of the event.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEventSource.html#asHoverEvent(java.util.function.UnaryOperator)" title="class or interface in net.kyori.adventure.text.event" class="external-link">asHoverEvent</a></code>&nbsp;in interface&nbsp;<code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEventSource.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEventSource</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/event/HoverEvent.ShowItem.html" title="class or interface in net.kyori.adventure.text.event" class="external-link">HoverEvent.ShowItem</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>op</code> - transformation on value</dd>
<dt>Returns:</dt>
<dd>a hover event</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="displayName()">
<h3>displayName</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/Component.html" title="class or interface in net.kyori.adventure.text" class="external-link">Component</a></span>&nbsp;<span class="element-name">displayName</span>()</div>
<div class="block">Get the formatted display name of the <a href="ItemStack.html" title="class in org.bukkit.inventory"><code>ItemStack</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>display name of the <a href="ItemStack.html" title="class in org.bukkit.inventory"><code>ItemStack</code></a></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="ensureServerConversions()">
<h3>ensureServerConversions</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">ensureServerConversions</span>()</div>
<div class="block">Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.
Use this method to to ensure any desired data conversions are processed.
The input itemstack will not be the same as the returned itemstack.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>A potentially Data Converted ItemStack</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="deserializeBytes(byte[])">
<h3>deserializeBytes</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">deserializeBytes</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
@org.jetbrains.annotations.NotNull byte[]&nbsp;bytes)</span></div>
<div class="block">Deserializes this itemstack from raw NBT bytes. NBT is safer for data migrations as it will
use the built in data converter instead of bukkits dangerous serialization system.
This expects that the DataVersion was stored on the root of the Compound, as saved from
the <a href="#serializeAsBytes()"><code>serializeAsBytes()</code></a> API returned.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bytes</code> - bytes representing an item in NBT</dd>
<dt>Returns:</dt>
<dd>ItemStack migrated to this version of Minecraft if needed.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="serializeAsBytes()">
<h3>serializeAsBytes</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">@org.jetbrains.annotations.NotNull byte[]</span>&nbsp;<span class="element-name">serializeAsBytes</span>()</div>
<div class="block">Serializes this itemstack to raw bytes in NBT. NBT is safer for data migrations as it will
use the built in data converter instead of bukkits dangerous serialization system.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>bytes representing this item in NBT.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getI18NDisplayName()">
<h3>getI18NDisplayName</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getI18NDisplayName</span>()</div>
<div class="block">Gets the Display name as seen in the Client.
Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Display name of Item</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxItemUseDuration()">
<h3>getMaxItemUseDuration</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getMaxItemUseDuration</span>()</div>
</section>
</li>
<li>
<section class="detail" id="asOne()">
<h3>asOne</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">asOne</span>()</div>
<div class="block">Clones the itemstack and returns it a single quantity.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The new itemstack with 1 quantity</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="asQuantity(int)">
<h3>asQuantity</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">asQuantity</span><wbr><span class="parameters">(int&nbsp;qty)</span></div>
<div class="block">Clones the itemstack and returns it as the specified quantity</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>qty</code> - The quantity of the cloned item</dd>
<dt>Returns:</dt>
<dd>The new itemstack with specified quantity</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="add()">
<h3>add</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">add</span>()</div>
<div class="block">Adds 1 to this itemstack. Will not go over the items max stack size.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The same item (not a clone)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="add(int)">
<h3>add</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">add</span><wbr><span class="parameters">(int&nbsp;qty)</span></div>
<div class="block">Adds quantity to this itemstack. Will not go over the items max stack size.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>qty</code> - The amount to add</dd>
<dt>Returns:</dt>
<dd>The same item (not a clone)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="subtract()">
<h3>subtract</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">subtract</span>()</div>
<div class="block">Subtracts 1 to this itemstack. Going to 0 or less will invalidate the item.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The same item (not a clone)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="subtract(int)">
<h3>subtract</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">subtract</span><wbr><span class="parameters">(int&nbsp;qty)</span></div>
<div class="block">Subtracts quantity to this itemstack. Going to 0 or less will invalidate the item.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>qty</code> - The amount to add</dd>
<dt>Returns:</dt>
<dd>The same item (not a clone)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLore()">
<h3>getLore</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;</span>&nbsp;<span class="element-name">getLore</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">in favor of <a href="#lore()"><code>lore()</code></a></div>
</div>
<div class="block">If the item has lore, returns it, else it will return null</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The lore, or null</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="lore()">
<h3>lore</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/Component.html" title="class or interface in net.kyori.adventure.text" class="external-link">Component</a>&gt;</span>&nbsp;<span class="element-name">lore</span>()</div>
<div class="block">If the item has lore, returns it, else it will return null</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The lore, or null</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setLore(java.util.List)">
<h3>setLore</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setLore</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&gt;&nbsp;lore)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">in favour of <a href="#lore(java.util.List)"><code>lore(List)</code></a></div>
</div>
<div class="block">Sets the lore for this item.
Removes lore when given null.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>lore</code> - the lore that will be set</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="lore(java.util.List)">
<h3>lore</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">lore</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/Nullable.html" title="class or interface in org.jetbrains.annotations" class="external-link">@Nullable</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/text/Component.html" title="class or interface in net.kyori.adventure.text" class="external-link">Component</a>&gt;&nbsp;lore)</span></div>
<div class="block">Sets the lore for this item.
Removes lore when given null.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>lore</code> - the lore that will be set</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addItemFlags(org.bukkit.inventory.ItemFlag...)">
<h3>addItemFlags</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addItemFlags</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemFlag.html" title="enum class in org.bukkit.inventory">ItemFlag</a>...&nbsp;itemFlags)</span></div>
<div class="block">Set itemflags which should be ignored when rendering a ItemStack in the Client. This Method does silently ignore double set itemFlags.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>itemFlags</code> - The hideflags which shouldn't be rendered</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="removeItemFlags(org.bukkit.inventory.ItemFlag...)">
<h3>removeItemFlags</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">removeItemFlags</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemFlag.html" title="enum class in org.bukkit.inventory">ItemFlag</a>...&nbsp;itemFlags)</span></div>
<div class="block">Remove specific set of itemFlags. This tells the Client it should render it again. This Method does silently ignore double removed itemFlags.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>itemFlags</code> - Hideflags which should be removed</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getItemFlags()">
<h3>getItemFlags</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="ItemFlag.html" title="enum class in org.bukkit.inventory">ItemFlag</a>&gt;</span>&nbsp;<span class="element-name">getItemFlags</span>()</div>
<div class="block">Get current set itemFlags. The collection returned is unmodifiable.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>A set of all itemFlags set</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hasItemFlag(org.bukkit.inventory.ItemFlag)">
<h3>hasItemFlag</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">hasItemFlag</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemFlag.html" title="enum class in org.bukkit.inventory">ItemFlag</a>&nbsp;flag)</span></div>
<div class="block">Check if the specified flag is present on this item.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>flag</code> - the flag to check</dd>
<dt>Returns:</dt>
<dd>if it is present</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getTranslationKey()">
<h3>getTranslationKey</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getTranslationKey</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">use <a href="#translationKey()"><code>translationKey()</code></a></div>
</div>
<div class="block">Gets the translation key for this itemstack.
This is not the same as getting the translation key
for the material of this itemstack.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the translation key</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="translationKey()">
<h3>translationKey</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">translationKey</span>()</div>
<div class="block">Gets the translation key.
<p>
This is not the same as getting the translation key
for the material of this itemstack.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/translation/Translatable.html#translationKey()" title="class or interface in net.kyori.adventure.translation" class="external-link">translationKey</a></code>&nbsp;in interface&nbsp;<code><a href="https://jd.adventure.kyori.net/api/4.9.3/net/kyori/adventure/translation/Translatable.html" title="class or interface in net.kyori.adventure.translation" class="external-link">Translatable</a></code></dd>
<dt>Returns:</dt>
<dd>the translation key</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRarity()">
<h3>getRarity</h3>
<div class="member-signature"><span class="annotations"><a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../../../io/papermc/paper/inventory/ItemRarity.html" title="enum class in io.papermc.paper.inventory">ItemRarity</a></span>&nbsp;<span class="element-name">getRarity</span>()</div>
<div class="block">Gets the item rarity of the itemstack. The rarity can change based on enchantements.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the itemstack rarity</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isRepairableBy(org.bukkit.inventory.ItemStack)">
<h3>isRepairableBy</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isRepairableBy</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&nbsp;repairMaterial)</span></div>
<div class="block">Checks if an itemstack can repair this itemstack.
Returns false if <code>this</code> or <code>repairMaterial</code>'s type is not an item (<a href="../Material.html#isItem()"><code>Material.isItem()</code></a>).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>repairMaterial</code> - the repair material</dd>
<dt>Returns:</dt>
<dd>true if it is repairable by, false if not</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="canRepair(org.bukkit.inventory.ItemStack)">
<h3>canRepair</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">canRepair</span><wbr><span class="parameters">(<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
<a href="https://javadoc.io/doc/org.jetbrains/annotations/21.0.1/org/jetbrains/annotations/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a> <a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&nbsp;toBeRepaired)</span></div>
<div class="block">Checks if this itemstack can repair another.
Returns false if <code>this</code> or <code>toBeRepaired</code>'s type is not an item (<a href="../Material.html#isItem()"><code>Material.isItem()</code></a>).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>toBeRepaired</code> - the itemstack to be repaired</dd>
<dt>Returns:</dt>
<dd>true if it can repair, false if not</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>