    public void translate(ServerUpdateScorePacket packet, GeyserSession session) {
        WorldCache worldCache = session.getWorldCache();
        Scoreboard scoreboard = worldCache.getScoreboard();
        int pps = worldCache.increaseAndGetScoreboardPacketsPerSecond();

        Objective objective = scoreboard.getObjective(packet.getObjective());
        if (objective == null && packet.getAction() != ScoreboardAction.REMOVE) {
            logger.info(LanguageUtils.getLocaleStringLog("geyser.network.translator.score.failed_objective", packet.getObjective()));
            return;
        }

        switch (packet.getAction()) {
            case ADD_OR_UPDATE:
                objective.setScore(packet.getEntry(), packet.getValue());
                break;
            case REMOVE:
                if (objective != null) {
                    objective.removeScore(packet.getEntry());
                } else {
                    for (Objective objective1 : scoreboard.getObjectives().values()) {
                        objective1.removeScore(packet.getEntry());
                    }
                }
                break;
        }

        // ScoreboardUpdater will handle it for us if the packets per second
        // (for score and team packets) is higher then the first threshold
        if (pps < ScoreboardUpdater.FIRST_SCORE_PACKETS_PER_SECOND_THRESHOLD) {
            scoreboard.onUpdate();
        }
    }