Ok so here is my code:
But when I try /Board in game it says: An internal error occurred while attempting to perform this command.
Then when I remove the bp.getAbilities().get(1) and replace it with a random string like "hi", it will work.
Any help?
Code:
else if(s.equalsIgnoreCase("board")){
Player dp = (Player) cs;
BendingPlayer bp = (BendingPlayer) dp;
SimpleScoreboard scoreboard = new SimpleScoreboard(ChatColor.DARK_RED+""+ChatColor.BOLD+"Bound Abilities:");
scoreboard.add(bp.getAbilities().get(1), 1);
scoreboard.add(bp.getAbilities().get(2), 2);
scoreboard.add(bp.getAbilities().get(3), 3);
scoreboard.add(bp.getAbilities().get(4), 4);
scoreboard.add(bp.getAbilities().get(5), 5);
scoreboard.add(bp.getAbilities().get(6), 6);
scoreboard.add(bp.getAbilities().get(7), 7);
scoreboard.add(bp.getAbilities().get(8), 8);
scoreboard.add(bp.getAbilities().get(9), 9);
scoreboard.build();
scoreboard.send(p);
}
Then when I remove the bp.getAbilities().get(1) and replace it with a random string like "hi", it will work.
Any help?