This snippet will show you all how to categorise your commands via the player right integer, sort of like a labelled filling cabinet.
1) Open your commands class Server>src>server>model>players>packets>commands.java and open
2) Find public void processPacket(Client c, int packetType, int packetSize) { and under the last bracket } press enter a few times
3) Copy this onto the line shown above (right were you ended the enters)
*Replace #### with you player rightCode:Only the registered members can see the link. Register here
4) Under that statement you need to add the command corresponding to that right you added above
(When you put your command under: if(c.playerRights >= ####) { //Player Right : Make sure your command doesn't have a player right already in it, if it does delete the line)
5) When you have added the commands for that specific player right you can re-do it with another right by repeating all the steps above
This is the finished product:
Sorry if it hard to follow, I couldn't really explain it into depth as easily as I would had done in other tut's :\
If it helped just thank the thread, that way it shows that this thread is helpful and saves you having to rep :P





Reply With Quote
