discordsettings fallback username

This commit is contained in:
Bella 2020-03-13 18:02:40 -04:00
parent c19a43c50e
commit e378eba98c
No known key found for this signature in database
GPG Key ID: 03B01AC937D1C89C
1 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,8 @@ public class DiscordSettings extends Module {
else if (mc.getCurrentServerData() != null) return "Multiplayer";
else return "Main Menu";
case USERNAME:
if (mc.player != null) return mc.getSession().getUsername();
else return "(Not logged in)";
if (mc.player != null) return mc.player.getName();
else return mc.getSession().getUsername();
case HEALTH:
if (mc.player != null) return "(" + ((int) mc.player.getHealth()) + " hp)";
else return "(No hp)";