<dd><code><ahref="BlockState.html"title="interface in org.bukkit.block">BlockState</a></code>, <code><ahref="../../../io/papermc/paper/command/CommandBlockHolder.html"title="interface in io.papermc.paper.command">CommandBlockHolder</a></code>, <code><ahref="../metadata/Metadatable.html"title="interface in org.bukkit.metadata">Metadatable</a></code>, <code><ahref="../persistence/PersistentDataHolder.html"title="interface in org.bukkit.persistence">PersistentDataHolder</a></code>, <code><ahref="TileState.html"title="interface in org.bukkit.block">TileState</a></code></dd>
extends <ahref="TileState.html"title="interface in org.bukkit.block">TileState</a>, <ahref="../../../io/papermc/paper/command/CommandBlockHolder.html"title="interface in io.papermc.paper.command">CommandBlockHolder</a></span></div>
<divclass="block">Represents a captured state of a command block.</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><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="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></code></div>
<divclass="block">Gets the command that this CommandBlock will run when powered.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><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="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></code></div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="https://jd.adventure.kyori.net/api/4.12.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link">Component</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#name(net.kyori.adventure.text.Component)"class="member-name-link">name</a><wbr>(<ahref="https://jd.adventure.kyori.net/api/4.12.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link">Component</a> name)</code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><ahref="#setCommand(java.lang.String)"class="member-name-link">setCommand</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a> command)</code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3 method-summary-table-tab6"><code><ahref="#setName(java.lang.String)"class="member-name-link">setName</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a> name)</code></div>
<divclass="deprecation-comment">in favour of <ahref="#name(net.kyori.adventure.text.Component)"><code>name(net.kyori.adventure.text.Component)</code></a></div>
</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-org.bukkit.block.BlockState">Methods inherited from interface org.bukkit.block.<ahref="BlockState.html"title="interface in org.bukkit.block">BlockState</a></h3>
<h3id="methods-inherited-from-class-io.papermc.paper.command.CommandBlockHolder">Methods inherited from interface io.papermc.paper.command.<ahref="../../../io/papermc/paper/command/CommandBlockHolder.html"title="interface in io.papermc.paper.command">CommandBlockHolder</a></h3>
<h3id="methods-inherited-from-class-org.bukkit.metadata.Metadatable">Methods inherited from interface org.bukkit.metadata.<ahref="../metadata/Metadatable.html"title="interface in org.bukkit.metadata">Metadatable</a></h3>
<h3id="methods-inherited-from-class-org.bukkit.block.TileState">Methods inherited from interface org.bukkit.block.<ahref="TileState.html"title="interface in org.bukkit.block">TileState</a></h3>
<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="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="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></span> <spanclass="element-name">getCommand</span>()</div>
<divclass="block">Gets the command that this CommandBlock will run when powered.
This will never return null. If the CommandBlock does not have a
command, an empty String will be returned instead.</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../../../io/papermc/paper/command/CommandBlockHolder.html#getCommand()">getCommand</a></code> in interface <code><ahref="../../../io/papermc/paper/command/CommandBlockHolder.html"title="interface in io.papermc.paper.command">CommandBlockHolder</a></code></dd>
<dt>Returns:</dt>
<dd>Command that this CommandBlock will run when powered.</dd>
<divclass="member-signature"><spanclass="return-type">void</span> <spanclass="element-name">setCommand</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a> command)</span></div>
<divclass="block">Sets the command that this CommandBlock will run when powered.
Setting the command to null is the same as setting it to an empty
String.</div>
<dlclass="notes">
<dt>Specified by:</dt>
<dd><code><ahref="../../../io/papermc/paper/command/CommandBlockHolder.html#setCommand(java.lang.String)">setCommand</a></code> in interface <code><ahref="../../../io/papermc/paper/command/CommandBlockHolder.html"title="interface in io.papermc.paper.command">CommandBlockHolder</a></code></dd>
<dt>Parameters:</dt>
<dd><code>command</code> - Command that this CommandBlock will run when powered.</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getName()">
<h3>getName</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</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>
</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="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a></span> <spanclass="element-name">getName</span>()</div>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
</span><spanclass="return-type">void</span> <spanclass="element-name">setName</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html"title="class or interface in java.lang"class="external-link">String</a> name)</span></div>
<divclass="deprecation-comment">in favour of <ahref="#name(net.kyori.adventure.text.Component)"><code>name(net.kyori.adventure.text.Component)</code></a></div>
</div>
<divclass="block">Sets the name of this CommandBlock. The name is used with commands
that this CommandBlock executes. Setting the name to null is the
same as setting it to "@".</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - New name for this CommandBlock.</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="name()">
<h3>name</h3>
<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="return-type"><ahref="https://jd.adventure.kyori.net/api/4.12.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link">Component</a></span> <spanclass="element-name">name</span>()</div>
by default is a <ahref="https://jd.adventure.kyori.net/api/4.12.0/net/kyori/adventure/text/TextComponent.html"title="class or interface in net.kyori.adventure.text"class="external-link"><code>TextComponent</code></a> containing <code>@</code>.</div>
<divclass="member-signature"><spanclass="return-type">void</span> <spanclass="element-name">name</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a>
<ahref="https://jd.adventure.kyori.net/api/4.12.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link">Component</a> name)</span></div>
same as setting it to a <ahref="https://jd.adventure.kyori.net/api/4.12.0/net/kyori/adventure/text/TextComponent.html"title="class or interface in net.kyori.adventure.text"class="external-link"><code>TextComponent</code></a> containing <code>@</code>.</div>