Examples of teleport()


Examples of org.bukkit.entity.Entity.teleport()

        if (e.isDead()) {
          return;
        }
        loc.setYaw(e.getLocation().getYaw());
        loc.setPitch(e.getLocation().getPitch());
        e.teleport(loc);
      }
    });
    mm.resetCollisionEnter();
    mm.onPropertiesChanged();
  }
View Full Code Here

Examples of org.bukkit.entity.Entity.teleport()

                    // Because setPassenger() is a toggle, only use it if the new passenger
                    // is not already the current passenger, and also make sure we're not
                    // mounting the entity on itself

                    if (entity.getPassenger() != lastEntity) {
                        lastEntity.teleport(entity.getLocation());
                        entity.setPassenger(lastEntity);
                    }
                }

                lastEntity = entity;
View Full Code Here

Examples of org.bukkit.entity.Entity.teleport()

            toCart = cart.getWorld().spawn(destination, RideableMinecart.class);

        final Entity passenger = cart.getPassenger();
        if (passenger != null) {
            cart.eject();
            passenger.teleport(destination);
            Bukkit.getScheduler().runTask(CraftBookPlugin.inst(), new Runnable() {

                @Override
                public void run() {
View Full Code Here

Examples of org.bukkit.entity.Entity.teleport()

        // cart.getPassenger().teleport(ejectTarget.getLocation());
        // the client tweaks as bukkit tries to teleport you, then changes its mind and leaves you in the cart.
        // the cart also comes to a dead halt at the time of writing, and i have no idea why.
        Entity ent = event.getMinecart().getPassenger();
        event.getMinecart().eject();
        ent.teleport(BukkitUtil.center(ejectTarget.getLocation()));

        // notice!
        // if a client tries to board a cart immediately before it crosses an ejector,
        // it may appear to them that they crossed the ejector and it failed to activate.
        // what's actually happening is that the server didn't see them enter the cart
View Full Code Here

Examples of org.bukkit.entity.Item.teleport()

          int   y   = 0;
          int   z  = shop.getSpawnLocation().getBlockZ();
          World  w  = shop.getSpawnLocation().getWorld();
         
          // teleport (fixed some client sided issues)
          item.teleport(new Location(w, x, y, z));
         
          // set invisible
          shop.setVisible(false);
         
          // remove item
View Full Code Here

Examples of org.bukkit.entity.ItemFrame.teleport()

    public boolean replace(boolean shouldDrop)
    {
        try
        {
            ItemFrame f = getWorld().spawn(location.getBlock().getRelative(hanging.getAttachedFace()).getLocation(), ItemFrame.class);
            f.teleport(location);
            f.setItem(((ItemFrame) hanging).getItem());
            f.setRotation(((ItemFrame) hanging).getRotation());
            f.setFacingDirection(hanging.getFacing(), true);
        } catch (IllegalArgumentException e)
        {
View Full Code Here

Examples of org.bukkit.entity.LivingEntity.teleport()

        LivingEntity target = AbilityUtils.getTarget(arena, boss.getEntity(), RANDOM);
        if (target == null) return;
       
        Location loc = target.getLocation();
        loc.setYaw(loc.getYaw() + 45 + AbilityUtils.random.nextInt(270));
        target.teleport(loc);
    }
}
View Full Code Here

Examples of org.bukkit.entity.LivingEntity.teleport()

    @Override
    public void execute(Arena arena, MABoss boss) {
        LivingEntity target = AbilityUtils.getTarget(arena, boss.getEntity(), RANDOM);
        if (target == null) return;
       
        target.teleport(boss.getEntity());
    }
}
View Full Code Here

Examples of org.bukkit.entity.Painting.teleport()

    {

        try
        {
            Painting p = getWorld().spawn(location.getBlock().getRelative(hanging.getAttachedFace()).getLocation(), Painting.class);
            p.teleport(location);
            p.setFacingDirection(hanging.getFacing(), true);
            p.setArt(((Painting) hanging).getArt());
        } catch (IllegalArgumentException e)
        {
            return false;
View Full Code Here

Examples of org.bukkit.entity.Player.teleport()

 
  @EventHandler (priority = EventPriority.LOW)
  public void slapPlayerQuit(PlayerQuitEvent e){
    Player p = e.getPlayer();
    if (slappedPlayers.contains(p.getName())){
      p.teleport(slappedLastLocations.get(p.getName()), PlayerTeleportEvent.TeleportCause.PLUGIN);
     
      slappedLastLocations.remove(p.getName());
      slappedPlayers.remove(p.getName());
    }
  }
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.