Package net.aufdemrand.denizen.exceptions

Examples of net.aufdemrand.denizen.exceptions.RequirementCheckException


                        // Check if # of required args are met
                        int numArguments = argumentList.isEmpty() ? 0 : argumentList.size();
                        int neededArguments = requirement.requirementOptions.REQUIRED_ARGS;
                        if ((numArguments == 0 && neededArguments > 0) ||
                                numArguments < neededArguments) {
                            throw new RequirementCheckException("Not enough arguments (" + numArguments + " / " + neededArguments + ")");
                        }

                        // Check the Requirement
                        if (requirement.check(context, argumentList) != negativeRequirement) {
                            // Check first requirement for mode 'FIRST AND ANY #'
View Full Code Here


        boolean outcome = false;
        CheckType checkType = null;

        if(args.size() < 1)
            throw new RequirementCheckException("Must provide arguments!");

        /* Get arguments */

        for (String thisArg : args) {

View Full Code Here

    public boolean check(RequirementsContext context, List<String> args) throws RequirementCheckException {
        boolean outcome = false;
        Block blockToCheck = null;

        if(args.size() < 1)
            throw new RequirementCheckException("Must provide a BOOKMARK:block of the block to be checked!");

        /* Get arguments */

        for (String thisArg : args) {

View Full Code Here

    @Override
    public boolean check(RequirementsContext context, List<String> args) throws RequirementCheckException {
        // Make sure player isn't null and then check oxygen.
        if (context.getPlayer() == null) return false;

        if(args.size() < 1) throw new RequirementCheckException("Must specify amount/quantity!");

        Range range = Range.BELOW;
        int val = context.getPlayer().getPlayerEntity().getMaximumAir();

        for(String arg : args) {
View Full Code Here

            for (String arg : args) {
                if (aH.matchesQuantity(arg) || aH.matchesInteger(arg) || aH.matchesDouble(arg)) {
                    quantity = aH.getDoubleFrom(arg);
                    dB.echoDebug(context.getScriptContainer(), "...quantity set to: " + quantity);
                } else throw new RequirementCheckException("Unknown argument '" + arg + "'!");
            }

            balance = Depends.economy.getBalance(context.getPlayer().getName());
            dB.echoDebug (context.getScriptContainer(), "...player balance: " + balance);
View Full Code Here

TOP

Related Classes of net.aufdemrand.denizen.exceptions.RequirementCheckException

Copyright © 2018 www.massapicom. 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.