Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
fix console characters
Browse files Browse the repository at this point in the history
added blocked characters to console
  • Loading branch information
Norbit4 committed Aug 18, 2022
1 parent 365ecf9 commit 9fb23dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/pl/norbit/discordmc/LogAppender.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
public class LogAppender extends AbstractAppender{
private final JDA jda;
private final Queue<String> messagesQueue;
private final JavaPlugin javaPlugin;

private static class QueueEmbed{
private String text;
Expand Down Expand Up @@ -43,6 +44,8 @@ public MessageEmbed getEmbed(){
public LogAppender(JDA jda, JavaPlugin javaPlugin){
super("LogAppender", null, null);
this.jda = jda;
this.javaPlugin = javaPlugin;

messagesQueue = new LinkedList<>();
messageTask(javaPlugin);

Expand All @@ -60,7 +63,6 @@ public LogAppender(JDA jda, JavaPlugin javaPlugin){

@Override
public void append(LogEvent event) {
Color color;

boolean sendMessage = true;

Expand All @@ -84,7 +86,7 @@ public void append(LogEvent event) {
if(sendMessage) {
String[] colorCodes = {"\\u00A70", "\\u00A71", "\\u00A72", "\\u00A73", "\\u00A74", "\\u00A75", "\\u00A76",
"\\u00A77", "\\u00A78", "\\u00A79", "\\u00A7a", "\\u00A7b", "\\u00A7c", "\\u00A7d", "\\u00A7e",
"\\u00A7f", "\\u00A7k", "\\u00A7l", "\\u00A7m", "\\u00A7n", "\\u00A7o", "\\u00A7r"};
"\\u00A7f", "\\u00A7k", "\\u00A7l", "\\u00A7m", "\\u00A7n", "\\u00A7o", "\\u00A7r","\u001B","\\[m"};

String message = event.getMessage().getFormattedMessage();

Expand Down

0 comments on commit 9fb23dd

Please sign in to comment.