Skip to content

Commit b7bf914

Browse files
committed
Added filters.
1 parent b0793dd commit b7bf914

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id 'com.github.johnrengelman.shadow' version '4.0.4'
55
}
66
group 'io.github.thedoctorone.MinecraftConnectsDiscord'
7-
version '0.5'
7+
version '0.5.1'
88

99
sourceCompatibility = 1.8
1010

src/main/java/io/github/thedoctorone/DiscordCommunication.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,15 @@ public void onReady(ReadyEvent event) { //First Connection
103103
}
104104

105105
public void sendMessageToDiscord(String message) {
106+
String[] MineCraftLanguageFilter = {"§a","§b","§c","§d","§e", "§f", "§k","§l", "§m","§n", "§o","§r", "§0","§1", "§2", "§3", "§4", "§5", "§6", "§7", "§8", "§9"}; //Weird color thingies & next-back selections
107+
for(String f : MineCraftLanguageFilter)
108+
message = message.replaceAll(f, "");
106109
if(!message.isEmpty())
107110
MCD.getTextChannelById(channelId).sendMessage(message).queue();
108111
}
109112

110113
public void returnLogFromConsole(String message) {
111-
String[] MineCraftLanguageFilter = {"§e", "§f", 7", 6"}; //Weird color thingies & next-back selections
114+
String[] MineCraftLanguageFilter = {a","§b","§c","§d",e", "§f", k","§l", m","§n", "§o","§r", "§0","§1", "§2", "§3", "§4", "§5", "§6", "§7", "§8", "§9"}; //Weird color thingies & next-back selections
112115
for(String f : MineCraftLanguageFilter)
113116
message = message.replaceAll(f, "");
114117
if(!message.isEmpty())

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
main: io.github.thedoctorone.Main
22
name: DiscordConnectsMinecraft
3-
version: 0.5
3+
version: 0.5.1
44
commands:
55
discord:
66
description: Commands of Minecraft Connects Discord

0 commit comments

Comments
 (0)