Files
2025-05-29 16:27:42 -04:00

512 lines
16 KiB
HTML

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.20) on Thu May 29 16:24:46 EDT 2025 -->
<title>ITimers</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2025-05-29">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.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.6.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="ITimers";
}
}
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};
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-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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">&nbsp;</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>&nbsp;<a href="package-summary.html">noppes.npcs.api</a></div>
<h2 title="Interface ITimers" class="title">Interface ITimers</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public interface <span class="typeNameLabel">ITimers</span></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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</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="#clear()">clear</a></span>()</code></th>
<td class="colLast">
<div class="block">Removes all timers.</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="#forceStart(int,int,boolean)">forceStart</a></span>&#8203;(int&nbsp;id,
int&nbsp;ticks,
boolean&nbsp;repeat)</code></th>
<td class="colLast">
<div class="block">Adds a timer to the NPC or player with the given attributes.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#has(int)">has</a></span>&#8203;(int&nbsp;id)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxTicks(int)">maxTicks</a></span>&#8203;(int&nbsp;id)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#repeats(int)">repeats</a></span>&#8203;(int&nbsp;id)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset(int)">reset</a></span>&#8203;(int&nbsp;id)</code></th>
<td class="colLast">
<div class="block">Resets the ticks elapsed in the timer with the given id to 0.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMaxTicks(int,int)">setMaxTicks</a></span>&#8203;(int&nbsp;id,
int&nbsp;maxTicks)</code></th>
<td class="colLast">
<div class="block">Sets the maximum amount of ticks the timer with the given id can run for before it stops.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRepeats(int,boolean)">setRepeats</a></span>&#8203;(int&nbsp;id,
boolean&nbsp;repeat)</code></th>
<td class="colLast">
<div class="block">Sets whether the timer with the given id repeats or not.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setTicks(int,int)">setTicks</a></span>&#8203;(int&nbsp;id,
int&nbsp;ticks)</code></th>
<td class="colLast">
<div class="block">Sets the amount of ticks elapsed in the timer with the given id to a different value.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#size()">size</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#start(int,int,boolean)">start</a></span>&#8203;(int&nbsp;id,
int&nbsp;ticks,
boolean&nbsp;repeat)</code></th>
<td class="colLast">
<div class="block">Adds a timer to the NPC or player with the given attributes.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stop(int)">stop</a></span>&#8203;(int&nbsp;id)</code></th>
<td class="colLast">
<div class="block">Stops the timer with the given id</div>
</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="#ticks(int)">ticks</a></span>&#8203;(int&nbsp;id)</code></th>
<td class="colLast">&nbsp;</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="#timerIds()">timerIds</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</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="timerIds()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timerIds</h4>
<pre class="methodSignature">int[]&nbsp;timerIds()</pre>
</li>
</ul>
<a id="start(int,int,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre class="methodSignature">void&nbsp;start&#8203;(int&nbsp;id,
int&nbsp;ticks,
boolean&nbsp;repeat)</pre>
<div class="block">Adds a timer to the NPC or player with the given attributes. If this function is used and there is already a
timer with the given ID, an exception will be thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - The id of the timer.</dd>
<dd><code>ticks</code> - The amount of ticks before the timer ends.</dd>
<dd><code>repeat</code> - Whether this timer repeats when it reaches its maximum amount of ticks.</dd>
</dl>
</li>
</ul>
<a id="forceStart(int,int,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forceStart</h4>
<pre class="methodSignature">void&nbsp;forceStart&#8203;(int&nbsp;id,
int&nbsp;ticks,
boolean&nbsp;repeat)</pre>
<div class="block">Adds a timer to the NPC or player with the given attributes. No exception will be thrown if there is already a
timer with the given ID when using this function.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - The id of the timer.</dd>
<dd><code>ticks</code> - The amount of ticks before the timer ends.</dd>
<dd><code>repeat</code> - Whether this timer repeats when it reaches its maximum amount of ticks.</dd>
</dl>
</li>
</ul>
<a id="has(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>has</h4>
<pre class="methodSignature">boolean&nbsp;has&#8203;(int&nbsp;id)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if the set of timers contains a timer with the given id, false otherwise.</dd>
</dl>
</li>
</ul>
<a id="stop(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre class="methodSignature">boolean&nbsp;stop&#8203;(int&nbsp;id)</pre>
<div class="block">Stops the timer with the given id</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if there was a timer with the given id.</dd>
</dl>
</li>
</ul>
<a id="reset(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre class="methodSignature">void&nbsp;reset&#8203;(int&nbsp;id)</pre>
<div class="block">Resets the ticks elapsed in the timer with the given id to 0.</div>
</li>
</ul>
<a id="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre class="methodSignature">void&nbsp;clear()</pre>
<div class="block">Removes all timers.</div>
</li>
</ul>
<a id="ticks(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ticks</h4>
<pre class="methodSignature">int&nbsp;ticks&#8203;(int&nbsp;id)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The amount of ticks elapsed in the timer.</dd>
</dl>
</li>
</ul>
<a id="setTicks(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTicks</h4>
<pre class="methodSignature">void&nbsp;setTicks&#8203;(int&nbsp;id,
int&nbsp;ticks)</pre>
<div class="block">Sets the amount of ticks elapsed in the timer with the given id to a different value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ticks</code> - The new ticks elapsed by the timer.</dd>
</dl>
</li>
</ul>
<a id="maxTicks(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxTicks</h4>
<pre class="methodSignature">int&nbsp;maxTicks&#8203;(int&nbsp;id)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The maximum amount of ticks the timer with the given id runs for before it stops.</dd>
</dl>
</li>
</ul>
<a id="setMaxTicks(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxTicks</h4>
<pre class="methodSignature">void&nbsp;setMaxTicks&#8203;(int&nbsp;id,
int&nbsp;maxTicks)</pre>
<div class="block">Sets the maximum amount of ticks the timer with the given id can run for before it stops.</div>
</li>
</ul>
<a id="repeats(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>repeats</h4>
<pre class="methodSignature">boolean&nbsp;repeats&#8203;(int&nbsp;id)</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if the timer with the given id repeats, false otherwise.</dd>
</dl>
</li>
</ul>
<a id="setRepeats(int,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRepeats</h4>
<pre class="methodSignature">void&nbsp;setRepeats&#8203;(int&nbsp;id,
boolean&nbsp;repeat)</pre>
<div class="block">Sets whether the timer with the given id repeats or not.</div>
</li>
</ul>
<a id="size()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>size</h4>
<pre class="methodSignature">int&nbsp;size()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The amount of timers in the set of timers.</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-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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>