Alright then

This commit is contained in:
Norbi Peti 2017-07-19 22:56:35 +02:00
parent bae49352ef
commit 5e7da1e89a

View file

@ -26,12 +26,12 @@ public class ChatFormatterBuilder implements Serializable {
short removecharcount = 0;
boolean range = false;
/**
* The returned object is backed by this builder. All changes made to this object affets the returned one.
*/
@SneakyThrows
public ChatFormatter build() {
final ByteArrayOutputStream str = new ByteArrayOutputStream();
new ObjectOutputStream(str).writeObject(this);
return new ChatFormatter(
(ChatFormatterBuilder) new ObjectInputStream(new ByteArrayInputStream(str.toByteArray())).readObject());
return new ChatFormatter(this);
}
public Pattern getRegex() {