Java 类net.minecraft.server.ScoreboardScore 实例源码

项目:CraftBukkit    文件:CraftScore.java   
public int getScore() throws IllegalStateException {
    Scoreboard board = objective.checkState().board;

    if (board.getPlayers().contains(entry)) { // Lazy
        Map<String, ScoreboardScore> scores = board.getPlayerObjectives(entry);
        ScoreboardScore score = scores.get(objective.getHandle());
        if (score != null) { // Lazy
            return score.getScore();
        }
    }

    return 0; // Lazy
}
项目:CraftBukkit    文件:CraftScoreboardManager.java   
public Collection<ScoreboardScore> getScoreboardScores(IScoreboardCriteria criteria, String name, Collection<ScoreboardScore> collection) {
    for (CraftScoreboard scoreboard : scoreboards) {
        Scoreboard board = scoreboard.board;
        for (ScoreboardObjective objective : (Iterable<ScoreboardObjective>) board.getObjectivesForCriteria(criteria)) {
            collection.add(board.getPlayerScoreForObjective(name, objective));
        }
    }
    return collection;
}
项目:Craftbukkit    文件:CraftScore.java   
public int getScore() throws IllegalStateException {
    Scoreboard board = objective.checkState().board;

    if (board.getPlayers().contains(entry)) { // Lazy
        Map<ScoreboardObjective, ScoreboardScore> scores = board.getPlayerObjectives(entry);
        ScoreboardScore score = scores.get(objective.getHandle());
        if (score != null) { // Lazy
            return score.getScore();
        }
    }

    return 0; // Lazy
}
项目:Craftbukkit    文件:CraftScoreboardManager.java   
public Collection<ScoreboardScore> getScoreboardScores(IScoreboardCriteria criteria, String name, Collection<ScoreboardScore> collection) {
    for (CraftScoreboard scoreboard : scoreboards) {
        Scoreboard board = scoreboard.board;
        for (ScoreboardObjective objective : (Iterable<ScoreboardObjective>) board.getObjectivesForCriteria(criteria)) {
            collection.add(board.getPlayerScoreForObjective(name, objective));
        }
    }
    return collection;
}
项目:Almura-Server    文件:CraftScore.java   
public int getScore() throws IllegalStateException {
    Scoreboard board = objective.checkState().board;

    if (board.getPlayers().contains(playerName)) { // Lazy
        Map<String, ScoreboardScore> scores = board.getPlayerObjectives(playerName);
        ScoreboardScore score = scores.get(objective.getHandle());
        if (score != null) { // Lazy
            return score.getScore();
        }
    }
    return 0; // Lazy
}
项目:Almura-Server    文件:CraftScore.java   
public void reset() throws IllegalStateException {
    CraftScoreboard myBoard = objective.checkState();
    Map<ScoreboardObjective, ScoreboardScore> savedScores = myBoard.board.getPlayerObjectives(playerName);
    if (savedScores.remove(objective.getHandle()) == null) {
        // If they don't have a score to delete, don't delete it.
        return;
    }
    myBoard.board.resetPlayerScores(playerName);
    for (Map.Entry<ScoreboardObjective, ScoreboardScore> e : savedScores.entrySet()) {
        myBoard.board.getPlayerScoreForObjective(playerName, e.getKey()).setScore(e.getValue().getScore());
    }
}
项目:Almura-Server    文件:CraftScoreboardManager.java   
public Collection<ScoreboardScore> getScoreboardScores(IScoreboardCriteria criteria, String name, Collection<ScoreboardScore> collection) {
    for (CraftScoreboard scoreboard : scoreboards) {
        Scoreboard board = scoreboard.board;
        for (ScoreboardObjective objective : (Iterable<ScoreboardObjective>) board.getObjectivesForCriteria(criteria)) {
            collection.add(board.getPlayerScoreForObjective(name, objective));
        }
    }
    return collection;
}
项目:Tweakkit-Server    文件:CraftScore.java   
public int getScore() throws IllegalStateException {
    Scoreboard board = objective.checkState().board;

    if (board.getPlayers().contains(entry)) { // Lazy
        Map<net.minecraft.server.ScoreboardObjective, ScoreboardScore> scores = board.getPlayerObjectives(entry); // Spigot
        ScoreboardScore score = scores.get(objective.getHandle());
        if (score != null) { // Lazy
            return score.getScore();
        }
    }

    return 0; // Lazy
}
项目:Tweakkit-Server    文件:CraftScoreboardManager.java   
public Collection<ScoreboardScore> getScoreboardScores(IScoreboardCriteria criteria, String name, Collection<ScoreboardScore> collection) {
    for (CraftScoreboard scoreboard : scoreboards) {
        Scoreboard board = scoreboard.board;
        for (ScoreboardObjective objective : (Iterable<ScoreboardObjective>) board.getObjectivesForCriteria(criteria)) {
            collection.add(board.getPlayerScoreForObjective(name, objective));
        }
    }
    return collection;
}
项目:SpigotSource    文件:CraftScore.java   
public int getScore() throws IllegalStateException {
    Scoreboard board = objective.checkState().board;

    if (board.getPlayers().contains(entry)) { // Lazy
        Map<ScoreboardObjective, ScoreboardScore> scores = board.getPlayerObjectives(entry);
        ScoreboardScore score = scores.get(objective.getHandle());
        if (score != null) { // Lazy
            return score.getScore();
        }
    }

    return 0; // Lazy
}
项目:SpigotSource    文件:CraftScoreboardManager.java   
public Collection<ScoreboardScore> getScoreboardScores(IScoreboardCriteria criteria, String name, Collection<ScoreboardScore> collection) {
    for (CraftScoreboard scoreboard : scoreboards) {
        Scoreboard board = scoreboard.board;
        for (ScoreboardObjective objective : (Iterable<ScoreboardObjective>) board.getObjectivesForCriteria(criteria)) {
            collection.add(board.getPlayerScoreForObjective(name, objective));
        }
    }
    return collection;
}
项目:Craft-city    文件:CraftScore.java   
public int getScore() throws IllegalStateException {
    Scoreboard board = objective.checkState().board;

    if (board.getPlayers().contains(playerName)) { // Lazy
        Map<String, ScoreboardScore> scores = board.getPlayerObjectives(playerName);
        ScoreboardScore score = scores.get(objective.getHandle());
        if (score != null) { // Lazy
            return score.getScore();
        }
    }
    return 0; // Lazy
}
项目:Craft-city    文件:CraftScoreboardManager.java   
public Collection<ScoreboardScore> getScoreboardScores(IScoreboardCriteria criteria, String name, Collection<ScoreboardScore> collection) {
    for (CraftScoreboard scoreboard : scoreboards) {
        Scoreboard board = scoreboard.board;
        for (ScoreboardObjective objective : (Iterable<ScoreboardObjective>) board.getObjectivesForCriteria(criteria)) {
            collection.add(board.getPlayerScoreForObjective(name, objective));
        }
    }
    return collection;
}
项目:CraftBukkit    文件:CraftScoreboardManager.java   
public void updateAllScoresForList(IScoreboardCriteria criteria, String name, List<EntityPlayer> of) {
    for (ScoreboardScore score : getScoreboardScores(criteria, name, new ArrayList<ScoreboardScore>())) {
        score.updateForList(of);
    }
}
项目:Craftbukkit    文件:CraftScoreboardManager.java   
public void updateAllScoresForList(IScoreboardCriteria criteria, String name, List<EntityPlayer> of) {
    for (ScoreboardScore score : getScoreboardScores(criteria, name, new ArrayList<ScoreboardScore>())) {
        score.updateForList((List) of);
    }
}
项目:Almura-Server    文件:CraftScoreboardManager.java   
public void updateAllScoresForList(IScoreboardCriteria criteria, String name, List<EntityPlayer> of) {
    for (ScoreboardScore score : getScoreboardScores(criteria, name, new ArrayList<ScoreboardScore>())) {
        score.updateForList(of);
    }
}
项目:Tweakkit-Server    文件:CraftScoreboardManager.java   
public void updateAllScoresForList(IScoreboardCriteria criteria, String name, List<EntityPlayer> of) {
    for (ScoreboardScore score : getScoreboardScores(criteria, name, new ArrayList<ScoreboardScore>())) {
        score.updateForList(of);
    }
}
项目:Craft-city    文件:CraftScoreboardManager.java   
public void updateAllScoresForList(IScoreboardCriteria criteria, String name, List<EntityPlayer> of) {
    for (ScoreboardScore score : getScoreboardScores(criteria, name, new ArrayList<ScoreboardScore>())) {
        score.updateForList(of);
    }
}