pub struct MCVMCore { /* private fields */ }
Expand description
Wrapper around all usage of mcvm_core
Implementations§
Source§impl MCVMCore
impl MCVMCore
Sourcepub fn with_config(config: Configuration) -> Result<Self>
pub fn with_config(config: Configuration) -> Result<Self>
Construct a new core with set configuration
Sourcepub fn with_config_and_paths(
config: Configuration,
paths: Paths,
) -> Result<Self>
pub fn with_config_and_paths( config: Configuration, paths: Paths, ) -> Result<Self>
Construct a new core with set configuration and paths
Sourcepub fn get_config(&self) -> &Configuration
pub fn get_config(&self) -> &Configuration
Get the configuration that the core uses
Sourcepub fn set_client(&mut self, req_client: Client)
pub fn set_client(&mut self, req_client: Client)
Set the reqwest client to be used if you already have one
Sourcepub fn get_client(&self) -> &Client
pub fn get_client(&self) -> &Client
Get the reqwest client that the core uses
Sourcepub fn get_users(&mut self) -> &mut UserManager
pub fn get_users(&mut self) -> &mut UserManager
Get the UserManager in order to add, remove, and auth users
Sourcepub fn get_update_manager(&self) -> &UpdateManager
pub fn get_update_manager(&self) -> &UpdateManager
Get the UpdateManager in order to help with custom installation routines
Sourcepub fn get_update_manager_mut(&mut self) -> &mut UpdateManager
pub fn get_update_manager_mut(&mut self) -> &mut UpdateManager
Get the UpdateManager mutably in order to help with custom installation routines. Don’t modify this unless you know what you are doing!
Sourcepub async fn get_version_manifest(
&mut self,
o: &mut impl MCVMOutput,
) -> Result<&VersionManifestAndList>
pub async fn get_version_manifest( &mut self, o: &mut impl MCVMOutput, ) -> Result<&VersionManifestAndList>
Get the version manifest
Sourcepub async fn get_version(
&mut self,
version: &MinecraftVersion,
o: &mut impl MCVMOutput,
) -> Result<InstalledVersion<'_, '_>>
pub async fn get_version( &mut self, version: &MinecraftVersion, o: &mut impl MCVMOutput, ) -> Result<InstalledVersion<'_, '_>>
Load or install a version of the game
Sourcepub async fn get_version_info(&mut self, version: String) -> Result<VersionInfo>
pub async fn get_version_info(&mut self, version: String) -> Result<VersionInfo>
Get just the VersionInfo for a version, without creating the version. This is useful for doing your own installation of things. This will download the version manifest if it is not downloaded already
Sourcepub async fn get_java_installation(
&mut self,
major_version: JavaMajorVersion,
kind: JavaInstallationKind,
o: &mut impl MCVMOutput,
) -> Result<JavaInstallation>
pub async fn get_java_installation( &mut self, major_version: JavaMajorVersion, kind: JavaInstallationKind, o: &mut impl MCVMOutput, ) -> Result<JavaInstallation>
Gets a raw Java installation for use with things like custom processes
Sourcepub fn add_additional_versions(&mut self, versions: Vec<VersionEntry>)
pub fn add_additional_versions(&mut self, versions: Vec<VersionEntry>)
Add additional versions to the version manifest. Must be called before the version manifest is obtained, including before creating any versions