Package org.bukkit

Examples of org.bukkit.World.spawnEntity()


        if (player.getItemInHand().getType() == Material.FISHING_ROD) {
            player.setItemInHand(null);
        }

        Creature kraken = (Creature) world.spawnEntity(player.getEyeLocation(), (Misc.getRandom().nextInt(100) == 0 ? EntityType.CHICKEN : EntityType.SQUID));
        kraken.setCustomName(AdvancedConfig.getInstance().getKrakenName());

        if (!kraken.isValid()) {
            int attackInterval = AdvancedConfig.getInstance().getKrakenAttackInterval() * Misc.TICK_CONVERSION_FACTOR;
            new KrakenAttackTask(kraken, player, player.getLocation()).runTaskTimer(mcMMO.p, attackInterval, attackInterval);
View Full Code Here


        if (Config.Debug())
          Config.logWarn("Player was riding a \"" + ride.toString() + "\".");
        if (ride instanceof Boat)
        {  // boats currently glitch on client when teleported, so crappy workaround is to remove it and spawn a new one
          ride.remove();
          ride = world.spawnEntity(rideLoc, EntityType.BOAT);
        }
        else
        {
          ride.setVelocity(new Vector(0, 0, 0));
          ride.teleport(rideLoc, TeleportCause.PLUGIN);
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.