• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

Need Help With BendingPlayer

Feff890

Verified Member
Ok so here is my code:
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);
        }
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?
 

jedk1

New Member
Ok so here is my code:
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);
        }
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?
Methods.getBendingPlayer(player); i think
 
Top