Package net.canarymod.api.entity

Examples of net.canarymod.api.entity.Entity.spawn()


            // Spawn a mob with Rider
            if (b != null) {
                b.setY(b.getY() + 1);
                try {
                    Entity mob = Canary.factory().getEntityFactory().newEntity(EntityType.valueOf(args[1].toUpperCase()), b.getLocation());
                    if (mob.spawn()) {
                        player.message(Colors.YELLOW + Translator.translateAndFormat("mobspawn spawned", args[1]));
                    }
                    else {
                        player.notice("mobspawn failed");
                    }
View Full Code Here


                b.setY(b.getY() + 1);
                boolean spawnSuccess = true;
                for (int i = 0; i < amount; ++i) {
                    try {
                        Entity e = Canary.factory().getEntityFactory().newEntity(EntityType.valueOf(args[1].toUpperCase()), b.getLocation());
                        spawnSuccess &= e.spawn();
                    }
                    catch (IllegalArgumentException e) {
                        player.notice(Translator.translate("mobspawn failed"));
                    }
                }
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.