Package com.sk89q.worldedit.function

Examples of com.sk89q.worldedit.function.EntityFunction


        or(Flags.TAGGED        , args.hasFlag('t'), "worldedit.butcher.tagged");
        or(Flags.WITH_LIGHTNING, args.hasFlag('l'), "worldedit.butcher.lightning");
    }

    public EntityFunction createFunction(final EntityRegistry entityRegistry) {
        return new EntityFunction() {
            @Override
            public boolean apply(Entity entity) throws WorldEditException {
                boolean killPets = (flags & Flags.PETS) != 0;
                boolean killNPCs = (flags & Flags.NPCS) != 0;
                boolean killAnimals = (flags & Flags.ANIMALS) != 0;
View Full Code Here


    }

    public EntityFunction createFunction(final EntityRegistry entityRegistry) {
        final Type type = this.type;
        checkNotNull("type can't be null", type);
        return new EntityFunction() {
            @Override
            public boolean apply(Entity entity) throws WorldEditException {
                EntityType registryType = entity.getFacet(EntityType.class);
                if (registryType != null) {
                    if (type.matches(registryType)) {
View Full Code Here

TOP

Related Classes of com.sk89q.worldedit.function.EntityFunction

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.