Fix IngameChatListener
Dieser Commit ist enthalten in:
Ursprung
d666689465
Commit
46d22b66aa
@ -23,6 +23,7 @@ import de.steamwar.bungeecore.bot.SteamwarDiscordBot;
|
|||||||
import de.steamwar.bungeecore.bot.config.SteamwarDiscordBotConfig;
|
import de.steamwar.bungeecore.bot.config.SteamwarDiscordBotConfig;
|
||||||
import de.steamwar.bungeecore.listeners.ChatListener;
|
import de.steamwar.bungeecore.listeners.ChatListener;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
|
import de.steamwar.bungeecore.sql.UserGroup;
|
||||||
import net.dv8tion.jda.api.MessageBuilder;
|
import net.dv8tion.jda.api.MessageBuilder;
|
||||||
import net.dv8tion.jda.api.entities.Member;
|
import net.dv8tion.jda.api.entities.Member;
|
||||||
import net.dv8tion.jda.api.entities.TextChannel;
|
import net.dv8tion.jda.api.entities.TextChannel;
|
||||||
@ -45,7 +46,7 @@ public class IngameChatListener extends BasicDiscordListener {
|
|||||||
event.getMessage().delete().complete();
|
event.getMessage().delete().complete();
|
||||||
} else {
|
} else {
|
||||||
String s = event.getMessage().getContentDisplay();
|
String s = event.getMessage().getContentDisplay();
|
||||||
if (!steamwarUser.getUserGroup().isTeamGroup() && (s.contains("http") || s.contains("www"))) {
|
if (steamwarUser.getUserGroup() == UserGroup.Member && (s.contains("http") || s.contains("www"))) {
|
||||||
event.getMessage().delete().complete();
|
event.getMessage().delete().complete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren