<divclass="inheritance"title="Inheritance Tree"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">java.lang.Object</a>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html"title="class or interface in java.lang"class="external-link">Runnable</a></code></dd>
</dl>
<hr>
<divclass="type-signature"><spanclass="modifiers">public abstract class </span><spanclass="element-name type-name-label">BukkitRunnable</span>
<spanclass="extends-implements">extends <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a>
implements <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html"title="class or interface in java.lang"class="external-link">Runnable</a></span></div>
<divclass="block">This class is provided as an easy way to handle scheduling tasks.</div>
<divclass="block">Returns true if this task has been cancelled.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#runTask(org.bukkit.plugin.Plugin)"class="member-name-link">runTask</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin)</code></div>
<divclass="block">Schedules this in the Bukkit scheduler to run on next tick.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#runTaskAsynchronously(org.bukkit.plugin.Plugin)"class="member-name-link">runTaskAsynchronously</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin)</code></div>
<divclass="block"><b>Asynchronous tasks should never access any API in Bukkit.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#runTaskLater(org.bukkit.plugin.Plugin,long)"class="member-name-link">runTaskLater</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin,
<divclass="block">Schedules this to run after the specified number of server ticks.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#runTaskLaterAsynchronously(org.bukkit.plugin.Plugin,long)"class="member-name-link">runTaskLaterAsynchronously</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin,
<divclass="block"><b>Asynchronous tasks should never access any API in Bukkit.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#runTaskTimer(org.bukkit.plugin.Plugin,long,long)"class="member-name-link">runTaskTimer</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin,
<divclass="block">Schedules this to repeatedly run until cancelled, starting after the
specified number of server ticks.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#runTaskTimerAsynchronously(org.bukkit.plugin.Plugin,long,long)"class="member-name-link">runTaskTimerAsynchronously</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin,
<divclass="block"><b>Asynchronous tasks should never access any API in Bukkit.</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></h3>
<code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()"title="class or interface in java.lang"class="external-link">clone</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"title="class or interface in java.lang"class="external-link">equals</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()"title="class or interface in java.lang"class="external-link">finalize</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()"title="class or interface in java.lang"class="external-link">getClass</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()"title="class or interface in java.lang"class="external-link">hashCode</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()"title="class or interface in java.lang"class="external-link">notify</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()"title="class or interface in java.lang"class="external-link">notifyAll</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()"title="class or interface in java.lang"class="external-link">toString</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)"title="class or interface in java.lang"class="external-link">wait</a></code></div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-java.lang.Runnable">Methods inherited from interface java.lang.<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html"title="class or interface in java.lang"class="external-link">Runnable</a></h3>
<code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html#run()"title="class or interface in java.lang"class="external-link">run</a></code></div>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block">Returns true if this task has been cancelled.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>true if the task has been cancelled</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if task was not scheduled yet</dd>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block">Attempts to cancel this task.</div>
<dlclass="notes">
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if task was not scheduled yet</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></span> <spanclass="element-name">runTask</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a>,
<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block">Schedules this in the Bukkit scheduler to run on next tick.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>plugin</code> - the reference to the plugin scheduling task</dd>
<dt>Returns:</dt>
<dd>a BukkitTask that contains the id number</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a></code> - if plugin is null</dd>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if this was already scheduled</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></span> <spanclass="element-name">runTaskAsynchronously</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a>,
<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block"><b>Asynchronous tasks should never access any API in Bukkit. Great care
should be taken to assure the thread-safety of asynchronous tasks.</b>
<p>
Schedules this in the Bukkit scheduler to run asynchronously.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>plugin</code> - the reference to the plugin scheduling task</dd>
<dt>Returns:</dt>
<dd>a BukkitTask that contains the id number</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a></code> - if plugin is null</dd>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if this was already scheduled</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></span> <spanclass="element-name">runTaskLater</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin,
long delay)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a>,
<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block">Schedules this to run after the specified number of server ticks.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>plugin</code> - the reference to the plugin scheduling task</dd>
<dd><code>delay</code> - the ticks to wait before running the task</dd>
<dt>Returns:</dt>
<dd>a BukkitTask that contains the id number</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a></code> - if plugin is null</dd>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if this was already scheduled</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></span> <spanclass="element-name">runTaskLaterAsynchronously</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin,
long delay)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a>,
<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block"><b>Asynchronous tasks should never access any API in Bukkit. Great care
should be taken to assure the thread-safety of asynchronous tasks.</b>
<p>
Schedules this to run asynchronously after the specified number of
server ticks.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>plugin</code> - the reference to the plugin scheduling task</dd>
<dd><code>delay</code> - the ticks to wait before running the task</dd>
<dt>Returns:</dt>
<dd>a BukkitTask that contains the id number</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a></code> - if plugin is null</dd>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if this was already scheduled</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></span> <spanclass="element-name">runTaskTimer</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin,
long delay,
long period)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a>,
<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block">Schedules this to repeatedly run until cancelled, starting after the
specified number of server ticks.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>plugin</code> - the reference to the plugin scheduling task</dd>
<dd><code>delay</code> - the ticks to wait before running the task</dd>
<dd><code>period</code> - the ticks to wait between runs</dd>
<dt>Returns:</dt>
<dd>a BukkitTask that contains the id number</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a></code> - if plugin is null</dd>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if this was already scheduled</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="BukkitTask.html"title="interface in org.bukkit.scheduler">BukkitTask</a></span> <spanclass="element-name">runTaskTimerAsynchronously</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../plugin/Plugin.html"title="interface in org.bukkit.plugin">Plugin</a> plugin,
long delay,
long period)</span>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a>,
<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block"><b>Asynchronous tasks should never access any API in Bukkit. Great care
should be taken to assure the thread-safety of asynchronous tasks.</b>
<p>
Schedules this to repeatedly run asynchronously until cancelled,
starting after the specified number of server ticks.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>plugin</code> - the reference to the plugin scheduling task</dd>
<dd><code>delay</code> - the ticks to wait before running the task for the first
time</dd>
<dd><code>period</code> - the ticks to wait between runs</dd>
<dt>Returns:</dt>
<dd>a BukkitTask that contains the id number</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html"title="class or interface in java.lang"class="external-link">IllegalArgumentException</a></code> - if plugin is null</dd>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if this was already scheduled</dd>
throws <spanclass="exceptions"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></span></div>
<divclass="block">Gets the task id for this runnable.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>the task id that this runnable was scheduled as</dd>
<dt>Throws:</dt>
<dd><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalStateException.html"title="class or interface in java.lang"class="external-link">IllegalStateException</a></code> - if task was not scheduled yet</dd>