Package net.aufdemrand.denizen.objects

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


                    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

        // <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

        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

            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

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.