parent
127aeb53b2
commit
e5a6d7ecc6
|
@ -28,7 +28,6 @@ public class DiscordSRVListener {
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onDiscordMessage(DiscordGuildMessagePreProcessEvent event) {
|
public void onDiscordMessage(DiscordGuildMessagePreProcessEvent event) {
|
||||||
event.setCancelled(true);
|
|
||||||
if (DeluxeGroups.getDatabase().groupExists(event.getChannel().getName())) {
|
if (DeluxeGroups.getDatabase().groupExists(event.getChannel().getName())) {
|
||||||
DeluxeGroup group = DeluxeGroups.getDatabase().getGroup(event.getChannel().getName());
|
DeluxeGroup group = DeluxeGroups.getDatabase().getGroup(event.getChannel().getName());
|
||||||
String format = plugin.getConfig().getString("dtm", "[DISCORD | <group>] <player> > <message>");
|
String format = plugin.getConfig().getString("dtm", "[DISCORD | <group>] <player> > <message>");
|
||||||
|
@ -38,6 +37,7 @@ public class DiscordSRVListener {
|
||||||
replace("<author>", event.getAuthor().getName());
|
replace("<author>", event.getAuthor().getName());
|
||||||
chat = ChatColor.translateAlternateColorCodes('&', chat);
|
chat = ChatColor.translateAlternateColorCodes('&', chat);
|
||||||
group.sendMessage(chat);
|
group.sendMessage(chat);
|
||||||
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue