mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 03:14:56 +00:00
Sanitize all messages being sent to the Discord user to remove colour codes, and add new lines
This commit is contained in:
parent
4bc164c09a
commit
37caf04c1d
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
package me.StevenLawson.TotalFreedomMod.discord.sender;
|
||||
|
||||
import me.StevenLawson.TotalFreedomMod.discord.bridge.DiscordBridge;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
@ -23,12 +24,12 @@ public class DiscordCommandSender implements CommandSender {
|
|||
|
||||
@Override
|
||||
public void sendMessage(String s) {
|
||||
user.sendMessage(s);
|
||||
user.sendMessage(DiscordBridge.sanitizeMessage(s));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(String[] strings) {
|
||||
user.sendMessage(String.join("", strings));
|
||||
user.sendMessage(DiscordBridge.sanitizeMessage(String.join("\n", strings)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue