@Override
    public void style(final @NotNull String claimKey, final @NotNull Emitable styleClaim) {
      if (this.claimedStyleElements.add(requireNonNull(claimKey, "claimKey"))) {
        styleClaim.emit(this);
      }
    }
mark tag boundaries within the stack, without needing to mess with typing too much.
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageSerializer.java