use of net.minecraft.nbt.TagParser in project SpongeCommon by SpongePowered.
the class SpongeStringReader method parseNBTString.
@Override
public String parseNBTString() throws ArgumentParseException {
final int startCursor = this.getCursor();
try {
new TagParser(this).readStruct();
} catch (final CommandSyntaxException ex) {
this.setCursor(startCursor);
throw new ArgumentParseException(SpongeAdventure.asAdventure(ex.getRawMessage()), ex.getInput(), ex.getCursor());
}
// this will be just after a }
final int endCursor = this.getCursor();
return this.input().substring(startCursor, endCursor);
}
Aggregations