The information is saved if I add listeners in AttachCapabilitiesEvent: event.addCapability(key, provider); event.addListener(provider.capOptional::invalidate); However, I get NullPointerException when going from dimension to dimension at this line in EntityJoinWorldEvent. player.getCapability(MistCaps.CAPABILITY_MIST).orElseThrow(() -> new NullPointerException("Player has no mist capability")); If I do not add listeners, then everything works fine when changing the dimension, but