Examples of matchesEnum()


Examples of net.aufdemrand.denizen.objects.Element.matchesEnum()

                else if (arg.equals("&&")) arg = "AND";

                Element elArg = new Element(arg);

                // Set bridge
                if (elArg.matchesEnum(Comparable.BridgeValues)) {
                    // new Comparable to add to the list
                    comparables.add(new Comparable());
                    comparables.get(comparables.size() - 1).bridge =
                            Comparable.Bridge.valueOf(arg.toUpperCase());
                }
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.matchesEnum()

                    comparables.get(comparables.size() - 1).bridge =
                            Comparable.Bridge.valueOf(arg.toUpperCase());
                }

                // Set operator (Optional, default is EQUALS)
                else if (elArg.matchesEnum(Comparable.OperatorValues)) {
                    comparables.get(comparables.size() - 1).operator =
                            Comparable.Operator.valueOf(arg.toUpperCase());
                    usedOperator = true;
                }
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.matchesEnum()

        // <i@item.plant_growth>
        // -->

        if (mechanism.matches("plant_growth")) {
            Element inputValue = new Element(mechanism.getValue().asString().toUpperCase());
            if (item.getItemStack().getData() instanceof Crops && inputValue.matchesEnum(CropState.values()))
                ((Crops)item.getItemStack().getData()).setState(CropState.valueOf(mechanism.getValue().asString().toUpperCase()));
            else if (item.getItemStack().getData() instanceof NetherWarts && inputValue.matchesEnum(NetherWartsState.values()))
                ((NetherWarts)item.getItemStack().getData()).setState(NetherWartsState.valueOf(mechanism.getValue().asString().toUpperCase()));
            else if (item.getItemStack().getData() instanceof CocoaPlant && inputValue.matchesEnum(CocoaPlant.CocoaPlantSize.values()))
                ((CocoaPlant)item.getItemStack().getData()).setSize(CocoaPlant.CocoaPlantSize.valueOf(mechanism.getValue().asString().toUpperCase()));
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.matchesEnum()

        if (mechanism.matches("plant_growth")) {
            Element inputValue = new Element(mechanism.getValue().asString().toUpperCase());
            if (item.getItemStack().getData() instanceof Crops && inputValue.matchesEnum(CropState.values()))
                ((Crops)item.getItemStack().getData()).setState(CropState.valueOf(mechanism.getValue().asString().toUpperCase()));
            else if (item.getItemStack().getData() instanceof NetherWarts && inputValue.matchesEnum(NetherWartsState.values()))
                ((NetherWarts)item.getItemStack().getData()).setState(NetherWartsState.valueOf(mechanism.getValue().asString().toUpperCase()));
            else if (item.getItemStack().getData() instanceof CocoaPlant && inputValue.matchesEnum(CocoaPlant.CocoaPlantSize.values()))
                ((CocoaPlant)item.getItemStack().getData()).setSize(CocoaPlant.CocoaPlantSize.valueOf(mechanism.getValue().asString().toUpperCase()));
            else if (mechanism.requireInteger())
                item.getItemStack().getData().setData((byte) mechanism.getValue().asInt());
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.matchesEnum()

            Element inputValue = new Element(mechanism.getValue().asString().toUpperCase());
            if (item.getItemStack().getData() instanceof Crops && inputValue.matchesEnum(CropState.values()))
                ((Crops)item.getItemStack().getData()).setState(CropState.valueOf(mechanism.getValue().asString().toUpperCase()));
            else if (item.getItemStack().getData() instanceof NetherWarts && inputValue.matchesEnum(NetherWartsState.values()))
                ((NetherWarts)item.getItemStack().getData()).setState(NetherWartsState.valueOf(mechanism.getValue().asString().toUpperCase()));
            else if (item.getItemStack().getData() instanceof CocoaPlant && inputValue.matchesEnum(CocoaPlant.CocoaPlantSize.values()))
                ((CocoaPlant)item.getItemStack().getData()).setSize(CocoaPlant.CocoaPlantSize.valueOf(mechanism.getValue().asString().toUpperCase()));
            else if (mechanism.requireInteger())
                item.getItemStack().getData().setData((byte) mechanism.getValue().asInt());
        }
    }
View Full Code Here

Examples of net.aufdemrand.denizen.objects.aH.Argument.matchesEnum()

            // Set the name/id/location of the inventory holder
            String holder = m.group(3);

            if (type.equals("generic")) {
                Argument arg = Argument.valueOf(holder);
                if (arg.matchesEnum(InventoryType.values())) {
                    return new dInventory(InventoryType.valueOf(holder.toUpperCase()));
                }
                else if (arg.matchesPrimitive(PrimitiveType.Integer)) {
                    return new dInventory(arg.asElement().asInt());
                }
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.