PlanetTeamSpeakk / MoreCommands

The source code of my mod, MoreCommands
https://www.curseforge.com/minecraft/mc-mods/morecommands
Creative Commons Zero v1.0 Universal
14 stars 5 forks source link

Crash when opening replay with ReplayMod #25

Closed Johni0702 closed 3 years ago

Johni0702 commented 3 years ago

Forwarding https://github.com/ReplayMod/ReplayMod/issues/514 which in turn was forwarded from Discord.

This presumably happens when viewing a replay while MoreCommands is installed.

java.lang.NullPointerException: null
    at java.util.Objects.requireNonNull(Objects.java:203) ~[?:1.8.0_51]
    at com.ptsmods.morecommands.MoreCommandsClient.getWorldName(MoreCommandsClient.java:191) ~[MoreCommands-3.4.2_1.16.5.jar:?]
    at com.ptsmods.morecommands.MoreCommandsClient.updatePresence(MoreCommandsClient.java:201) ~[MoreCommands-3.4.2_1.16.5.jar:?]

latest (1).log

See https://github.com/ReplayMod/ReplayMod/issues/514#issuecomment-830440758 for a lengthy explanation of what is going on and why I think this should be fixed here rather than over there. TLDR: do not assume that singleplayer and multiplayer are the only options

PlanetTeamSpeakk commented 3 years ago

Should be fixed in the latest version, I have added a null-check.