mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 09:13:06 +00:00
1127 lines
43 KiB
HTML
1127 lines
43 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc -->
|
|
<title>IRoleTrader (CustomNPC-Plus 1.11.1 API)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<link rel="stylesheet" type="text/css" href="../../../../javadoc-theme.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../../jquery/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="../../../../jquery/jszip/dist/jszip.min.js"></script>
|
|
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
|
<!--[if IE]>
|
|
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="../../../../jquery/jquery-3.7.1.min.js"></script>
|
|
<script type="text/javascript" src="../../../../jquery/jquery-ui.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="IRoleTrader (CustomNPC-Plus 1.11.1 API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6,"i29":6,"i30":6,"i31":6,"i32":6,"i33":6,"i34":6,"i35":6,"i36":6,"i37":6,"i38":6,"i39":6,"i40":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 = "../../../../";
|
|
var useModuleDirectories = true;
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<header role="banner">
|
|
<nav role="navigation">
|
|
<div class="fixedNav">
|
|
<!-- ========= 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 class="aboutLanguage"><div id="javadoc-header"> <a href="/CustomNPC-Plus/" class="header-brand"> <div class="header-title"> CustomNPC+ <span>Javadoc Reference</span> </div> </a> <a href="/CustomNPC-Plus/" class="header-back"> Back to Index </a> </div></div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<ul class="navListSearch">
|
|
<li><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<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>
|
|
<a id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </div>
|
|
<script type="text/javascript"><!--
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|
//-->
|
|
</script>
|
|
</nav>
|
|
</header>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<main role="main">
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">noppes.npcs.api.roles</a></div>
|
|
<h2 title="Interface IRoleTrader" class="title">Interface IRoleTrader</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Superinterfaces:</dt>
|
|
<dd><code><a href="IRole.html" title="interface in noppes.npcs.api.roles">IRole</a></code></dd>
|
|
</dl>
|
|
<hr>
|
|
<pre>public interface <span class="typeNameLabel">IRoleTrader</span>
|
|
extends <a href="IRole.html" title="interface in noppes.npcs.api.roles">IRole</a></pre>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<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>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#disableSlot(int)">disableSlot</a></span>​(int slot)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">prevent an item from being sold on that slot</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#disableSlot(int,noppes.npcs.api.entity.IPlayer)">disableSlot</a></span>​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">disables the slot for this player</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#enableSlot(int)">enableSlot</a></span>​(int slot)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">allow an item to be sold on that slot</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#enableSlot(int,noppes.npcs.api.entity.IPlayer)">enableSlot</a></span>​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">enables the slot for this player</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAvailableStock(int)">getAvailableStock</a></span>​(int slot)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get available stock for a slot (global mode)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAvailableStock(int,noppes.npcs.api.entity.IPlayer)">getAvailableStock</a></span>​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get available stock for a slot for a specific player (per-player mode)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code><a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a>[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrency(int)">getCurrency</a></span>​(int slot)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrencyCost(int)">getCurrencyCost</a></span>​(int slot)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the currency cost for a slot (additive to item costs)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentStock(int)">getCurrentStock</a></span>​(int slot)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get current stock for a slot (global mode)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCustomResetTime()">getCustomResetTime</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get custom reset time (only used for MCCUSTOM/RLCUSTOM)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLastResetTime()">getLastResetTime</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the timestamp of the last stock reset</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMarket()">getMarket</a></span>()</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxStock(int)">getMaxStock</a></span>​(int slot)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get max stock for a slot</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPlayerPurchased(int,noppes.npcs.api.entity.IPlayer)">getPlayerPurchased</a></span>​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get purchased amount for a player in a slot (per-player mode)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPurchaseNum(int)">getPurchaseNum</a></span>​(int slot)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPurchaseNum(int,noppes.npcs.api.entity.IPlayer)">getPurchaseNum</a></span>​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code><a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSellOption(int)">getSellOption</a></span>​(int slot)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStockResetType()">getStockResetType</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get the stock reset type</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTimeUntilReset()">getTimeUntilReset</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Get time remaining until next stock reset</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasCurrencyCost(int)">hasCurrencyCost</a></span>​(int slot)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isPerPlayerStock()">isPerPlayerStock</a></span>()</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSlotEnabled(int)">isSlotEnabled</a></span>​(int slot)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSlotEnabled(int,noppes.npcs.api.entity.IPlayer)">isSlotEnabled</a></span>​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isStockEnabled()">isStockEnabled</a></span>()</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeSellOption(int)">removeSellOption</a></span>​(int slot)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetCooldown()">resetCooldown</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reset the cooldown timer without resetting stock values
|
|
Stock will reset on next trigger after this is called</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetPurchaseNum()">resetPurchaseNum</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Sets the purchase count of all slots to 0</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetPurchaseNum(int)">resetPurchaseNum</a></span>​(int slot)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">sets the purchase num for that slot to 0</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetPurchaseNum(int,noppes.npcs.api.entity.IPlayer)">resetPurchaseNum</a></span>​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">sets the purchase num for that slot and player to 0</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resetStock()">resetStock</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reset all stock to max values</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCurrencyCost(int,long)">setCurrencyCost</a></span>​(int slot,
|
|
long cost)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set the currency cost for a slot (additive to item costs)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCurrentStock(int,int)">setCurrentStock</a></span>​(int slot,
|
|
int amount)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set current stock for a slot (global mode only)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomResetTime(long)">setCustomResetTime</a></span>​(long time)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set custom reset time</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMarket(java.lang.String)">setMarket</a></span>​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxStock(int,int)">setMaxStock</a></span>​(int slot,
|
|
int amount)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set max stock for a slot</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPerPlayerStock(boolean)">setPerPlayerStock</a></span>​(boolean perPlayer)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set whether stock is per-player or global</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPlayerPurchased(int,noppes.npcs.api.entity.IPlayer,int)">setPlayerPurchased</a></span>​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player,
|
|
int amount)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set purchased amount for a player in a slot (per-player mode)</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSellOption(int,noppes.npcs.api.item.IItemStack,noppes.npcs.api.item.IItemStack)">setSellOption</a></span>​(int slot,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> currency,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> sold)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i38" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setSellOption(int,noppes.npcs.api.item.IItemStack,noppes.npcs.api.item.IItemStack,noppes.npcs.api.item.IItemStack)">setSellOption</a></span>​(int slot,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> currency,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> currency2,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> sold)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i39" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setStockEnabled(boolean)">setStockEnabled</a></span>​(boolean enabled)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Enable or disable stock system</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i40" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setStockResetType(int)">setStockResetType</a></span>​(int type)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Set stock reset type</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="methods.inherited.from.class.noppes.npcs.api.roles.IRole">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from interface noppes.npcs.api.roles.<a href="IRole.html" title="interface in noppes.npcs.api.roles">IRole</a></h3>
|
|
<code><a href="IRole.html#getNpc()">getNpc</a>, <a href="IRole.html#getType()">getType</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a id="setSellOption(int,noppes.npcs.api.item.IItemStack,noppes.npcs.api.item.IItemStack,noppes.npcs.api.item.IItemStack)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setSellOption</h4>
|
|
<pre class="methodSignature">void setSellOption​(int slot,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> currency,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> currency2,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> sold)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dd><code>currency</code> - Currency item</dd>
|
|
<dd><code>currency2</code> - Currency item number two</dd>
|
|
<dd><code>sold</code> - Item to be sold by this npc</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setSellOption(int,noppes.npcs.api.item.IItemStack,noppes.npcs.api.item.IItemStack)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setSellOption</h4>
|
|
<pre class="methodSignature">void setSellOption​(int slot,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> currency,
|
|
<a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> sold)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dd><code>currency</code> - Currency item</dd>
|
|
<dd><code>sold</code> - Item to be sold by this npc</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getSellOption(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSellOption</h4>
|
|
<pre class="methodSignature"><a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a> getSellOption​(int slot)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The item being sold in this slot.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCurrency(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrency</h4>
|
|
<pre class="methodSignature"><a href="../item/IItemStack.html" title="interface in noppes.npcs.api.item">IItemStack</a>[] getCurrency​(int slot)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a ScriptItemStack array of size 2 which contains the currency of this trade</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="removeSellOption(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeSellOption</h4>
|
|
<pre class="methodSignature">void removeSellOption​(int slot)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setMarket(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setMarket</h4>
|
|
<pre class="methodSignature">void setMarket​(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> name)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>name</code> - The trader Linked Market name</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getMarket()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMarket</h4>
|
|
<pre class="methodSignature"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> getMarket()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Get the currently set Linked Market name</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPurchaseNum(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPurchaseNum</h4>
|
|
<pre class="methodSignature">int getPurchaseNum​(int slot)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the number of times an item has been sold on that slot</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPurchaseNum(int,noppes.npcs.api.entity.IPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPurchaseNum</h4>
|
|
<pre class="methodSignature">int getPurchaseNum​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dd><code>player</code> - </dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the number of times this player has purchased from this trader</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="resetPurchaseNum()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>resetPurchaseNum</h4>
|
|
<pre class="methodSignature">void resetPurchaseNum()</pre>
|
|
<div class="block">Sets the purchase count of all slots to 0</div>
|
|
</li>
|
|
</ul>
|
|
<a id="resetPurchaseNum(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>resetPurchaseNum</h4>
|
|
<pre class="methodSignature">void resetPurchaseNum​(int slot)</pre>
|
|
<div class="block">sets the purchase num for that slot to 0</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="resetPurchaseNum(int,noppes.npcs.api.entity.IPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>resetPurchaseNum</h4>
|
|
<pre class="methodSignature">void resetPurchaseNum​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</pre>
|
|
<div class="block">sets the purchase num for that slot and player to 0</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dd><code>player</code> - </dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isSlotEnabled(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isSlotEnabled</h4>
|
|
<pre class="methodSignature">boolean isSlotEnabled​(int slot)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>if this slot is enabled</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isSlotEnabled(int,noppes.npcs.api.entity.IPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isSlotEnabled</h4>
|
|
<pre class="methodSignature">boolean isSlotEnabled​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dd><code>player</code> - </dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>if this slot is enabled for this player</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="disableSlot(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>disableSlot</h4>
|
|
<pre class="methodSignature">void disableSlot​(int slot)</pre>
|
|
<div class="block">prevent an item from being sold on that slot</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="disableSlot(int,noppes.npcs.api.entity.IPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>disableSlot</h4>
|
|
<pre class="methodSignature">void disableSlot​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</pre>
|
|
<div class="block">disables the slot for this player</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dd><code>player</code> - </dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="enableSlot(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>enableSlot</h4>
|
|
<pre class="methodSignature">void enableSlot​(int slot)</pre>
|
|
<div class="block">allow an item to be sold on that slot</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="enableSlot(int,noppes.npcs.api.entity.IPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>enableSlot</h4>
|
|
<pre class="methodSignature">void enableSlot​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</pre>
|
|
<div class="block">enables the slot for this player</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - </dd>
|
|
<dd><code>player</code> - </dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isStockEnabled()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isStockEnabled</h4>
|
|
<pre class="methodSignature">boolean isStockEnabled()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether stock system is enabled</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setStockEnabled(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setStockEnabled</h4>
|
|
<pre class="methodSignature">void setStockEnabled​(boolean enabled)</pre>
|
|
<div class="block">Enable or disable stock system</div>
|
|
</li>
|
|
</ul>
|
|
<a id="isPerPlayerStock()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isPerPlayerStock</h4>
|
|
<pre class="methodSignature">boolean isPerPlayerStock()</pre>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether stock is tracked per-player (true) or globally (false)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setPerPlayerStock(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setPerPlayerStock</h4>
|
|
<pre class="methodSignature">void setPerPlayerStock​(boolean perPlayer)</pre>
|
|
<div class="block">Set whether stock is per-player or global</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getStockResetType()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getStockResetType</h4>
|
|
<pre class="methodSignature">int getStockResetType()</pre>
|
|
<div class="block">Get the stock reset type</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>0=NONE, 1=MCDAILY, 2=MCWEEKLY, 3=MCCUSTOM, 4=RLDAILY, 5=RLWEEKLY, 6=RLCUSTOM</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setStockResetType(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setStockResetType</h4>
|
|
<pre class="methodSignature">void setStockResetType​(int type)</pre>
|
|
<div class="block">Set stock reset type</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>type</code> - 0=NONE, 1=MCDAILY, 2=MCWEEKLY, 3=MCCUSTOM, 4=RLDAILY, 5=RLWEEKLY, 6=RLCUSTOM</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCustomResetTime()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCustomResetTime</h4>
|
|
<pre class="methodSignature">long getCustomResetTime()</pre>
|
|
<div class="block">Get custom reset time (only used for MCCUSTOM/RLCUSTOM)</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Custom time in ticks (MC) or milliseconds (RL)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setCustomResetTime(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setCustomResetTime</h4>
|
|
<pre class="methodSignature">void setCustomResetTime​(long time)</pre>
|
|
<div class="block">Set custom reset time</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>time</code> - Time in ticks (MC) or milliseconds (RL)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getMaxStock(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMaxStock</h4>
|
|
<pre class="methodSignature">int getMaxStock​(int slot)</pre>
|
|
<div class="block">Get max stock for a slot</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Max stock, -1 = unlimited</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setMaxStock(int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setMaxStock</h4>
|
|
<pre class="methodSignature">void setMaxStock​(int slot,
|
|
int amount)</pre>
|
|
<div class="block">Set max stock for a slot</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dd><code>amount</code> - Max stock, -1 = unlimited</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAvailableStock(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAvailableStock</h4>
|
|
<pre class="methodSignature">int getAvailableStock​(int slot)</pre>
|
|
<div class="block">Get available stock for a slot (global mode)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Available stock, Integer.MAX_VALUE if unlimited</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAvailableStock(int,noppes.npcs.api.entity.IPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAvailableStock</h4>
|
|
<pre class="methodSignature">int getAvailableStock​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</pre>
|
|
<div class="block">Get available stock for a slot for a specific player (per-player mode)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dd><code>player</code> - The player</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Available stock, Integer.MAX_VALUE if unlimited</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="resetStock()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>resetStock</h4>
|
|
<pre class="methodSignature">void resetStock()</pre>
|
|
<div class="block">Reset all stock to max values</div>
|
|
</li>
|
|
</ul>
|
|
<a id="resetCooldown()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>resetCooldown</h4>
|
|
<pre class="methodSignature">void resetCooldown()</pre>
|
|
<div class="block">Reset the cooldown timer without resetting stock values
|
|
Stock will reset on next trigger after this is called</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getCurrentStock(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentStock</h4>
|
|
<pre class="methodSignature">int getCurrentStock​(int slot)</pre>
|
|
<div class="block">Get current stock for a slot (global mode)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Current stock, -1 if not initialized</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setCurrentStock(int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setCurrentStock</h4>
|
|
<pre class="methodSignature">void setCurrentStock​(int slot,
|
|
int amount)</pre>
|
|
<div class="block">Set current stock for a slot (global mode only)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dd><code>amount</code> - Current stock amount</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPlayerPurchased(int,noppes.npcs.api.entity.IPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerPurchased</h4>
|
|
<pre class="methodSignature">int getPlayerPurchased​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player)</pre>
|
|
<div class="block">Get purchased amount for a player in a slot (per-player mode)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dd><code>player</code> - The player</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Purchased amount (stock available = maxStock - purchasedAmount)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setPlayerPurchased(int,noppes.npcs.api.entity.IPlayer,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setPlayerPurchased</h4>
|
|
<pre class="methodSignature">void setPlayerPurchased​(int slot,
|
|
<a href="../entity/IPlayer.html" title="interface in noppes.npcs.api.entity">IPlayer</a> player,
|
|
int amount)</pre>
|
|
<div class="block">Set purchased amount for a player in a slot (per-player mode)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dd><code>player</code> - The player</dd>
|
|
<dd><code>amount</code> - Purchased amount</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getLastResetTime()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getLastResetTime</h4>
|
|
<pre class="methodSignature">long getLastResetTime()</pre>
|
|
<div class="block">Get the timestamp of the last stock reset</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Time in ticks (MC) or milliseconds (RL), depending on reset type</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getTimeUntilReset()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTimeUntilReset</h4>
|
|
<pre class="methodSignature">long getTimeUntilReset()</pre>
|
|
<div class="block">Get time remaining until next stock reset</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Time remaining in ticks (MC) or milliseconds (RL), -1 if no reset scheduled</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCurrencyCost(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrencyCost</h4>
|
|
<pre class="methodSignature">long getCurrencyCost​(int slot)</pre>
|
|
<div class="block">Get the currency cost for a slot (additive to item costs)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Currency cost, 0 = no cost</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="setCurrencyCost(int,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setCurrencyCost</h4>
|
|
<pre class="methodSignature">void setCurrencyCost​(int slot,
|
|
long cost)</pre>
|
|
<div class="block">Set the currency cost for a slot (additive to item costs)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dd><code>cost</code> - Currency cost, 0 = no cost</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="hasCurrencyCost(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>hasCurrencyCost</h4>
|
|
<pre class="methodSignature">boolean hasCurrencyCost​(int slot)</pre>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>slot</code> - Slot number 0-17</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether this slot has a currency cost > 0</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<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 class="aboutLanguage"><script> (function() { // Fix uppercase text in table cells // Javadoc 11: method names are in th[scope="row"] a, not td a function fixCase() { document.querySelectorAll("th[scope='row'] a, td a, .memberNameLink a").forEach(function(el) { var t = el.textContent.trim(); if (t.length > 2 && t === t.toUpperCase() && t.indexOf(" ") === -1) { el.textContent = t.toLowerCase(); } }); } // Correct navPadding = topNav height + subNav height // Uses !important to override jQuery's inline style function fixPadding() { var topNav = document.querySelector(".topNav"); var subNav = document.querySelector(".subNav"); var pad = document.querySelector(".navPadding"); if (!pad) return; var h = (topNav ? topNav.offsetHeight : 0) + (subNav ? subNav.offsetHeight : 0); if (h > 0) { pad.style.setProperty("padding-top", h + "px", "important"); } } document.addEventListener("DOMContentLoaded", function() { fixCase(); // Run fixPadding after jQuery has had its chance setTimeout(fixPadding, 0); setTimeout(fixPadding, 50); setTimeout(fixPadding, 200); // Use MutationObserver to permanently override any further jQuery writes var pad = document.querySelector(".navPadding"); if (pad) { var observer = new MutationObserver(function() { fixPadding(); }); observer.observe(pad, { attributes: true, attributeFilter: ["style"] }); } }); })(); </script></div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<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>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|