Files
2026-03-13 21:21:55 +00:00

561 lines
19 KiB
HTML

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ITelegraphInstance (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="ITelegraphInstance (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};
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&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 ITelegraphInstance" class="title">Interface ITelegraphInstance</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public interface <span class="typeNameLabel">ITelegraphInstance</span></pre>
<div class="block">A runtime instance of an active telegraph in the world.
Represents a spawned telegraph with position, timing, and control methods.
<p>
Instances are created when you call spawn() on an ITelegraph:
<pre>
var telegraph = API.getTelegraphs().createCircle(5.0);
var instance = telegraph.spawn(world, x, y, z);
// Later...
instance.remove(); // Remove the telegraph early
</pre></div>
</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="#followEntity(noppes.npcs.api.entity.IEntity)">followEntity</a></span>&#8203;(<a href="entity/IEntity.html" title="interface in noppes.npcs.api.entity">IEntity</a>&nbsp;entity)</code></th>
<td class="colLast">
<div class="block">Make this telegraph follow an entity.</div>
</td>
</tr>
<tr id="i1" 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="#getInstanceId()">getInstanceId</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the unique instance ID.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getProgress()">getProgress</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the progress from 0.0 (just started) to 1.0 (finished).</div>
</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="#getRemainingTicks()">getRemainingTicks</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the remaining ticks before the telegraph expires.</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="#getTotalTicks()">getTotalTicks</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the total duration ticks.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getX()">getX</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the current X position.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getY()">getY</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the current Y position.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getYaw()">getYaw</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the rotation yaw.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getZ()">getZ</a></span>()</code></th>
<td class="colLast">
<div class="block">Get the current Z position.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isFollowing()">isFollowing</a></span>()</code></th>
<td class="colLast">
<div class="block">Check if this telegraph is following an entity.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isWarning()">isWarning</a></span>()</code></th>
<td class="colLast">
<div class="block">Check if the telegraph is in the warning phase.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lockPosition()">lockPosition</a></span>()</code></th>
<td class="colLast">
<div class="block">Lock the telegraph at its current position.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remove()">remove</a></span>()</code></th>
<td class="colLast">
<div class="block">Remove this telegraph immediately.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPosition(double,double,double)">setPosition</a></span>&#8203;(double&nbsp;x,
double&nbsp;y,
double&nbsp;z)</code></th>
<td class="colLast">
<div class="block">Set the position.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stopFollowing()">stopFollowing</a></span>()</code></th>
<td class="colLast">
<div class="block">Stop following any entity and fix the current position.</div>
</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="getInstanceId()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstanceId</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>&nbsp;getInstanceId()</pre>
<div class="block">Get the unique instance ID.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the unique instance identifier</dd>
</dl>
</li>
</ul>
<a id="getX()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getX</h4>
<pre class="methodSignature">double&nbsp;getX()</pre>
<div class="block">Get the current X position.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current X coordinate</dd>
</dl>
</li>
</ul>
<a id="getY()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getY</h4>
<pre class="methodSignature">double&nbsp;getY()</pre>
<div class="block">Get the current Y position.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current Y coordinate</dd>
</dl>
</li>
</ul>
<a id="getZ()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getZ</h4>
<pre class="methodSignature">double&nbsp;getZ()</pre>
<div class="block">Get the current Z position.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the current Z coordinate</dd>
</dl>
</li>
</ul>
<a id="getYaw()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getYaw</h4>
<pre class="methodSignature">float&nbsp;getYaw()</pre>
<div class="block">Get the rotation yaw.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the rotation yaw in degrees</dd>
</dl>
</li>
</ul>
<a id="setPosition(double,double,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPosition</h4>
<pre class="methodSignature">void&nbsp;setPosition&#8203;(double&nbsp;x,
double&nbsp;y,
double&nbsp;z)</pre>
<div class="block">Set the position.
Note: Only works for static telegraphs (not following an entity).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>x</code> - X coordinate</dd>
<dd><code>y</code> - Y coordinate</dd>
<dd><code>z</code> - Z coordinate</dd>
</dl>
</li>
</ul>
<a id="followEntity(noppes.npcs.api.entity.IEntity)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>followEntity</h4>
<pre class="methodSignature">void&nbsp;followEntity&#8203;(<a href="entity/IEntity.html" title="interface in noppes.npcs.api.entity">IEntity</a>&nbsp;entity)</pre>
<div class="block">Make this telegraph follow an entity.
The telegraph position will update each tick to match the entity.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entity</code> - the entity to follow</dd>
</dl>
</li>
</ul>
<a id="stopFollowing()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopFollowing</h4>
<pre class="methodSignature">void&nbsp;stopFollowing()</pre>
<div class="block">Stop following any entity and fix the current position.</div>
</li>
</ul>
<a id="isFollowing()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFollowing</h4>
<pre class="methodSignature">boolean&nbsp;isFollowing()</pre>
<div class="block">Check if this telegraph is following an entity.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if currently following an entity</dd>
</dl>
</li>
</ul>
<a id="getRemainingTicks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemainingTicks</h4>
<pre class="methodSignature">int&nbsp;getRemainingTicks()</pre>
<div class="block">Get the remaining ticks before the telegraph expires.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>remaining ticks before expiration</dd>
</dl>
</li>
</ul>
<a id="getTotalTicks()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTotalTicks</h4>
<pre class="methodSignature">int&nbsp;getTotalTicks()</pre>
<div class="block">Get the total duration ticks.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the total duration in ticks</dd>
</dl>
</li>
</ul>
<a id="getProgress()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProgress</h4>
<pre class="methodSignature">float&nbsp;getProgress()</pre>
<div class="block">Get the progress from 0.0 (just started) to 1.0 (finished).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>progress from 0.0 (just started) to 1.0 (finished)</dd>
</dl>
</li>
</ul>
<a id="isWarning()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWarning</h4>
<pre class="methodSignature">boolean&nbsp;isWarning()</pre>
<div class="block">Check if the telegraph is in the warning phase.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if in the warning phase</dd>
</dl>
</li>
</ul>
<a id="remove()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre class="methodSignature">void&nbsp;remove()</pre>
<div class="block">Remove this telegraph immediately.
Sends a removal packet to all clients tracking it.</div>
</li>
</ul>
<a id="lockPosition()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>lockPosition</h4>
<pre class="methodSignature">void&nbsp;lockPosition()</pre>
<div class="block">Lock the telegraph at its current position.
Equivalent to calling stopFollowing().</div>
</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&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>