From ecdacee67ceda0af3e89a9dd462c89ae62aa8548 Mon Sep 17 00:00:00 2001 From: Jonas_Jones <91549607+J-onasJones@users.noreply.github.com> Date: Tue, 18 Oct 2022 00:28:17 +0200 Subject: [PATCH] added cli arguments and planned plugin loader support --- src/cliargs/mod.rs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/cliargs/mod.rs b/src/cliargs/mod.rs index 0e40f69..9ad4677 100644 --- a/src/cliargs/mod.rs +++ b/src/cliargs/mod.rs @@ -1,7 +1,9 @@ +use std::env; + pub(crate) fn help() { - println!("Moddah is a managing tool for Minecraft modded clients and servers. -The supported toolchains are FabricMC, ForgeModLoader, QuiltMC. + println!("Moddah is a managing tool for Minecraft modded and plugin servers. +The supported toolchains are FabricMC, ForgeModLoader, QuiltMC, SpigotMC. Usage: moddah @@ -40,4 +42,22 @@ Options: - [leave blank for current directory] - [directory of choice] ") +} + +pub(crate) fn version() +{ + println!("Moddah version {}-{}({})", env!("CARGO_PKG_VERSION"), env::consts::OS, env::consts::ARCH); + std::process::exit(0); +} + +pub(crate) fn install() +{ + println!("install"); +} + +pub(crate) fn uninstall() +{ + println!("To uninstall a modloader instance, simply delete the directory of the instance. +As of right now there is no way to uninstall an instance with the moddah CLI. + "); } \ No newline at end of file