The multiple commands works thank to great helpers off this forum ,but there is a problem..
If i write /ungold and if i would have have gold and iron it would replace both of them but it should replace only gold. The problem exists in every command what did i did wrong?

And whats the diference from:
" if(cmd.getName().equalsIgnoreCase("MYCOMMAND")); "
and this ?
" if (commandLabel.equalsIgnoreCase("MYCOMMAND")) { "

Okay now i can add multiple commands (only sendmessage commands) .something is not working i want 2 commands do almoust exactly what it does I want another command "test2 " do almoust exactly what "test" does
How can i add this command can anyone give me the full code?

That doesn't work. Maybe you should learn a bit more about Java and then try do develop Bukkit plugins.
I can garantuee, it helps. Just search on YouTube or Google "basic java tutorial" and you should be fine.

I know everyone told me i need to start learning Java first i will do that but atleast i want to know how to do multiple commands ..Th3Br1x Can you please say me why it will not work and what shall i place?

The multiple commands works thank to great helpers off this forum ,but there is a problem..
If i write /ungold and if i would have have gold and iron it would replace both of them but it should replace only gold. The problem exists in every command what did i did wrong?

If you have a command "hello" and you want it such that if a player types the command "good day" to have the exact same behavior as "hello" you should declare "goodday" as an alias of "hello" in your plugin.yml. Bukkit will handle the rest for you, and all you have to do is check if the command name is "hello"

As to the current problem you are having, it probably has something to do with the way if and else statements are nested. In fact, right now you check if it is ungold. Inside ungold you check if it is unemerald , which can never happen.

If you have a command "hello" and you want it such that if a player types the command "good day" to have the exact same behavior as "hello" you should declare "goodday" as an alias of "hello" in your plugin.yml. Bukkit will handle the rest for you, and all you have to do is check if the command name is "hello"

As to the current problem you are having, it probably has something to do with the way if and else statements are nested. In fact, right now you check if it is ungold. Inside ungold you check if it is unemerald , which can never happen.

Click to expand...

Sagacious_Zed My biggest mistake is was learning Bukkit programing first than Java im a noob now after this il start Java but can you tell me where is my mistake because i don't see any..

That's basically how you're supposed to do it. In Java, when you put an opening bracket "{" you will always need a closing bracket "}"FightManiac

EDIT: One more thing, don't ask for direct code that'll fix your plugin. We don't do that around here. Try to read our help messages and figure out how to fix your plugin. Now go learn some Java, trust me, it'll really help you, and please do it before you finish this plugin. Thank you!

Sorry i watched on my code i had brackets there but it still not working how it should be if i write /ungold or /uniron and i will not have gold or iron i will get the message "f" and if i have both iron and gold it will replace with any command i type..
Here is the code: