private PacketContainer newScorePacket(String name, int value, ScoreboardAction action) {
        // http://wiki.vg/Protocol#Update_Score
        PacketContainer packet = new PacketContainer(PacketType.Play.Server.SCOREBOARD_SCORE);

        // set "Entity name" - aka the name of the score - limited to 40.
        packet.getStrings().write(0, name);

        // set the action - 0 to create/update an item. 1 to remove an item.
        packet.getScoreboardActions().write(0, action);

        // set objective name - The name of the objective the score belongs to
        packet.getStrings().write(1, getId());

        // set value of the score- The score to be displayed next to the entry. Only sent when Action does not equal 1.
        packet.getIntegers().write(0, value);

        return packet;
    }
Creates a new scoreboard objective

@param id the id of this objective
@param displayName the initial display name
@param displaySlot the initial display slot
helper/src/main/java/me/lucko/helper/scoreboard/PacketScoreboardObjective.java