You've been here for over a year, and you can't add a fucking command? Are you serious? Here's some basic code. Hopefully you know how to convert it.
Code:
else if (cmd[0].equals("ban"))
{
Player player2 = World.getInstance().getPlayerForUsername(cmd[1]);
if (player2.isBanned())
{
player.sm("This player [username=" + cmd[1] + "] is already banned!");
return;
}
player.setBanned(true);
player.kick();
}
No clue how to make IP banning in Revengescape 613 work, don't have it with me atm, figure it out your damn self.
EDIT:
Don't even think about replying asking me:
- I don't have setBanned(), how to add?
- I don't have isBanned(), how to add?
- I don't have kick(), how to add?
God I feel generous.
Player.jarba
Code:
private boolean banned;
// add this to your Player constructor:
this.setBanned(false);
public void setBanned(boolean banned)
{
this.banned = banned;
}
public boolean isBanned()
{
return banned;
}