Hello guys,
i added the checkbank command onto my command.java file:
and i want it so that only staff can do ::checkbank because i tested on a normal player and normal players can also do it..
here is the command i added:
Code:
if (playerCommand.startsWith("checkbank")) {
try {
String[] args = playerCommand.split(" ", 2);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
Client o = (Client) Server.playerHandler.players[i];
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
c.getPA().otherBank(c, o);
break;
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
PLEASE HELP. Where do i add:
Code:
if(c.playerRights >= 1) {
thanks for reading: