Package org.bukkit.entity

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


        player.setPlayerWeather(WeatherType.DOWNFALL);

        Entity vehicle = player.getVehicle();

        if (vehicle != null && vehicle.getType() == EntityType.BOAT) {
            vehicle.eject();
            vehicle.remove();
        }

        player.teleport(player.getTargetBlock(null, 100).getLocation(), TeleportCause.PLUGIN);
View Full Code Here


    }
   
    // eject passengers and unmount before transport
    player.eject();
    Entity vehicle = player.getVehicle();
    if (vehicle != null) vehicle.eject();
   
    // Do the teleport
    TeleportMixinCauseEngine.get().setMixinCausedTeleportIncoming(true);
    player.teleport(location);
    TeleportMixinCauseEngine.get().setMixinCausedTeleportIncoming(false);
View Full Code Here

     */
    public static boolean teleportTo(CommandSender sender, Player player, Location target, boolean allowVehicles) {
        target.getChunk().load(true);
        if (player.getVehicle() != null) {
            Entity vehicle = player.getVehicle();
            vehicle.eject();

            boolean success = player.teleport(target);

            if (!allowVehicles) {
                return success;
View Full Code Here

      final Object o = delta[0];
      if (o instanceof Entity) {
        ((Entity) o).leaveVehicle();
        final Entity v = CollectionUtils.getRandom(vs);
        assert v != null;
        v.eject();
        v.setPassenger((Entity) o);
      } else if (o instanceof EntityData) {
        for (final Entity v : vs) {
          @SuppressWarnings("null")
          final Entity p = ((EntityData<?>) o).spawn(v.getLocation());
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.