Skip to content

Commit

Permalink
Remove usages of var in DML
Browse files Browse the repository at this point in the history
  • Loading branch information
Draycia committed Sep 17, 2024
1 parent d387230 commit b66de27
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.HashMap;
import java.util.Map;
import net.draycia.carbon.api.CarbonChat;
import net.draycia.carbon.api.users.CarbonPlayer;
import net.essentialsx.api.v2.events.discord.DiscordMessageEvent;
import net.essentialsx.api.v2.events.discord.DiscordRelayEvent;
import net.essentialsx.api.v2.services.discord.DiscordService;
Expand Down Expand Up @@ -59,15 +60,15 @@ public void onDiscordMessage(final DiscordMessageEvent event) {
return;
}

final var result = this.carbonChat.userManager().user(event.getUUID()).join();
final CarbonPlayer result = this.carbonChat.userManager().user(event.getUUID()).join();

var channel = result.selectedChannel();

if (channel == null) {
return;
}

final var messageType = this.channelMessageTypes.get(channel.key());
final MessageType messageType = this.channelMessageTypes.get(channel.key());

event.setType(messageType);
}
Expand Down

0 comments on commit b66de27

Please sign in to comment.