ScoreBoard Team kills/death

Discussion in 'Plugin Development' started by Extremelyd1, Jun 23, 2013.

Thread Status:
Not open for further replies.
  1. I have some trouble on detecting a players death and adding 1 to the scoreboard
    This is detecting death:
    public void onKill(PlayerDeathEvent e) {
    String JoinedB = "Joined Blue";
    String JoinedR = "Joined Red";
    String Status = plugin.getConfig().getString(
    "Status." + e.getEntity().getName());
    if (Status.equals(JoinedB)) {
    ScoreBoard.addPointB();
    } else if (Status.equals(JoinedR)) {
    ScoreBoard.addPointR();
    }
    }

    Here is the ScoreBoard.addPoint:
    public static void addPointR() {
    int RcurrentScore = Rscore.getScore();
    Rscore.setScore(RcurrentScore + 1);
    updateboard();
    }

    public static void addPointB() {
    int BcurrentScore = Bscore.getScore();
    Bscore.setScore(BcurrentScore + 1);
    updateboard();
    }
     
  2. Offline

    chasechocolate

    Did you register your events and add @EventHandler annotations?
     
  3. Yes I did, all my other events do work, like join and leave events
     
Thread Status:
Not open for further replies.

Share This Page