Code:
if (playerCommand.equals("skill")) {
try {
String[] args = playerCommand.split(" ");
int lvl = Integer.parseInt(args[2]);
if (args[1].equals("hp")) {
c.playerLevel[3] = lvl;
c.playerXP[3] = c.getPA().getXPForLevel(lvl);
c.getPA().refreshSkill(3);
c.getPA().requestUpdates();
} else {
c.sendMessage(args[1]+ " is not a skill!");
}
} catch(Exception e) {
c.sendMessage("Wrong syntax! Use as ::skill SKILLNAME LVL");
}
}
Can someone point me in the right direction for getting this to work?
Compiles fine but does nothing.