Hi everyone.
This is my very first post, so try not to go crazy on me.
I recently got my hands on the Matrix 718 package and I want to start making something from it. I've been looking at a few posts on the very basics of starting a server and what not, and it all seems pretty simple. But i have a question that's been bugging me for the past couple of hours.
First, since Matrix is a spawn server, it has commands for setting levels, banking from anywhere, and of course, spawning items. There's plenty more commands, but I can't think of anymore from the top of my head.
Anyways, here's my question: How and where do I set rights for these commands? I've looked at a couple of posts about putting "if (player.getRights() >= 2)" right under the "if (cmd.length < 2) {" like this:
Code:
case "item":
if (cmd.length < 2) {
if (player.getRights() <= 2)
player.getPackets().sendGameMessage(
"Use: ::item id (optional:amount)");
return true;
}
Is that even the correct way to write the code? Is that the only place I need to put it? Does a regular player right have anything to do with it?
Also, I went to the "::admin" command from Commands.java and changed the usernames that were allowed to use it to mine. I did that instead of putting my name into the player.java because there were a bunch of posts saying that doing it in player.java never worked. Should I possibly change what right the "::admin" command gives?
But overall, it's been bugging me for the day now and I decided to make an account and ask all of you.
----------------------
Sorry for the really basic question. I'm fairly new to Java and development. Some guidance would really help.
----------------------
Thanks a lot