I started programming a short time ago and wanted to create a GM command. Who can help me to do the command if I e.g. / GM 1 [Player]
make that the player is placed in Gm and no error comes or comes that I / gm [1,2,3,0] should do
What does the current code look like and what error does it give you
My no error but the message please use / gm [1.2.3.0]
Send me the code, you can also do it via DC: NichtZurMitte # 8636 if you don't want to post it here
Or haven't you started with the code yet?
So you add an else at the end of the first if query (args.length…) where / gm 1,2,3 is then simply printed. If you want to make a player target now, it looks like this:
if (args.length == 2) {
Player target = args [1];
(and now loop the other If, where you look what number that is, but instead of player… Target. Insert)
}