Store your Minecraft configs with your other dotfiles, and load it automatically.
at main 340 B view raw
1package core 2 3import ( 4 "os" 5 "path/filepath" 6 7 "potassium.sh/dot-mining/config" 8) 9 10var ( 11 Config config.Config 12) 13 14func InitConfig() { 15 Config = config.LoadConfig() 16} 17 18func MinecraftFile(path ...string) string { 19 cwd, _ := os.Getwd() 20 args := []string{cwd, Config.Directory} 21 args = append(args, path...) 22 23 return filepath.Join(args...) 24}