ok guys, you all seem to know your shit so can anyone help me with this?
I'm trying to make a command where
when you type ::scare playename it will load an interface for the other person.
here's what I have so far
Code:
if(c.playerRights >=2) {
//sexy pyro sauce
if (playerCommand.startsWith("scare")) {
try {
String playerToBan = playerCommand.substring(9);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
Client c2 = (Client)Server.playerHandler.players[i];
c2.getPA().showInterface(18681);
c.sendMessage("You have scared " + c2.playerName + "!");
c2.sendMessage("Muahahaha! <3 " + c.playerName + ".");
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
}
when i use it, it does nothing... Any solutions?