Here is a Simple command for people who are starting to Code.
Files edited: Client.java
Difficulty 0.5/10
Search for If(command.equals Then find the } then use this.
- Quote :
- if(command.equalsIgnoreCase("##") && playerRights >= 0) {
additem(995, 100000);
}
For ## you'd be adding the command name.
Where it says playerRights, if its 0 its for normal users, 1 for Moderators, 2 for admins, 3 for owners,
Additem is to add the item,(Item id, Item amount)
MAKE SURE YOU INCLUDE }
Other wise you'll get errors,
So if you wanted to add a Master command
you could do this.
- Quote :
- if(command.equalsIgnoreCase("master") && playerRights >= 1) {
addSkillXP(14000000, i);
}
And there you have it, A Simple Command Tutorial,
Hope this helped.
-Ella