diff --git a/Plan/common/src/main/java/com/djrapitops/plan/commands/use/ChatFormatter.java b/Plan/common/src/main/java/com/djrapitops/plan/commands/use/ChatFormatter.java index b8a799b4b..918f1bf34 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/commands/use/ChatFormatter.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/commands/use/ChatFormatter.java @@ -22,11 +22,11 @@ import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.List; -public abstract class ChatFormatter { +public interface ChatFormatter { - public abstract int getWidth(String part); + int getWidth(String part); - public String table(String message, String separator) { + default String table(String message, String separator) { String[] lines = StringUtils.split(message, '\n'); List rows = new ArrayList<>(); Maximum.ForInteger rowWidth = new Maximum.ForInteger(0); @@ -54,7 +54,7 @@ public abstract class ChatFormatter { return table.toString(); } - public List tableAsParts(String message, String separator) { + default List tableAsParts(String message, String separator) { String[] lines = StringUtils.split(message, '\n'); List rows = new ArrayList<>(); Maximum.ForInteger rowWidth = new Maximum.ForInteger(0); diff --git a/Plan/common/src/main/java/com/djrapitops/plan/commands/use/ConsoleChatFormatter.java b/Plan/common/src/main/java/com/djrapitops/plan/commands/use/ConsoleChatFormatter.java index 2acf5115c..2f5e1f13f 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/commands/use/ConsoleChatFormatter.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/commands/use/ConsoleChatFormatter.java @@ -18,7 +18,7 @@ package com.djrapitops.plan.commands.use; import org.apache.commons.lang3.StringUtils; -public class ConsoleChatFormatter extends ChatFormatter { +public class ConsoleChatFormatter implements ChatFormatter { @Override public int getWidth(String part) { diff --git a/Plan/common/src/main/java/com/djrapitops/plan/commands/use/PlayerChatFormatter.java b/Plan/common/src/main/java/com/djrapitops/plan/commands/use/PlayerChatFormatter.java index dc48e638b..f6d8820fd 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/commands/use/PlayerChatFormatter.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/commands/use/PlayerChatFormatter.java @@ -16,7 +16,7 @@ */ package com.djrapitops.plan.commands.use; -public class PlayerChatFormatter extends ChatFormatter { +public class PlayerChatFormatter implements ChatFormatter { @Override public int getWidth(String part) {