void (@NotNull String text, @NotNull Key outputType) { if (text.charAt(text.length() - 1) == '\n') { String textToSend = myBuffer.length() == 0 ? text : myBuffer + text; myConsumer.accept(textToSend, outputType); myBuffer.setLength(0); } else { myBuffer.append(text); } }