Always use a profile file.

This commit is contained in:
Alexander Andreev 2024-12-17 19:30:06 +04:00
parent e23db23eae
commit 8662153706
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34
2 changed files with 16 additions and 25 deletions

View File

@ -36,7 +36,6 @@ func (rc *RunCommand) Run() error {
return err
}
if rc.UseProfile {
if util.IsFileExist(path.Join(rc.GameDir, mcclprofile.ProfileFileName)) {
p, err := mcclprofile.Load(rc.GameDir)
if err != nil {
@ -54,7 +53,6 @@ func (rc *RunCommand) Run() error {
return err
}
}
}
return rc.run_client()
}

View File

@ -3,7 +3,6 @@ package main
import (
"fmt"
"mccl/cmd/mccl/commands"
mcclprofile "mccl/internal/mccl_profile"
"os"
)
@ -98,11 +97,7 @@ func usage() {
" -U,--uuid UUID\n"+
" player's account UUID (all zeroes by default)\n"+
" --java-Xmx memory\n"+
" java's -Xmx param, e.g. 4G\n"+
" --profile\n"+
" load/save username, UUID, and -Xmx from/to a file.\n"+
" Once saved, you can ommit -u,-U and --java-Xmx,\n"+
" since they will be stored in", mcclprofile.ProfileFileName)
" java's -Xmx param, e.g. 4G")
}
type arguments struct {
@ -203,8 +198,6 @@ func parseArguments(args []string) (parsed arguments, err error) {
}
parsed.JavaXmx = args[i+1]
i++
case "--profile":
parsed.UseProfile = true
default:
err = fmt.Errorf("an unknown option %s was provided", args[i])
return