minecraft java arguments code example
Example 1: How to make arguments minecraft java
if (alias.equalsIgnoreCase("hello") {
if (args.length == 0) { //Sender only typed '/hello' and nothing else
sender.sendMessage("You only typed hello!");
} else { //Sender typed more then 1 argument, so args[0] can't be null.
if (args[0].equalsIgnoreCase("sir") { //Sender typed '/hello sir'
sender.sendMessage("You typed hello sir!");
} else { //Sender had attest 1 argument, but didn't type sir as a second one!
//args[0] also returns string, so lets send the message right back to them!
sender.sendMessage("Your first argument was: " + args[0]);
}
}
Example 2: minecraft java arguments
-XX:+UseG1GC -Xmx4G -Xms4G -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M