discord: Merge nested if statements

This commit is contained in:
sdburns1998
2019-07-07 04:01:11 +02:00
parent d4066523c1
commit 591a849f73
2 changed files with 7 additions and 10 deletions

View File

@@ -342,9 +342,7 @@ public class DiscordPlugin extends Plugin
{
final PartyMember localMember = partyService.getLocalMember();
if (localMember != null)
{
if (discordService.getCurrentUser() != null)
if (localMember != null && discordService.getCurrentUser() != null)
{
final DiscordUserInfo userInfo = new DiscordUserInfo(
discordService.getCurrentUser().userId,
@@ -354,7 +352,6 @@ public class DiscordPlugin extends Plugin
wsClient.send(userInfo);
}
}
}
@Subscribe
public void onUserPart(final UserPart event)

View File

@@ -46,7 +46,7 @@ import static net.runelite.client.ws.PartyService.PARTY_MAX;
class DiscordState
{
@Data
private class EventWithTime
private static class EventWithTime
{
private final DiscordGameEventType type;
private final Instant start;