Minestom/docs/net/minestom/server/inventory/Inventory.html
2020-11-15 23:39:49 +01:00

995 lines
61 KiB
HTML

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Inventory (Minestom 1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="declaration: package: net.minestom.server.inventory, class: Inventory">
<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.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../script-dir/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../script-dir/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.js"></script>
</head>
<body class="class-declaration">
<script type="text/javascript">var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flexBox">
<header role="banner" class="flexHeader">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">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">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<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="subNavList">
<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="navListSearch"><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="skipNav"><a id="skip.navbar.top">
<!-- -->
</a></div>
</nav>
</header>
<div class="flexContent">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">net.minestom.server.inventory</a></div>
<h1 title="Class Inventory" class="title">Class Inventory</h1>
</div>
<div class="contentContainer">
<div class="inheritance" title="Inheritance Tree">java.lang.Object
<div class="inheritance">net.minestom.server.inventory.Inventory</div>
</div>
<section class="description">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../data/DataContainer.html" title="interface in net.minestom.server.data">DataContainer</a></code>, <code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code>, <code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code>, <code><a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="type/AnvilInventory.html" title="class in net.minestom.server.inventory.type">AnvilInventory</a></code>, <code><a href="type/BeaconInventory.html" title="class in net.minestom.server.inventory.type">BeaconInventory</a></code>, <code><a href="type/BrewingStandInventory.html" title="class in net.minestom.server.inventory.type">BrewingStandInventory</a></code>, <code><a href="type/EnchantmentTableInventory.html" title="class in net.minestom.server.inventory.type">EnchantmentTableInventory</a></code>, <code><a href="type/FurnaceInventory.html" title="class in net.minestom.server.inventory.type">FurnaceInventory</a></code>, <code><a href="type/VillagerInventory.html" title="class in net.minestom.server.inventory.type">VillagerInventory</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">Inventory</span>
extends java.lang.Object
implements <a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a>, <a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a>, <a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a>, <a href="../data/DataContainer.html" title="interface in net.minestom.server.data">DataContainer</a></pre>
<div class="block">Represents an inventory which can be viewed by a collection of <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a>.
<p>
You can create one with <a href="#%3Cinit%3E(net.minestom.server.inventory.InventoryType,java.lang.String)"><code>Inventory(InventoryType, String)</code></a> or by making your own subclass.
It can then be opened using <a href="../entity/Player.html#openInventory(net.minestom.server.inventory.Inventory)"><code>Player.openInventory(Inventory)</code></a>.</div>
</section>
<section class="summary">
<ul class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li class="blockList">
<section class="constructorSummary"><a id="constructor.summary">
<!-- -->
</a>
<h2>Constructor Summary</h2>
<div class="memberSummary">
<table>
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<thead>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(net.minestom.server.inventory.InventoryType,java.lang.String)">Inventory</a></span>&#8203;(<a href="InventoryType.html" title="enum in net.minestom.server.inventory">InventoryType</a>&nbsp;inventoryType,
java.lang.String&nbsp;title)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li class="blockList">
<section class="methodSummary"><a id="method.summary">
<!-- -->
</a>
<h2>Method Summary</h2>
<div class="memberSummary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="tableTab" onclick="show(8);">Concrete Methods</button></div>
<div id="memberSummary_tabpanel" role="tabpanel">
<table aria-labelledby="t0">
<thead>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="altColor" id="i0">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addInventoryCondition(net.minestom.server.inventory.condition.InventoryCondition)">addInventoryCondition</a></span>&#8203;(<a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition">InventoryCondition</a>&nbsp;inventoryCondition)</code></th>
<td class="colLast">
<div class="block">Adds a new <a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition"><code>InventoryCondition</code></a> to this inventory.</div>
</td>
</tr>
<tr class="rowColor" id="i1">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addItemStack(net.minestom.server.item.ItemStack)">addItemStack</a></span>&#8203;(<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>&nbsp;itemStack)</code></th>
<td class="colLast">
<div class="block">Adds an <a href="../item/ItemStack.html" title="class in net.minestom.server.item"><code>ItemStack</code></a> to the inventory and send relevant update to the viewer(s).</div>
</td>
</tr>
<tr class="altColor" id="i2">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addViewer(net.minestom.server.entity.Player)">addViewer</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</code></th>
<td class="colLast">
<div class="block">This will not open the inventory for <code>player</code>, use <a href="../entity/Player.html#openInventory(net.minestom.server.inventory.Inventory)"><code>Player.openInventory(Inventory)</code></a>.</div>
</td>
</tr>
<tr class="rowColor" id="i3">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#changeHeld(net.minestom.server.entity.Player,int,int)">changeHeld</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot,
int&nbsp;key)</code></th>
<td class="colLast">
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> held click in the inventory</div>
</td>
</tr>
<tr class="altColor" id="i4">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clear()">clear</a></span>()</code></th>
<td class="colLast">
<div class="block">Clears the inventory and send relevant update to the viewer(s).</div>
</td>
</tr>
<tr class="rowColor" id="i5">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doubleClick(net.minestom.server.entity.Player,int)">doubleClick</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</code></th>
<td class="colLast">
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> double click in the inventory</div>
</td>
</tr>
<tr class="altColor" id="i6">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dragging(net.minestom.server.entity.Player,int,int)">dragging</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot,
int&nbsp;button)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor" id="i7">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#drop(net.minestom.server.entity.Player,int,int,int)">drop</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;mode,
int&nbsp;slot,
int&nbsp;button)</code></th>
<td class="colLast">
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> press the drop button</div>
</td>
</tr>
<tr class="altColor" id="i8">
<td class="colFirst"><code><a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCursorItem(net.minestom.server.entity.Player)">getCursorItem</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</code></th>
<td class="colLast">
<div class="block">Gets the cursor item of a viewer.</div>
</td>
</tr>
<tr class="rowColor" id="i9">
<td class="colFirst"><code><a href="../data/Data.html" title="interface in net.minestom.server.data">Data</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getData()">getData</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the <a href="../data/Data.html" title="interface in net.minestom.server.data"><code>Data</code></a> of this container.</div>
</td>
</tr>
<tr class="altColor" id="i10">
<td class="colFirst"><code>java.util.List&lt;<a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition">InventoryCondition</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInventoryConditions()">getInventoryConditions</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets all the <a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition"><code>InventoryCondition</code></a> of this inventory.</div>
</td>
</tr>
<tr class="rowColor" id="i11">
<td class="colFirst"><code><a href="InventoryType.html" title="enum in net.minestom.server.inventory">InventoryType</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInventoryType()">getInventoryType</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the inventory type.</div>
</td>
</tr>
<tr class="altColor" id="i12">
<td class="colFirst"><code><a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getItemStack(int)">getItemStack</a></span>&#8203;(int&nbsp;slot)</code></th>
<td class="colLast">
<div class="block">Gets the <a href="../item/ItemStack.html" title="class in net.minestom.server.item"><code>ItemStack</code></a> at the specified slot.</div>
</td>
</tr>
<tr class="rowColor" id="i13">
<td class="colFirst"><code><a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getItemStacks()">getItemStacks</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets all the <a href="../item/ItemStack.html" title="class in net.minestom.server.item"><code>ItemStack</code></a> in the inventory.</div>
</td>
</tr>
<tr class="altColor" id="i14">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSize()">getSize</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the size of the inventory.</div>
</td>
</tr>
<tr class="rowColor" id="i15">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTitle()">getTitle</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the inventory title.</div>
</td>
</tr>
<tr class="altColor" id="i16">
<td class="colFirst"><code>java.util.Set&lt;<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getViewers()">getViewers</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets all the viewers of this viewable element.</div>
</td>
</tr>
<tr class="rowColor" id="i17">
<td class="colFirst"><code>byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWindowId()">getWindowId</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets this window id.</div>
</td>
</tr>
<tr class="altColor" id="i18">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#leftClick(net.minestom.server.entity.Player,int)">leftClick</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</code></th>
<td class="colLast">
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> left click in the inventory.</div>
</td>
</tr>
<tr class="rowColor" id="i19">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#middleClick(net.minestom.server.entity.Player,int)">middleClick</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor" id="i20">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#refreshSlot(short)">refreshSlot</a></span>&#8203;(short&nbsp;slot)</code></th>
<td class="colLast">
<div class="block">Refreshes only a specific slot with the updated item stack data.</div>
</td>
</tr>
<tr class="rowColor" id="i21">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeViewer(net.minestom.server.entity.Player)">removeViewer</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</code></th>
<td class="colLast">
<div class="block">This will not close the inventory for <code>player</code>, use <a href="../entity/Player.html#closeInventory()"><code>Player.closeInventory()</code></a>.</div>
</td>
</tr>
<tr class="altColor" id="i22">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rightClick(net.minestom.server.entity.Player,int)">rightClick</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</code></th>
<td class="colLast">
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> right click in the inventory.</div>
</td>
</tr>
<tr class="rowColor" id="i23">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sendProperty(net.minestom.server.inventory.InventoryProperty,short)">sendProperty</a></span>&#8203;(<a href="InventoryProperty.html" title="enum in net.minestom.server.inventory">InventoryProperty</a>&nbsp;property,
short&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sends a window property to all viewers.</div>
</td>
</tr>
<tr class="altColor" id="i24">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCursorItem(net.minestom.server.entity.Player,net.minestom.server.item.ItemStack)">setCursorItem</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>&nbsp;cursorItem)</code></th>
<td class="colLast">
<div class="block">Changes the cursor item of a viewer,
does nothing if <code>player</code> is not a viewer.</div>
</td>
</tr>
<tr class="rowColor" id="i25">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setData(net.minestom.server.data.Data)">setData</a></span>&#8203;(<a href="../data/Data.html" title="interface in net.minestom.server.data">Data</a>&nbsp;data)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="../data/Data.html" title="interface in net.minestom.server.data"><code>Data</code></a> of this container.</div>
</td>
</tr>
<tr class="altColor" id="i26">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setItemStack(int,net.minestom.server.item.ItemStack)">setItemStack</a></span>&#8203;(int&nbsp;slot,
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>&nbsp;itemStack)</code></th>
<td class="colLast">
<div class="block">Sets an <a href="../item/ItemStack.html" title="class in net.minestom.server.item"><code>ItemStack</code></a> at the specified slot and send relevant update to the viewer(s).</div>
</td>
</tr>
<tr class="rowColor" id="i27">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setItemStackInternal(int,net.minestom.server.item.ItemStack)">setItemStackInternal</a></span>&#8203;(int&nbsp;slot,
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>&nbsp;itemStack)</code></th>
<td class="colLast">
<div class="block">Inserts an item into the inventory without notifying viewers.</div>
</td>
</tr>
<tr class="altColor" id="i28">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setTitle(java.lang.String)">setTitle</a></span>&#8203;(java.lang.String&nbsp;title)</code></th>
<td class="colLast">
<div class="block">Changes the inventory title.</div>
</td>
</tr>
<tr class="rowColor" id="i29">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shiftClick(net.minestom.server.entity.Player,int)">shiftClick</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</code></th>
<td class="colLast">
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> shift click in the inventory</div>
</td>
</tr>
<tr class="altColor" id="i30">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#update()">update</a></span>()</code></th>
<td class="colLast">
<div class="block">Refreshes the inventory for all viewers.</div>
</td>
</tr>
<tr class="rowColor" id="i31">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#update(net.minestom.server.entity.Player)">update</a></span>&#8203;(<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</code></th>
<td class="colLast">
<div class="block">Refreshes the inventory for a specific viewer.</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="inheritedList">
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a><code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;net.minestom.server.inventory.<a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></h3>
<a id="methods.inherited.from.class.net.minestom.server.inventory.InventoryClickHandler">
<!-- -->
</a><code><a href="InventoryClickHandler.html#callClickEvent(net.minestom.server.entity.Player,net.minestom.server.inventory.Inventory,int,net.minestom.server.inventory.click.ClickType,net.minestom.server.item.ItemStack,net.minestom.server.item.ItemStack)">callClickEvent</a></code></div>
<div class="inheritedList">
<h3>Methods inherited from interface&nbsp;net.minestom.server.<a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></h3>
<a id="methods.inherited.from.class.net.minestom.server.Viewable">
<!-- -->
</a><code><a href="../Viewable.html#isViewer(net.minestom.server.entity.Player)">isViewer</a>, <a href="../Viewable.html#sendPacketsToViewers(net.minestom.server.network.packet.server.ServerPacket...)">sendPacketsToViewers</a>, <a href="../Viewable.html#sendPacketToViewers(net.minestom.server.network.packet.server.ServerPacket)">sendPacketToViewers</a>, <a href="../Viewable.html#sendPacketToViewersAndSelf(net.minestom.server.network.packet.server.ServerPacket)">sendPacketToViewersAndSelf</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li class="blockList">
<section class="constructorDetails"><a id="constructor.detail">
<!-- -->
</a>
<h2>Constructor Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="&lt;init&gt;(net.minestom.server.inventory.InventoryType,java.lang.String)">Inventory</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="memberName">Inventory</span>&#8203;(<span class="arguments">@NotNull
<a href="InventoryType.html" title="enum in net.minestom.server.inventory">InventoryType</a>&nbsp;inventoryType,
@NotNull
java.lang.String&nbsp;title)</span></div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li class="blockList">
<section class="methodDetails"><a id="method.detail">
<!-- -->
</a>
<h2>Method Details</h2>
<ul class="blockList">
<li class="blockList">
<section class="detail">
<h3><a id="getInventoryType()">getInventoryType</a></h3>
<div class="memberSignature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="InventoryType.html" title="enum in net.minestom.server.inventory">InventoryType</a></span>&nbsp;<span class="memberName">getInventoryType</span>()</div>
<div class="block">Gets the inventory type.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the inventory type</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getTitle()">getTitle</a></h3>
<div class="memberSignature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="returnType">java.lang.String</span>&nbsp;<span class="memberName">getTitle</span>()</div>
<div class="block">Gets the inventory title.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the inventory title</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setTitle(java.lang.String)">setTitle</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setTitle</span>&#8203;(<span class="arguments">@NotNull
java.lang.String&nbsp;title)</span></div>
<div class="block">Changes the inventory title.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>title</code> - the new inventory title</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getWindowId()">getWindowId</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">byte</span>&nbsp;<span class="memberName">getWindowId</span>()</div>
<div class="block">Gets this window id.
<p>
This is the id that the client will send to identify the affected inventory, mostly used by packets.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the window id</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setItemStack(int,net.minestom.server.item.ItemStack)">setItemStack</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setItemStack</span>&#8203;(<span class="arguments">int&nbsp;slot,
@NotNull
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>&nbsp;itemStack)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryModifier.html#setItemStack(int,net.minestom.server.item.ItemStack)">InventoryModifier</a></code></span></div>
<div class="block">Sets an <a href="../item/ItemStack.html" title="class in net.minestom.server.item"><code>ItemStack</code></a> at the specified slot and send relevant update to the viewer(s).</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryModifier.html#setItemStack(int,net.minestom.server.item.ItemStack)">setItemStack</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>slot</code> - the slot to set the item</dd>
<dd><code>itemStack</code> - the item to set</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="addItemStack(net.minestom.server.item.ItemStack)">addItemStack</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">addItemStack</span>&#8203;(<span class="arguments">@NotNull
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>&nbsp;itemStack)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryModifier.html#addItemStack(net.minestom.server.item.ItemStack)">InventoryModifier</a></code></span></div>
<div class="block">Adds an <a href="../item/ItemStack.html" title="class in net.minestom.server.item"><code>ItemStack</code></a> to the inventory and send relevant update to the viewer(s).
<p>
Even the item cannot be fully added, the amount of <code>itemStack</code> will be updated.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryModifier.html#addItemStack(net.minestom.server.item.ItemStack)">addItemStack</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>itemStack</code> - the item to add</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the item has been successfully fully added, false otherwise</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="clear()">clear</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">clear</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryModifier.html#clear()">InventoryModifier</a></code></span></div>
<div class="block">Clears the inventory and send relevant update to the viewer(s).</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryModifier.html#clear()">clear</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getItemStack(int)">getItemStack</a></h3>
<div class="memberSignature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a></span>&nbsp;<span class="memberName">getItemStack</span>&#8203;(<span class="arguments">int&nbsp;slot)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryModifier.html#getItemStack(int)">InventoryModifier</a></code></span></div>
<div class="block">Gets the <a href="../item/ItemStack.html" title="class in net.minestom.server.item"><code>ItemStack</code></a> at the specified slot.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryModifier.html#getItemStack(int)">getItemStack</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>slot</code> - the slot to check</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the item in the slot <code>slot</code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getItemStacks()">getItemStacks</a></h3>
<div class="memberSignature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>[]</span>&nbsp;<span class="memberName">getItemStacks</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryModifier.html#getItemStacks()">InventoryModifier</a></code></span></div>
<div class="block">Gets all the <a href="../item/ItemStack.html" title="class in net.minestom.server.item"><code>ItemStack</code></a> in the inventory.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryModifier.html#getItemStacks()">getItemStacks</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array containing all the inventory's items</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getSize()">getSize</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">int</span>&nbsp;<span class="memberName">getSize</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryModifier.html#getSize()">InventoryModifier</a></code></span></div>
<div class="block">Gets the size of the inventory.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryModifier.html#getSize()">getSize</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the inventory's size</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getInventoryConditions()">getInventoryConditions</a></h3>
<div class="memberSignature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="returnType">java.util.List&lt;<a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition">InventoryCondition</a>&gt;</span>&nbsp;<span class="memberName">getInventoryConditions</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryModifier.html#getInventoryConditions()">InventoryModifier</a></code></span></div>
<div class="block">Gets all the <a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition"><code>InventoryCondition</code></a> of this inventory.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryModifier.html#getInventoryConditions()">getInventoryConditions</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a modifiable <code>List</code> containing all the inventory conditions</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="addInventoryCondition(net.minestom.server.inventory.condition.InventoryCondition)">addInventoryCondition</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">addInventoryCondition</span>&#8203;(<span class="arguments">@NotNull
<a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition">InventoryCondition</a>&nbsp;inventoryCondition)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryModifier.html#addInventoryCondition(net.minestom.server.inventory.condition.InventoryCondition)">InventoryModifier</a></code></span></div>
<div class="block">Adds a new <a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition"><code>InventoryCondition</code></a> to this inventory.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryModifier.html#addInventoryCondition(net.minestom.server.inventory.condition.InventoryCondition)">addInventoryCondition</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryModifier.html" title="interface in net.minestom.server.inventory">InventoryModifier</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inventoryCondition</code> - the inventory condition to add</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="update()">update</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">update</span>()</div>
<div class="block">Refreshes the inventory for all viewers.</div>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="update(net.minestom.server.entity.Player)">update</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">update</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</span></div>
<div class="block">Refreshes the inventory for a specific viewer.
<p>
The player needs to be a viewer, otherwise nothing is sent.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player to update the inventory</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="refreshSlot(short)">refreshSlot</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">refreshSlot</span>&#8203;(<span class="arguments">short&nbsp;slot)</span></div>
<div class="block">Refreshes only a specific slot with the updated item stack data.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>slot</code> - the slot to refresh</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getViewers()">getViewers</a></h3>
<div class="memberSignature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="returnType">java.util.Set&lt;<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&gt;</span>&nbsp;<span class="memberName">getViewers</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../Viewable.html#getViewers()">Viewable</a></code></span></div>
<div class="block">Gets all the viewers of this viewable element.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Viewable.html#getViewers()">getViewers</a></code>&nbsp;in interface&nbsp;<code><a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A Set containing all the element's viewers</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="addViewer(net.minestom.server.entity.Player)">addViewer</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">addViewer</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</span></div>
<div class="block">This will not open the inventory for <code>player</code>, use <a href="../entity/Player.html#openInventory(net.minestom.server.inventory.Inventory)"><code>Player.openInventory(Inventory)</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Viewable.html#addViewer(net.minestom.server.entity.Player)">addViewer</a></code>&nbsp;in interface&nbsp;<code><a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the viewer to add</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the player has successfully been added</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="removeViewer(net.minestom.server.entity.Player)">removeViewer</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">removeViewer</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</span></div>
<div class="block">This will not close the inventory for <code>player</code>, use <a href="../entity/Player.html#closeInventory()"><code>Player.closeInventory()</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../Viewable.html#removeViewer(net.minestom.server.entity.Player)">removeViewer</a></code>&nbsp;in interface&nbsp;<code><a href="../Viewable.html" title="interface in net.minestom.server">Viewable</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the viewer to remove</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the player has successfully been removed</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getCursorItem(net.minestom.server.entity.Player)">getCursorItem</a></h3>
<div class="memberSignature"><span class="annotations">@NotNull
</span><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a></span>&nbsp;<span class="memberName">getCursorItem</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player)</span></div>
<div class="block">Gets the cursor item of a viewer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player to get the cursor item from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the player cursor item, air item if the player is not a viewer</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setCursorItem(net.minestom.server.entity.Player,net.minestom.server.item.ItemStack)">setCursorItem</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setCursorItem</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
@NotNull
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>&nbsp;cursorItem)</span></div>
<div class="block">Changes the cursor item of a viewer,
does nothing if <code>player</code> is not a viewer.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player to change the cursor item</dd>
<dd><code>cursorItem</code> - the new player cursor item</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setItemStackInternal(int,net.minestom.server.item.ItemStack)">setItemStackInternal</a></h3>
<div class="memberSignature"><span class="modifiers">protected</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setItemStackInternal</span>&#8203;(<span class="arguments">int&nbsp;slot,
@NotNull
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>&nbsp;itemStack)</span></div>
<div class="block">Inserts an item into the inventory without notifying viewers.
<p>
This will also warn the inventory that the cached window items packet is
not up-to-date.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>slot</code> - the internal slot</dd>
<dd><code>itemStack</code> - the item to insert</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="sendProperty(net.minestom.server.inventory.InventoryProperty,short)">sendProperty</a></h3>
<div class="memberSignature"><span class="modifiers">protected</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">sendProperty</span>&#8203;(<span class="arguments">@NotNull
<a href="InventoryProperty.html" title="enum in net.minestom.server.inventory">InventoryProperty</a>&nbsp;property,
short&nbsp;value)</span></div>
<div class="block">Sends a window property to all viewers.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>property</code> - the property to send</dd>
<dd><code>value</code> - the value of the property</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://wiki.vg/Protocol#Window_Property">https://wiki.vg/Protocol#Window_Property</a></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="leftClick(net.minestom.server.entity.Player,int)">leftClick</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">leftClick</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryClickHandler.html#leftClick(net.minestom.server.entity.Player,int)">InventoryClickHandler</a></code></span></div>
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> left click in the inventory. Can also be to drop the cursor item</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryClickHandler.html#leftClick(net.minestom.server.entity.Player,int)">leftClick</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player who clicked</dd>
<dd><code>slot</code> - the slot number</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the click hasn't been cancelled, false otherwise</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="rightClick(net.minestom.server.entity.Player,int)">rightClick</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">rightClick</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryClickHandler.html#rightClick(net.minestom.server.entity.Player,int)">InventoryClickHandler</a></code></span></div>
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> right click in the inventory. Can also be to drop the cursor item</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryClickHandler.html#rightClick(net.minestom.server.entity.Player,int)">rightClick</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player who clicked</dd>
<dd><code>slot</code> - the slot number</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the click hasn't been cancelled, false otherwise</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="shiftClick(net.minestom.server.entity.Player,int)">shiftClick</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">shiftClick</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryClickHandler.html#shiftClick(net.minestom.server.entity.Player,int)">InventoryClickHandler</a></code></span></div>
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> shift click in the inventory</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryClickHandler.html#shiftClick(net.minestom.server.entity.Player,int)">shiftClick</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player who clicked</dd>
<dd><code>slot</code> - the slot number</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the click hasn't been cancelled, false otherwise</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="changeHeld(net.minestom.server.entity.Player,int,int)">changeHeld</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">changeHeld</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot,
int&nbsp;key)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryClickHandler.html#changeHeld(net.minestom.server.entity.Player,int,int)">InventoryClickHandler</a></code></span></div>
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> held click in the inventory</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryClickHandler.html#changeHeld(net.minestom.server.entity.Player,int,int)">changeHeld</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player who clicked</dd>
<dd><code>slot</code> - the slot number</dd>
<dd><code>key</code> - the held slot (0-8) pressed</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the click hasn't been cancelled, false otherwise</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="middleClick(net.minestom.server.entity.Player,int)">middleClick</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">middleClick</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</span></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryClickHandler.html#middleClick(net.minestom.server.entity.Player,int)">middleClick</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="drop(net.minestom.server.entity.Player,int,int,int)">drop</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">drop</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;mode,
int&nbsp;slot,
int&nbsp;button)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryClickHandler.html#drop(net.minestom.server.entity.Player,int,int,int)">InventoryClickHandler</a></code></span></div>
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> press the drop button</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryClickHandler.html#drop(net.minestom.server.entity.Player,int,int,int)">drop</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player who clicked</dd>
<dd><code>slot</code> - the slot number</dd>
<dd><code>button</code> - -999 if clicking outside, normal if he is not</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the drop hasn't been cancelled, false otherwise</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="dragging(net.minestom.server.entity.Player,int,int)">dragging</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">dragging</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot,
int&nbsp;button)</span></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryClickHandler.html#dragging(net.minestom.server.entity.Player,int,int)">dragging</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code></dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="doubleClick(net.minestom.server.entity.Player,int)">doubleClick</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">boolean</span>&nbsp;<span class="memberName">doubleClick</span>&#8203;(<span class="arguments">@NotNull
<a href="../entity/Player.html" title="class in net.minestom.server.entity">Player</a>&nbsp;player,
int&nbsp;slot)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="InventoryClickHandler.html#doubleClick(net.minestom.server.entity.Player,int)">InventoryClickHandler</a></code></span></div>
<div class="block">Called when a <a href="../entity/Player.html" title="class in net.minestom.server.entity"><code>Player</code></a> double click in the inventory</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="InventoryClickHandler.html#doubleClick(net.minestom.server.entity.Player,int)">doubleClick</a></code>&nbsp;in interface&nbsp;<code><a href="InventoryClickHandler.html" title="interface in net.minestom.server.inventory">InventoryClickHandler</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - the player who clicked</dd>
<dd><code>slot</code> - the slot number</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the click hasn't been cancelled, false otherwise</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="getData()">getData</a></h3>
<div class="memberSignature"><span class="annotations">@Nullable
</span><span class="modifiers">public</span>&nbsp;<span class="returnType"><a href="../data/Data.html" title="interface in net.minestom.server.data">Data</a></span>&nbsp;<span class="memberName">getData</span>()</div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../data/DataContainer.html#getData()">DataContainer</a></code></span></div>
<div class="block">Gets the <a href="../data/Data.html" title="interface in net.minestom.server.data"><code>Data</code></a> of this container.
<p>
A <a href="../data/DataContainer.html" title="interface in net.minestom.server.data"><code>DataContainer</code></a> data is always optional,
meaning that this will be null if no data has been defined.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../data/DataContainer.html#getData()">getData</a></code>&nbsp;in interface&nbsp;<code><a href="../data/DataContainer.html" title="interface in net.minestom.server.data">DataContainer</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="../data/Data.html" title="interface in net.minestom.server.data"><code>Data</code></a> of this container, can be null</dd>
</dl>
</section>
</li>
<li class="blockList">
<section class="detail">
<h3><a id="setData(net.minestom.server.data.Data)">setData</a></h3>
<div class="memberSignature"><span class="modifiers">public</span>&nbsp;<span class="returnType">void</span>&nbsp;<span class="memberName">setData</span>&#8203;(<span class="arguments">@Nullable
<a href="../data/Data.html" title="interface in net.minestom.server.data">Data</a>&nbsp;data)</span></div>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../data/DataContainer.html#setData(net.minestom.server.data.Data)">DataContainer</a></code></span></div>
<div class="block">Sets the <a href="../data/Data.html" title="interface in net.minestom.server.data"><code>Data</code></a> of this container.
<p>
Default implementations are <a href="../data/DataImpl.html" title="class in net.minestom.server.data"><code>DataImpl</code></a> and <a href="../data/SerializableDataImpl.html" title="class in net.minestom.server.data"><code>SerializableDataImpl</code></a> depending
on your use-case.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../data/DataContainer.html#setData(net.minestom.server.data.Data)">setData</a></code>&nbsp;in interface&nbsp;<code><a href="../data/DataContainer.html" title="interface in net.minestom.server.data">DataContainer</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the new <a href="../data/Data.html" title="interface in net.minestom.server.data"><code>Data</code></a> of this container, null to remove it</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
</div>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">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">Help</a></li>
</ul>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<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="subNavList">
<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>
<a id="skip.navbar.bottom">
<!-- -->
</a>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</div>
</div>
</body>
</html>