We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f63939 + f98a776 commit 3ba6ab2Copy full SHA for 3ba6ab2
1 file changed
nbt/src/main/java/net/kyori/adventure/nbt/TagStringIO.java
@@ -101,6 +101,18 @@ public CompoundBinaryTag asCompound(final String input) throws IOException {
101
* @since 4.0.0
102
*/
103
public String asString(final CompoundBinaryTag input) throws IOException {
104
+ return this.asString((BinaryTag) input);
105
+ }
106
+
107
+ /**
108
+ * Get a string representation of the provided tag.
109
+ *
110
+ * @param input tag to serialize
111
+ * @return serialized form
112
+ * @throws IOException if any errors occur writing to string
113
+ * @since 4.20.0
114
+ */
115
+ public String asString(final BinaryTag input) throws IOException {
116
final StringBuilder sb = new StringBuilder();
117
try (final TagStringWriter emit = new TagStringWriter(sb, this.indent)) {
118
emit.legacy(this.emitLegacy);
0 commit comments