mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-07 19:31:37 +01:00
345 lines
17 KiB
HTML
345 lines
17 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc -->
|
|
<title>InventoryModifier (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, interface: InventoryModifier">
|
|
<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":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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> <a href="package-summary.html">net.minestom.server.inventory</a></div>
|
|
<h1 title="Interface InventoryModifier" class="title">Interface InventoryModifier</h1>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<section class="description">
|
|
<dl>
|
|
<dt>All Known Implementing Classes:</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="Inventory.html" title="class in net.minestom.server.inventory">Inventory</a></code>, <code><a href="PlayerInventory.html" title="class in net.minestom.server.inventory">PlayerInventory</a></code>, <code><a href="type/VillagerInventory.html" title="class in net.minestom.server.inventory.type">VillagerInventory</a></code></dd>
|
|
</dl>
|
|
<hr>
|
|
<pre>public interface <span class="typeNameLabel">InventoryModifier</span></pre>
|
|
<div class="block">Represents an inventory where items can be modified/retrieved.</div>
|
|
</section>
|
|
<section class="summary">
|
|
<ul class="blockList">
|
|
<!-- ========== 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="t3" class="tableTab" onclick="show(4);">Abstract 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>​(<a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition">InventoryCondition</a> 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>​(<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a> 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>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="i3">
|
|
<td class="colFirst"><code>java.util.List<<a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition">InventoryCondition</a>></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="altColor" id="i4">
|
|
<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>​(int 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="i5">
|
|
<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="i6">
|
|
<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="i7">
|
|
<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>​(int slot,
|
|
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a> 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>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="details">
|
|
<ul class="blockList">
|
|
<!-- ============ 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="setItemStack(int,net.minestom.server.item.ItemStack)">setItemStack</a></h3>
|
|
<div class="memberSignature"><span class="returnType">void</span> <span class="memberName">setItemStack</span>​(<span class="arguments">int slot,
|
|
@NotNull
|
|
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a> itemStack)</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="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="returnType">boolean</span> <span class="memberName">addItemStack</span>​(<span class="arguments">@NotNull
|
|
<a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a> itemStack)</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="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="returnType">void</span> <span class="memberName">clear</span>()</div>
|
|
<div class="block">Clears the inventory and send relevant update to the viewer(s).</div>
|
|
</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="returnType"><a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a></span> <span class="memberName">getItemStack</span>​(<span class="arguments">int slot)</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="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="returnType"><a href="../item/ItemStack.html" title="class in net.minestom.server.item">ItemStack</a>[]</span> <span class="memberName">getItemStacks</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="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="returnType">int</span> <span class="memberName">getSize</span>()</div>
|
|
<div class="block">Gets the size of the inventory.</div>
|
|
<dl>
|
|
<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="returnType">java.util.List<<a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition">InventoryCondition</a>></span> <span class="memberName">getInventoryConditions</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="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="returnType">void</span> <span class="memberName">addInventoryCondition</span>​(<span class="arguments">@NotNull
|
|
<a href="condition/InventoryCondition.html" title="interface in net.minestom.server.inventory.condition">InventoryCondition</a> inventoryCondition)</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="paramLabel">Parameters:</span></dt>
|
|
<dd><code>inventoryCondition</code> - the inventory condition to add</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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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>
|