<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>
<divclass="type-signature"><spanclass="modifiers">public final class </span><spanclass="element-name type-name-label">PaperComponents</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></span></div>
<divclass="block">Paper API-specific methods for working with <ahref="https://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link"><code>Component</code></a>s and related.</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <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://jd.adventure.kyori.net/text-serializer-gson/4.11.0/net/kyori/adventure/text/serializer/gson/GsonComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.gson"class="external-link">GsonComponentSerializer</a></code></div>
<divclass="block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">use <ahref="https://jd.adventure.kyori.net/text-serializer-gson/4.11.0/net/kyori/adventure/text/serializer/gson/GsonComponentSerializer.html#colorDownsamplingGson()"title="class or interface in net.kyori.adventure.text.serializer.gson"class="external-link"><code>GsonComponentSerializer.colorDownsamplingGson()</code></a></div>
</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <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://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/flattener/ComponentFlattener.html"title="class or interface in net.kyori.adventure.text.flattener"class="external-link">ComponentFlattener</a></code></div>
<divclass="block">Return a component flattener that can use game data to resolve extra information about components.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <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://jd.adventure.kyori.net/text-serializer-gson/4.11.0/net/kyori/adventure/text/serializer/gson/GsonComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.gson"class="external-link">GsonComponentSerializer</a></code></div>
<divclass="block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">use <ahref="https://jd.adventure.kyori.net/text-serializer-gson/4.11.0/net/kyori/adventure/text/serializer/gson/GsonComponentSerializer.html#gson()"title="class or interface in net.kyori.adventure.text.serializer.gson"class="external-link"><code>GsonComponentSerializer.gson()</code></a></div>
</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <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://jd.adventure.kyori.net/text-serializer-legacy/4.11.0/net/kyori/adventure/text/serializer/legacy/LegacyComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.legacy"class="external-link">LegacyComponentSerializer</a></code></div>
<divclass="block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">use <ahref="https://jd.adventure.kyori.net/text-serializer-legacy/4.11.0/net/kyori/adventure/text/serializer/legacy/LegacyComponentSerializer.html#legacySection()"title="class or interface in net.kyori.adventure.text.serializer.legacy"class="external-link"><code>LegacyComponentSerializer.legacySection()</code></a></div>
</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <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://jd.adventure.kyori.net/text-serializer-plain/4.11.0/net/kyori/adventure/text/serializer/plain/PlainComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.plain"class="external-link">PlainComponentSerializer</a></code></div>
<divclass="block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">will be removed in adventure 5.0.0, use <ahref="https://jd.adventure.kyori.net/text-serializer-plain/4.11.0/net/kyori/adventure/text/serializer/plain/PlainTextComponentSerializer.html#plainText()"title="class or interface in net.kyori.adventure.text.serializer.plain"class="external-link"><code>PlainTextComponentSerializer.plainText()</code></a></div>
</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <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://jd.adventure.kyori.net/text-serializer-plain/4.11.0/net/kyori/adventure/text/serializer/plain/PlainTextComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.plain"class="external-link">PlainTextComponentSerializer</a></code></div>
<divclass="block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">use <ahref="https://jd.adventure.kyori.net/text-serializer-plain/4.11.0/net/kyori/adventure/text/serializer/plain/PlainTextComponentSerializer.html#plainText()"title="class or interface in net.kyori.adventure.text.serializer.plain"class="external-link"><code>PlainTextComponentSerializer.plainText()</code></a></div>
</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>
</section>
</li>
</ul>
</section>
<sectionclass="details">
<ulclass="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<sectionclass="method-details"id="method-detail">
<h2>Method Details</h2>
<ulclass="member-list">
<li>
<sectionclass="detail"id="flattener()">
<h3>flattener</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="modifiers">public static</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://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/flattener/ComponentFlattener.html"title="class or interface in net.kyori.adventure.text.flattener"class="external-link">ComponentFlattener</a></span> <spanclass="element-name">flattener</span>()</div>
<divclass="block">Return a component flattener that can use game data to resolve extra information about components.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>a component flattener</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="plainSerializer()">
<h3>plainSerializer</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://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html#forRemoval()"title="class or interface in java.lang"class="external-link">forRemoval</a>=true)
<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 static</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://jd.adventure.kyori.net/text-serializer-plain/4.11.0/net/kyori/adventure/text/serializer/plain/PlainComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.plain"class="external-link">PlainComponentSerializer</a></span> <spanclass="element-name">plainSerializer</span>()</div>
<divclass="deprecation-block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">will be removed in adventure 5.0.0, use <ahref="https://jd.adventure.kyori.net/text-serializer-plain/4.11.0/net/kyori/adventure/text/serializer/plain/PlainTextComponentSerializer.html#plainText()"title="class or interface in net.kyori.adventure.text.serializer.plain"class="external-link"><code>PlainTextComponentSerializer.plainText()</code></a></div>
</div>
<divclass="block">Get a serializer for <ahref="https://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link"><code>Component</code></a>s that will convert components to
a plain-text string.
<p>Implementations may provide a serializer capable of processing any
information that requires access to implementation details.</p></div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>a serializer to plain text</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="plainTextSerializer()">
<h3>plainTextSerializer</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://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html#forRemoval()"title="class or interface in java.lang"class="external-link">forRemoval</a>=true)
<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 static</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://jd.adventure.kyori.net/text-serializer-plain/4.11.0/net/kyori/adventure/text/serializer/plain/PlainTextComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.plain"class="external-link">PlainTextComponentSerializer</a></span> <spanclass="element-name">plainTextSerializer</span>()</div>
<divclass="deprecation-block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">use <ahref="https://jd.adventure.kyori.net/text-serializer-plain/4.11.0/net/kyori/adventure/text/serializer/plain/PlainTextComponentSerializer.html#plainText()"title="class or interface in net.kyori.adventure.text.serializer.plain"class="external-link"><code>PlainTextComponentSerializer.plainText()</code></a></div>
</div>
<divclass="block">Get a serializer for <ahref="https://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link"><code>Component</code></a>s that will convert components to
a plain-text string.
<p>Implementations may provide a serializer capable of processing any
information that requires access to implementation details.</p></div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>a serializer to plain text</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="gsonSerializer()">
<h3>gsonSerializer</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://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html#forRemoval()"title="class or interface in java.lang"class="external-link">forRemoval</a>=true)
<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 static</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://jd.adventure.kyori.net/text-serializer-gson/4.11.0/net/kyori/adventure/text/serializer/gson/GsonComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.gson"class="external-link">GsonComponentSerializer</a></span> <spanclass="element-name">gsonSerializer</span>()</div>
<divclass="deprecation-block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">use <ahref="https://jd.adventure.kyori.net/text-serializer-gson/4.11.0/net/kyori/adventure/text/serializer/gson/GsonComponentSerializer.html#gson()"title="class or interface in net.kyori.adventure.text.serializer.gson"class="external-link"><code>GsonComponentSerializer.gson()</code></a></div>
</div>
<divclass="block">Get a serializer for <ahref="https://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link"><code>Component</code></a>s that will convert to and from the
standard JSON serialization format using Gson.
<p>Implementations may provide a serializer capable of processing any
information that requires implementation details, such as legacy
<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://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html#forRemoval()"title="class or interface in java.lang"class="external-link">forRemoval</a>=true)
<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 static</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://jd.adventure.kyori.net/text-serializer-gson/4.11.0/net/kyori/adventure/text/serializer/gson/GsonComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.gson"class="external-link">GsonComponentSerializer</a></span> <spanclass="element-name">colorDownsamplingGsonSerializer</span>()</div>
<divclass="deprecation-block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">use <ahref="https://jd.adventure.kyori.net/text-serializer-gson/4.11.0/net/kyori/adventure/text/serializer/gson/GsonComponentSerializer.html#colorDownsamplingGson()"title="class or interface in net.kyori.adventure.text.serializer.gson"class="external-link"><code>GsonComponentSerializer.colorDownsamplingGson()</code></a></div>
</div>
<divclass="block">Get a serializer for <ahref="https://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link"><code>Component</code></a>s that will convert to and from the
standard JSON serialization format using Gson, downsampling any RGB colors
to their nearest <ahref="https://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/format/NamedTextColor.html"title="class or interface in net.kyori.adventure.text.format"class="external-link"><code>NamedTextColor</code></a> counterpart.
<p>Implementations may provide a serializer capable of processing any
information that requires implementation details, such as legacy
<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://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html#forRemoval()"title="class or interface in java.lang"class="external-link">forRemoval</a>=true)
<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 static</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://jd.adventure.kyori.net/text-serializer-legacy/4.11.0/net/kyori/adventure/text/serializer/legacy/LegacyComponentSerializer.html"title="class or interface in net.kyori.adventure.text.serializer.legacy"class="external-link">LegacyComponentSerializer</a></span> <spanclass="element-name">legacySectionSerializer</span>()</div>
<divclass="deprecation-block"><spanclass="deprecated-label">Deprecated, for removal: This API element is subject to removal in a future version.</span>
<divclass="deprecation-comment">use <ahref="https://jd.adventure.kyori.net/text-serializer-legacy/4.11.0/net/kyori/adventure/text/serializer/legacy/LegacyComponentSerializer.html#legacySection()"title="class or interface in net.kyori.adventure.text.serializer.legacy"class="external-link"><code>LegacyComponentSerializer.legacySection()</code></a></div>
</div>
<divclass="block">Get a serializer for <ahref="https://jd.adventure.kyori.net/api/4.11.0/net/kyori/adventure/text/Component.html"title="class or interface in net.kyori.adventure.text"class="external-link"><code>Component</code></a>s that will convert to and from the
legacy component format used by Bukkit. This serializer uses the
<ahref="https://jd.adventure.kyori.net/text-serializer-legacy/4.11.0/net/kyori/adventure/text/serializer/legacy/LegacyComponentSerializer.Builder.html#useUnusualXRepeatedCharacterHexFormat()"title="class or interface in net.kyori.adventure.text.serializer.legacy"class="external-link"><code>LegacyComponentSerializer.Builder.useUnusualXRepeatedCharacterHexFormat()</code></a>
option to match upstream behavior.
<p>This legacy serializer uses the standard section symbol to mark
formatting characters.</p>
<p>Implementations may provide a serializer capable of processing any
information that requires access to implementation details.</p></div>