how to make arguments minecraft java

Solutions on MaxInterview for how to make arguments minecraft java by the best coders in the world

showing results for - "how to make arguments minecraft java"
Isabel
05 Feb 2020
1if (alias.equalsIgnoreCase("hello") {
2	if (args.length == 0) { //Sender only typed '/hello' and nothing else
3		sender.sendMessage("You only typed hello!");
4 
5	} else { //Sender typed more then 1 argument, so args[0] can't be null.
6		if (args[0].equalsIgnoreCase("sir") { //Sender typed '/hello sir'
7			sender.sendMessage("You typed hello sir!");
8		} else { //Sender had attest 1 argument, but didn't type sir as a second one!
9		//args[0] also returns string, so lets send the message right back to them!
10			sender.sendMessage("Your first argument was: " + args[0]);
11 
12	}
13}