diff --git a/pom.xml b/pom.xml
index c0873d6..c1b0016 100644
--- a/pom.xml
+++ b/pom.xml
@@ -112,12 +112,16 @@
+
+ projectlombok.org
+ http://projectlombok.org/mavenrepo
+
org.spigotmc
spigot-api
- 1.9.2-R0.1-SNAPSHOT
+ 1.12-R0.1-SNAPSHOT
com.github.TBMCPlugins.ButtonCore
@@ -159,6 +163,12 @@
1.6
provided
+
+ org.projectlombok
+ lombok
+ 1.16.16
+ provided
+
ButtonChat
diff --git a/src/main/java/buttondevteam/chat/formatting/ChatFormatterBuilder.java b/src/main/java/buttondevteam/chat/formatting/ChatFormatterBuilder.java
index 9177a31..1f2df12 100644
--- a/src/main/java/buttondevteam/chat/formatting/ChatFormatterBuilder.java
+++ b/src/main/java/buttondevteam/chat/formatting/ChatFormatterBuilder.java
@@ -1,12 +1,15 @@
package buttondevteam.chat.formatting;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.function.BiFunction;
import java.util.regex.Pattern;
-import org.apache.commons.lang.SerializationUtils;
-
import buttondevteam.lib.chat.*;
+import lombok.SneakyThrows;
public class ChatFormatterBuilder implements Serializable {
private static final long serialVersionUID = -6115913400749778686L;
@@ -23,8 +26,12 @@ public class ChatFormatterBuilder implements Serializable {
short removecharcount = 0;
boolean range = false;
+ @SneakyThrows
public ChatFormatter build() {
- return new ChatFormatter((ChatFormatterBuilder) SerializationUtils.clone(this));
+ final ByteArrayOutputStream str = new ByteArrayOutputStream();
+ new ObjectOutputStream(str).writeObject(this);
+ return new ChatFormatter(
+ (ChatFormatterBuilder) new ObjectInputStream(new ByteArrayInputStream(str.toByteArray())).readObject());
}
public Pattern getRegex() {