Package net.citizensnpcs.api.util

Examples of net.citizensnpcs.api.util.Paginator.addLine()


    }


    public void describe(CommandSender sender, int page) throws CommandException {
        Paginator paginator = new Paginator().header("Constants for " + npc.getName());
        paginator.addLine("<e>NPC-specific constants: " + (hasNPCConstants() ? "" : "None.") + "");
        if (hasNPCConstants()) paginator.addLine("<e>Key: <a>Name  <b>Value");
        for (Entry<String, String> constant : constants.entrySet()) {
            paginator.addLine("<a> " + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<b>  " + constant.getValue());
        }
        paginator.addLine("");
View Full Code Here



    public void describe(CommandSender sender, int page) throws CommandException {
        Paginator paginator = new Paginator().header("Constants for " + npc.getName());
        paginator.addLine("<e>NPC-specific constants: " + (hasNPCConstants() ? "" : "None.") + "");
        if (hasNPCConstants()) paginator.addLine("<e>Key: <a>Name  <b>Value");
        for (Entry<String, String> constant : constants.entrySet()) {
            paginator.addLine("<a> " + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<b>  " + constant.getValue());
        }
        paginator.addLine("");
View Full Code Here

    public void describe(CommandSender sender, int page) throws CommandException {
        Paginator paginator = new Paginator().header("Constants for " + npc.getName());
        paginator.addLine("<e>NPC-specific constants: " + (hasNPCConstants() ? "" : "None.") + "");
        if (hasNPCConstants()) paginator.addLine("<e>Key: <a>Name  <b>Value");
        for (Entry<String, String> constant : constants.entrySet()) {
            paginator.addLine("<a> " + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<b>  " + constant.getValue());
        }
        paginator.addLine("");

        if (npc.hasTrait(AssignmentTrait.class) && npc.getTrait(AssignmentTrait.class).hasAssignment()) {
            getAssignmentConstants();
View Full Code Here

        paginator.addLine("<e>NPC-specific constants: " + (hasNPCConstants() ? "" : "None.") + "");
        if (hasNPCConstants()) paginator.addLine("<e>Key: <a>Name  <b>Value");
        for (Entry<String, String> constant : constants.entrySet()) {
            paginator.addLine("<a> " + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<b>  " + constant.getValue());
        }
        paginator.addLine("");

        if (npc.hasTrait(AssignmentTrait.class) && npc.getTrait(AssignmentTrait.class).hasAssignment()) {
            getAssignmentConstants();
            // List constants inherited from an Assignment.
            paginator.addLine("<e>Constants for assignment '" + assignment.toUpperCase() + "':");
View Full Code Here

        paginator.addLine("");

        if (npc.hasTrait(AssignmentTrait.class) && npc.getTrait(AssignmentTrait.class).hasAssignment()) {
            getAssignmentConstants();
            // List constants inherited from an Assignment.
            paginator.addLine("<e>Constants for assignment '" + assignment.toUpperCase() + "':");
            paginator.addLine("<e>Key: <a>Name  <b>Value");
            for (Entry<String, String> constant : getAssignmentConstants().entrySet()) {
                // If a constant from the Assignment has been overridden by a NPC constant,
                // change formatting to indicate so.
                if (constants.containsKey(constant.getKey()))
View Full Code Here

        if (npc.hasTrait(AssignmentTrait.class) && npc.getTrait(AssignmentTrait.class).hasAssignment()) {
            getAssignmentConstants();
            // List constants inherited from an Assignment.
            paginator.addLine("<e>Constants for assignment '" + assignment.toUpperCase() + "':");
            paginator.addLine("<e>Key: <a>Name  <b>Value");
            for (Entry<String, String> constant : getAssignmentConstants().entrySet()) {
                // If a constant from the Assignment has been overridden by a NPC constant,
                // change formatting to indicate so.
                if (constants.containsKey(constant.getKey()))
                    paginator.addLine("<m>" + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<r>  <m>" + constant.getValue());
View Full Code Here

            paginator.addLine("<e>Key: <a>Name  <b>Value");
            for (Entry<String, String> constant : getAssignmentConstants().entrySet()) {
                // If a constant from the Assignment has been overridden by a NPC constant,
                // change formatting to indicate so.
                if (constants.containsKey(constant.getKey()))
                    paginator.addLine("<m>" + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<r>  <m>" + constant.getValue());
                else paginator.addLine("<a>" + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<b>  " + constant.getValue());
            }
            paginator.addLine("");
        }
View Full Code Here

            for (Entry<String, String> constant : getAssignmentConstants().entrySet()) {
                // If a constant from the Assignment has been overridden by a NPC constant,
                // change formatting to indicate so.
                if (constants.containsKey(constant.getKey()))
                    paginator.addLine("<m>" + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<r>  <m>" + constant.getValue());
                else paginator.addLine("<a>" + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<b>  " + constant.getValue());
            }
            paginator.addLine("");
        }

        if (!paginator.sendPage(sender, page))
View Full Code Here

                // change formatting to indicate so.
                if (constants.containsKey(constant.getKey()))
                    paginator.addLine("<m>" + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<r>  <m>" + constant.getValue());
                else paginator.addLine("<a>" + String.valueOf(constant.getKey().charAt(0)).toUpperCase() + constant.getKey().substring(1) + "<b>  " + constant.getValue());
            }
            paginator.addLine("");
        }

        if (!paginator.sendPage(sender, page))
            throw new CommandException(Messages.COMMAND_PAGE_MISSING, page);
    }
View Full Code Here

    public void describe(CommandSender sender, int page) throws CommandException {

        AssignmentScriptContainer assignmentScript = ScriptRegistry.getScriptContainer(assignment);

        Paginator paginator = new Paginator().header("Assignment");
        paginator.addLine("<e>Current assignment: " + (hasAssignment() ? this.assignment : "None.") + "");
        paginator.addLine("");

        if (!hasAssignment()) {
            paginator.sendPage(sender, page);
            return;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.