Skip to content

Commit

Permalink
fix(discordsrv): do not process msgs if discordSRVListener is null
Browse files Browse the repository at this point in the history
  • Loading branch information
BrycensRanch committed Mar 10, 2023
1 parent f42d14a commit a6f1285
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/me/romvnly/TownyPlus/TownyPlusMain.java
Expand Up @@ -420,6 +420,9 @@ else if (getDescription().getVersion().contains("rc"))
}
}
public void processChatMessage(Player player, String providedMessage, String channel, ChatHook hook) {
// Don't process messages if DiscordSRV isn't ready or in the classpath.
if (this.discordSRVListener == null) return;

String message = providedMessage.trim();
String channelName = channel.toLowerCase().trim();
if (player == null) return;
Expand Down

0 comments on commit a6f1285

Please sign in to comment.