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

631 lines
56 KiB
HTML

<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>PlayerInventory (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, interface: PlayerInventory">
<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>Constr&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>Constr&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="Interface PlayerInventory" class="title">Interface PlayerInventory</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Superinterfaces:</dt>
<dd><code><a href="Inventory.html" title="interface in org.bukkit.inventory">Inventory</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;<a href="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a>&gt;</code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">PlayerInventory</span><span class="extends-implements">
extends <a href="Inventory.html" title="interface in org.bukkit.inventory">Inventory</a></span></div>
<div class="block">Interface to the inventory of a Player, including the four armor slots and any extra slots.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== 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-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-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract 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-tab3"><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-tab3"><code><a href="#getArmorContents()" class="member-name-link">getArmorContents</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Get all ItemStacks from the armor slots</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="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-tab3"><code><a href="#getBoots()" class="member-name-link">getBoots</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the ItemStack from the boots slot</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="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-tab3"><code><a href="#getChestplate()" class="member-name-link">getChestplate</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the ItemStack from the chestplate slot</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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-tab3"><code><a href="#getExtraContents()" class="member-name-link">getExtraContents</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Get all additional ItemStacks stored in this inventory.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getHeldItemSlot()" class="member-name-link">getHeldItemSlot</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Get the slot number of the currently held item</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="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-tab3"><code><a href="#getHelmet()" class="member-name-link">getHelmet</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the ItemStack from the helmet slot</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="../entity/HumanEntity.html" title="interface in org.bukkit.entity">HumanEntity</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getHolder()" class="member-name-link">getHolder</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the block or entity belonging to the open inventory</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="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-tab3"><code><a href="#getItem(org.bukkit.inventory.EquipmentSlot)" class="member-name-link">getItem</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="EquipmentSlot.html" title="enum class in org.bukkit.inventory">EquipmentSlot</a>&nbsp;slot)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the ItemStack at the given equipment slot in the inventory.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 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="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-tab3 method-summary-table-tab6"><code><a href="#getItemInHand()" class="member-name-link">getItemInHand</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">players can duel wield now use the methods for the
specific hand instead</div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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-tab3"><code><a href="#getItemInMainHand()" class="member-name-link">getItemInMainHand</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets a copy of the item the player is currently holding
in their main hand.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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-tab3"><code><a href="#getItemInOffHand()" class="member-name-link">getItemInOffHand</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets a copy of the item the player is currently holding
in their off hand.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="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-tab3"><code><a href="#getLeggings()" class="member-name-link">getLeggings</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the ItemStack from the leg slot</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setArmorContents(org.bukkit.inventory.ItemStack%5B%5D)" class="member-name-link">setArmorContents</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;items)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Put the given ItemStacks into the armor slots</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setBoots(org.bukkit.inventory.ItemStack)" class="member-name-link">setBoots</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;boots)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Put the given ItemStack into the boots slot.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setChestplate(org.bukkit.inventory.ItemStack)" class="member-name-link">setChestplate</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;chestplate)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Put the given ItemStack into the chestplate slot.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setExtraContents(org.bukkit.inventory.ItemStack%5B%5D)" class="member-name-link">setExtraContents</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;items)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Put the given ItemStacks into the extra slots
<br>
See <a href="#getExtraContents()"><code>getExtraContents()</code></a> for an explanation of extra slots.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setHeldItemSlot(int)" class="member-name-link">setHeldItemSlot</a><wbr>(int&nbsp;slot)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Set the slot number of the currently held item.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setHelmet(org.bukkit.inventory.ItemStack)" class="member-name-link">setHelmet</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;helmet)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Put the given ItemStack into the helmet slot.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setItem(int,org.bukkit.inventory.ItemStack)" class="member-name-link">setItem</a><wbr>(int&nbsp;index,
<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;item)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Stores the ItemStack at the given index of the inventory.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setItem(org.bukkit.inventory.EquipmentSlot,org.bukkit.inventory.ItemStack)" class="member-name-link">setItem</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="EquipmentSlot.html" title="enum class in org.bukkit.inventory">EquipmentSlot</a>&nbsp;slot,
<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;item)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Stores the ItemStack at the given equipment slot in the inventory.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code><a href="#setItemInHand(org.bukkit.inventory.ItemStack)" class="member-name-link">setItemInHand</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-tab3 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">players can duel wield now use the methods for the
specific hand instead</div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setItemInMainHand(org.bukkit.inventory.ItemStack)" class="member-name-link">setItemInMainHand</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;item)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the item the player is holding in their main hand.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setItemInOffHand(org.bukkit.inventory.ItemStack)" class="member-name-link">setItemInOffHand</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;item)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the item the player is holding in their off hand.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#setLeggings(org.bukkit.inventory.ItemStack)" class="member-name-link">setLeggings</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;leggings)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Put the given ItemStack into the leg slot.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.bukkit.inventory.Inventory">Methods inherited from interface&nbsp;org.bukkit.inventory.<a href="Inventory.html" title="interface in org.bukkit.inventory">Inventory</a></h3>
<code><a href="Inventory.html#addItem(org.bukkit.inventory.ItemStack...)">addItem</a>, <a href="Inventory.html#all(org.bukkit.Material)">all</a>, <a href="Inventory.html#all(org.bukkit.inventory.ItemStack)">all</a>, <a href="Inventory.html#clear()">clear</a>, <a href="Inventory.html#clear(int)">clear</a>, <a href="Inventory.html#close()">close</a>, <a href="Inventory.html#contains(org.bukkit.Material)">contains</a>, <a href="Inventory.html#contains(org.bukkit.Material,int)">contains</a>, <a href="Inventory.html#contains(org.bukkit.inventory.ItemStack)">contains</a>, <a href="Inventory.html#contains(org.bukkit.inventory.ItemStack,int)">contains</a>, <a href="Inventory.html#containsAtLeast(org.bukkit.inventory.ItemStack,int)">containsAtLeast</a>, <a href="Inventory.html#first(org.bukkit.inventory.ItemStack)">first</a>, <a href="Inventory.html#first(org.bukkit.Material)">first</a>, <a href="Inventory.html#firstEmpty()">firstEmpty</a>, <a href="Inventory.html#getContents()">getContents</a>, <a href="Inventory.html#getHolder(boolean)">getHolder</a>, <a href="Inventory.html#getItem(int)">getItem</a>, <a href="Inventory.html#getLocation()">getLocation</a>, <a href="Inventory.html#getMaxStackSize()">getMaxStackSize</a>, <a href="Inventory.html#getSize()">getSize</a>, <a href="Inventory.html#getStorageContents()">getStorageContents</a>, <a href="Inventory.html#getType()">getType</a>, <a href="Inventory.html#getViewers()">getViewers</a>, <a href="Inventory.html#isEmpty()">isEmpty</a>, <a href="Inventory.html#iterator()">iterator</a>, <a href="Inventory.html#iterator(int)">iterator</a>, <a href="Inventory.html#remove(org.bukkit.inventory.ItemStack)">remove</a>, <a href="Inventory.html#remove(org.bukkit.Material)">remove</a>, <a href="Inventory.html#removeItem(org.bukkit.inventory.ItemStack...)">removeItem</a>, <a href="Inventory.html#removeItemAnySlot(org.bukkit.inventory.ItemStack...)">removeItemAnySlot</a>, <a href="Inventory.html#setContents(org.bukkit.inventory.ItemStack%5B%5D)">setContents</a>, <a href="Inventory.html#setMaxStackSize(int)">setMaxStackSize</a>, <a href="Inventory.html#setStorageContents(org.bukkit.inventory.ItemStack%5B%5D)">setStorageContents</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Iterable">Methods inherited from interface&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html#forEach(java.util.function.Consumer)" title="class or interface in java.lang" class="external-link">forEach</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html#spliterator()" title="class or interface in java.lang" class="external-link">spliterator</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getArmorContents()">
<h3>getArmorContents</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="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">getArmorContents</span>()</div>
<div class="block">Get all ItemStacks from the armor slots</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>All the ItemStacks from the armor slots. Individual items can be null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getExtraContents()">
<h3>getExtraContents</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="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">getExtraContents</span>()</div>
<div class="block">Get all additional ItemStacks stored in this inventory.
<br>
NB: What defines an extra slot is up to the implementation, however it
will not be contained within <a href="Inventory.html#getStorageContents()"><code>Inventory.getStorageContents()</code></a> or
<a href="#getArmorContents()"><code>getArmorContents()</code></a></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>All additional ItemStacks. Individual items can be null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getHelmet()">
<h3>getHelmet</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="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="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">getHelmet</span>()</div>
<div class="block">Return the ItemStack from the helmet slot</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The ItemStack in the helmet slot</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getChestplate()">
<h3>getChestplate</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="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="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">getChestplate</span>()</div>
<div class="block">Return the ItemStack from the chestplate slot</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The ItemStack in the chestplate slot</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLeggings()">
<h3>getLeggings</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="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="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">getLeggings</span>()</div>
<div class="block">Return the ItemStack from the leg slot</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The ItemStack in the leg slot</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getBoots()">
<h3>getBoots</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="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="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">getBoots</span>()</div>
<div class="block">Return the ItemStack from the boots slot</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>The ItemStack in the boots slot</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setItem(int,org.bukkit.inventory.ItemStack)">
<h3>setItem</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setItem</span><wbr><span class="parameters">(int&nbsp;index,
<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;item)</span></div>
<div class="block">Stores the ItemStack at the given index of the inventory.
<p>
Indexes 0 through 8 refer to the hotbar. 9 through 35 refer to the main inventory, counting up from 9 at the top
left corner of the inventory, moving to the right, and moving to the row below it back on the left side when it
reaches the end of the row. It follows the same path in the inventory like you would read a book.
<p>
Indexes 36 through 39 refer to the armor slots. Though you can set armor with this method using these indexes,
you are encouraged to use the provided methods for those slots.
<p>
Index 40 refers to the off hand (shield) item slot. Though you can set off hand with this method using this index,
you are encouraged to use the provided method for this slot.
<p>
If you attempt to use this method with an index less than 0 or greater than 40, an ArrayIndexOutOfBounds
exception will be thrown.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Inventory.html#setItem(int,org.bukkit.inventory.ItemStack)">setItem</a></code>&nbsp;in interface&nbsp;<code><a href="Inventory.html" title="interface in org.bukkit.inventory">Inventory</a></code></dd>
<dt>Parameters:</dt>
<dd><code>index</code> - The index where to put the ItemStack</dd>
<dd><code>item</code> - The ItemStack to set</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">ArrayIndexOutOfBoundsException</a></code> - when index &lt; 0 || index &gt; 40</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setBoots(org.bukkit.inventory.ItemStack)"><code>setBoots(ItemStack)</code></a></li>
<li><a href="#setChestplate(org.bukkit.inventory.ItemStack)"><code>setChestplate(ItemStack)</code></a></li>
<li><a href="#setHelmet(org.bukkit.inventory.ItemStack)"><code>setHelmet(ItemStack)</code></a></li>
<li><a href="#setLeggings(org.bukkit.inventory.ItemStack)"><code>setLeggings(ItemStack)</code></a></li>
<li><a href="#setItemInOffHand(org.bukkit.inventory.ItemStack)"><code>setItemInOffHand(ItemStack)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setItem(org.bukkit.inventory.EquipmentSlot,org.bukkit.inventory.ItemStack)">
<h3>setItem</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setItem</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="EquipmentSlot.html" title="enum class in org.bukkit.inventory">EquipmentSlot</a>&nbsp;slot,
<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;item)</span></div>
<div class="block">Stores the ItemStack at the given equipment slot in the inventory.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>slot</code> - the slot to put the ItemStack</dd>
<dd><code>item</code> - the ItemStack to set</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#setItem(int,org.bukkit.inventory.ItemStack)"><code>setItem(int, ItemStack)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getItem(org.bukkit.inventory.EquipmentSlot)">
<h3>getItem</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="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="ItemStack.html" title="class in org.bukkit.inventory">ItemStack</a></span>&nbsp;<span class="element-name">getItem</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="EquipmentSlot.html" title="enum class in org.bukkit.inventory">EquipmentSlot</a>&nbsp;slot)</span></div>
<div class="block">Gets the ItemStack at the given equipment slot in the inventory.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>slot</code> - the slot to get the ItemStack</dd>
<dt>Returns:</dt>
<dd>the ItemStack in the given slot</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setArmorContents(org.bukkit.inventory.ItemStack[])">
<h3>setArmorContents</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setArmorContents</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;items)</span></div>
<div class="block">Put the given ItemStacks into the armor slots</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>items</code> - The ItemStacks to use as armour</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setExtraContents(org.bukkit.inventory.ItemStack[])">
<h3>setExtraContents</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setExtraContents</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;items)</span></div>
<div class="block">Put the given ItemStacks into the extra slots
<br>
See <a href="#getExtraContents()"><code>getExtraContents()</code></a> for an explanation of extra slots.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>items</code> - The ItemStacks to use as extra</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setHelmet(org.bukkit.inventory.ItemStack)">
<h3>setHelmet</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setHelmet</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;helmet)</span></div>
<div class="block">Put the given ItemStack into the helmet slot. This does not check if
the ItemStack is a helmet</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>helmet</code> - The ItemStack to use as helmet</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setChestplate(org.bukkit.inventory.ItemStack)">
<h3>setChestplate</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setChestplate</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;chestplate)</span></div>
<div class="block">Put the given ItemStack into the chestplate slot. This does not check
if the ItemStack is a chestplate</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>chestplate</code> - The ItemStack to use as chestplate</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setLeggings(org.bukkit.inventory.ItemStack)">
<h3>setLeggings</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setLeggings</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;leggings)</span></div>
<div class="block">Put the given ItemStack into the leg slot. This does not check if the
ItemStack is a pair of leggings</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>leggings</code> - The ItemStack to use as leggings</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setBoots(org.bukkit.inventory.ItemStack)">
<h3>setBoots</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setBoots</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;boots)</span></div>
<div class="block">Put the given ItemStack into the boots slot. This does not check if the
ItemStack is a boots</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>boots</code> - The ItemStack to use as boots</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getItemInMainHand()">
<h3>getItemInMainHand</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="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">getItemInMainHand</span>()</div>
<div class="block">Gets a copy of the item the player is currently holding
in their main hand.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently held item</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setItemInMainHand(org.bukkit.inventory.ItemStack)">
<h3>setItemInMainHand</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setItemInMainHand</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;item)</span></div>
<div class="block">Sets the item the player is holding in their main hand.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>item</code> - The item to put into the player's hand</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getItemInOffHand()">
<h3>getItemInOffHand</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="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">getItemInOffHand</span>()</div>
<div class="block">Gets a copy of the item the player is currently holding
in their off hand.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently held item</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setItemInOffHand(org.bukkit.inventory.ItemStack)">
<h3>setItemInOffHand</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setItemInOffHand</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;item)</span></div>
<div class="block">Sets the item the player is holding in their off hand.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>item</code> - The item to put into the player's hand</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getItemInHand()">
<h3>getItemInHand</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/NotNull.html" title="class or interface in org.jetbrains.annotations" class="external-link">@NotNull</a>
</span><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">getItemInHand</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">players can duel wield now use the methods for the
specific hand instead</div>
</div>
<div class="block">Gets a copy of the item the player is currently holding</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently held item</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getItemInMainHand()"><code>getItemInMainHand()</code></a></li>
<li><a href="#getItemInOffHand()"><code>getItemInOffHand()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setItemInHand(org.bukkit.inventory.ItemStack)">
<h3>setItemInHand</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="return-type">void</span>&nbsp;<span class="element-name">setItemInHand</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="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">players can duel wield now use the methods for the
specific hand instead</div>
</div>
<div class="block">Sets the item the player is holding</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>stack</code> - The item to put into the player's hand</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setItemInMainHand(org.bukkit.inventory.ItemStack)"><code>setItemInMainHand(ItemStack)</code></a></li>
<li><a href="#setItemInOffHand(org.bukkit.inventory.ItemStack)"><code>setItemInOffHand(ItemStack)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getHeldItemSlot()">
<h3>getHeldItemSlot</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">getHeldItemSlot</span>()</div>
<div class="block">Get the slot number of the currently held item</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Held item slot number</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setHeldItemSlot(int)">
<h3>setHeldItemSlot</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">setHeldItemSlot</span><wbr><span class="parameters">(int&nbsp;slot)</span></div>
<div class="block">Set the slot number of the currently held item.
<p>
This validates whether the slot is between 0 and 8 inclusive.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>slot</code> - The new slot number</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> - Thrown if slot is not between 0 and 8
inclusive</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getHolder()">
<h3>getHolder</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="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="../entity/HumanEntity.html" title="interface in org.bukkit.entity">HumanEntity</a></span>&nbsp;<span class="element-name">getHolder</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from interface:&nbsp;<code><a href="Inventory.html#getHolder()">Inventory</a></code></span></div>
<div class="block">Gets the block or entity belonging to the open inventory</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="Inventory.html#getHolder()">getHolder</a></code>&nbsp;in interface&nbsp;<code><a href="Inventory.html" title="interface in org.bukkit.inventory">Inventory</a></code></dd>
<dt>Returns:</dt>
<dd>The holder of the inventory; null if it has no holder.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>