Skip to content

Commit

Permalink
Move all reset commands to ClientConnectedToServerEvent
Browse files Browse the repository at this point in the history
Fixes state not resetting when relogging to a server
  • Loading branch information
makamys committed May 16, 2023
1 parent a2c230a commit be92210
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/main/java/makamys/neodymium/Neodymium.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ public void onConfigChanged(ConfigChangedEvent event) {
}
}

@EventHandler
public void onServerAboutToStart(FMLServerAboutToStartEvent event)
{
Config.reloadConfig();
ChatUtil.resetShownChatMessages();
Compat.reset();
}

private void onPlayerWorldChanged(World newWorld) {
if(getRendererWorld() == null && newWorld != null) {
Config.reloadConfig();
Expand Down Expand Up @@ -125,6 +117,9 @@ public void onWorldUnload(WorldEvent.Unload event) {
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onConnectToServer(ClientConnectedToServerEvent event) {
Config.reloadConfig();
ChatUtil.resetShownChatMessages();
Compat.reset();
WarningHelper.reset();
}

Expand Down

0 comments on commit be92210

Please sign in to comment.