public static @NotNull State byTriState(final @NotNull TriState flag) {
      requireNonNull(flag);
      switch (flag) {
        case TRUE: return TRUE;
        case FALSE: return FALSE;
        case NOT_SET: return NOT_SET;
      }
      throw new IllegalArgumentException("Unable to turn TriState: " + flag + " into a TextDecoration.State");
    }
Gets a state from a {@link net.kyori.adventure.util.TriState}.

@param flag the tristate
@return the state
@since 4.10.0
api/src/main/java/net/kyori/adventure/text/format/TextDecoration.java