ok these two commands i found in my misc.java i tried adding to my commands.java but they aren't working sadly.
Code:
if (playerCommand.equals("kill")) {
try {
String playerToKill = playerCommand.substring(5);
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToKill)) {
c.sendMessage("You have killed the user: "+Server.playerHandler.players[i].playerName);
Client c2 = (Client)Server.playerHandler.players[i];
c2.isDead = true;
break;
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
if (playerCommand.equals("shop")) {
try {
String shopID = playerCommand.substring(5);
c.getShops().openShop(Integer.parseInt(shopID));
c.sendMessage("Viewing shop ["+shopID+"]");
} catch(Exception e) {
c.sendMessage("Invalid input data! try typing ::shop 1");
}
}
i changed the clanchat.substring to playerCommand.substring and the clanChat.startsWith to playerCommand.equals.