-
Notifications
You must be signed in to change notification settings - Fork 4
How to use startup parameter
Manually having to enter a server ip and user name every time you want to connect to a server is rather annoying, so Angelia-cmd allows you to provide this data as startup parameter. The syntax for doing so looks like this:
Instead of just doing java -jar Angelia-cmd.jar
, you would do: java -jar Angelia-cmd.jar -parameterName1 parameterValue1 -parameterName2 parameterValue2
. The order of parameter does not matter
-
saveFile
: Minecraft uses authentication tokens to save/refresh sessions over longer periods of time. Just like the vanilla client, Angelia will save those tokens to a save file. This option lets you determine where this save file should be. If you provide the path to the token file of your vanilla minecraft launcher here, the tokens provided in that one will be automatically used and updated. This is highly recommended as it avoids invalidating tokens in your normal client and possibly rate limiting yourself. The tokens of your vanilla client will be contained in a file calledlauncher_profiles.json
in your .minecraft folder. An example path to one of those files on Windows could look like this:C:/Users/Max/AppData/Roaming/.minecraft/launcher_profiles.json
. Make sure to use forward slashes/
and not backwards slashes\
. If no save file path is provided, it will default toangeliaData/tokens.json
. -
user
: The user name of the account to use. This is not the name of your minecraft account (except if your account is unmigrated), but usually the email you use to login. If not provided, this parameter will be asked for from the command line -
password
: The password of the account to use. If a token file with a valid token is provided, the option is not needed and will be ignored if it exists. If no valid token is provided and this option is not used, the password will be asked for from the command line through a password prompt. -
ip
: The IP/Domain of the server to connect to. If not provided, this parameter will be asked for from the command line -
port
: Optionally you can specify the port of the server to connect to. If this parameter is not given, it will default to 25565, the standard minecraft port. -
cmd
: Optionally you can specify a command which will be run once a connection has been fully established. This can be useful to automatically start bots on launch
Use the vanilla token file to connect to a server:
java -jar Angelia-cmd.jar -user [email protected] -ip mc.civcraft.co -saveFile C:/Users/Max/AppData/Roaming/.minecraft/launcher_profiles.json
Provide username and password to add an account to the token file, using the default one:
java -jar Angelia-cmd.jar -user [email protected] -password squidLover69 -ip mc.civcraft.co
Connect using the default auth token path and start a plugin
java -jar Angelia-cmd.jar -user [email protected] -ip mc.civcraft.co -cmd "runplugin examplebot -option1 value1"
It is highly recommended to use short script files for providing startup parameter. Simply save your startup command as a text file with an ending of .bat
on windows or .sh
on MacOS/Linux. If you use multiple accounts, consider making a startup script for each of your accounts to easily access each. On Unix systems you can also use shell aliases for the same purpose.