Examples of teleport()


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

        {
          player.teleport(gs.getEntryPoint());
        }
        else
        {
          player.teleport(Util.GetLocationFromString(Current.getMapEntranceByMap(gs.getMap()).getChestLocation()));
        }
        gs.setInChallenge(false);

        if (gs.getMap().getResetInventory())
        {
View Full Code Here

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

      player.setAllowFlight(true);
      Block destination = tree.getHeart();
      while (destination.getType() != Material.AIR
          || destination.getRelative(BlockFace.UP).getType() != Material.AIR)
        destination = destination.getRelative(BlockFace.UP);
      player.teleport(destination.getLocation());
    }
  }

  @EventHandler(ignoreCancelled = true)
  public void onReload(PluginEnableEvent event)
View Full Code Here

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

        if (nbStuck > 5)
        {
          Block destination = tree.getHeart();
          while (destination.getType() != Material.AIR || destination.getRelative(BlockFace.UP).getType() != Material.AIR)
            destination = destination.getRelative(BlockFace.UP);
          player.teleport(destination.getLocation());
          return;
        }
        stuck.put(player, nbStuck);

      }
View Full Code Here

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

        }
        stuck.put(player, nbStuck);

      }
      event.setCancelled(true);
      player.teleport(event.getFrom());
    }
  }
}
View Full Code Here

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

                lanceur.sendMessage("Ce joueur n'existe pas");
                return true;
        }

        Location locLanceur = lanceur.getLocation();
        cible.teleport(locLanceur);
        cible.setHealth(0);
        cible.setBanned(true);
        cible.kickPlayer("Le gourdin du bannissement a frappé !");
        String pseudoLanceur = lanceur.getDisplayName();
        String pseudoCible = cible.getDisplayName();
View Full Code Here

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

        if (args.length == 2)
        {
          int tmp = Integer.parseInt(args[1]);
          Location whereIsBryan = maso.getLocation();
            whereIsBryan.setY(tmp);
            maso.teleport(whereIsBryan);

            lanceur.getServer().broadcastMessage("HAAAAAAAX");
         
            return true;
        }
View Full Code Here

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

        }
        else
        {
          Location whereIsBryan = maso.getLocation();
          whereIsBryan.setY(128);
          maso.teleport(whereIsBryan);

          lanceur.getServer().broadcastMessage("HAAAAAAAX");
          return true;
        }
     
View Full Code Here

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

                    double speed = elevatorMoveSpeed;
                    newLocation.setPitch(p.getLocation().getPitch());
                    newLocation.setYaw(p.getLocation().getYaw());

                    if(Math.abs(newLocation.getY() - p.getLocation().getY()) < 0.7) {
                        p.teleport(newLocation);
                        teleportFinish(player, destination, shift);
                        if(flyingPlayers.contains(p.getUniqueId())) {
                            p.setFlying(false);
                            p.setAllowFlight(p.getGameMode() == GameMode.CREATIVE);
                            flyingPlayers.remove(p.getUniqueId());
View Full Code Here

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

                    }

                    if(newLocation.getY() > p.getLocation().getY()) {
                        p.setVelocity(new Vector(0, speed,0));
                        if(!BlockType.canPassThrough(p.getLocation().add(0, 2, 0).getBlock().getTypeId()))
                            p.teleport(p.getLocation().add(0, speed, 0));
                    } else if (newLocation.getY() < p.getLocation().getY()) {
                        p.setVelocity(new Vector(0, -speed,0));
                        if(!BlockType.canPassThrough(p.getLocation().add(0, -1, 0).getBlock().getTypeId()))
                            p.teleport(p.getLocation().add(0, -speed, 0));
                    } else {
View Full Code Here

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

                        if(!BlockType.canPassThrough(p.getLocation().add(0, 2, 0).getBlock().getTypeId()))
                            p.teleport(p.getLocation().add(0, speed, 0));
                    } else if (newLocation.getY() < p.getLocation().getY()) {
                        p.setVelocity(new Vector(0, -speed,0));
                        if(!BlockType.canPassThrough(p.getLocation().add(0, -1, 0).getBlock().getTypeId()))
                            p.teleport(p.getLocation().add(0, -speed, 0));
                    } else {
                        teleportFinish(player, destination, shift);
                        if(flyingPlayers.contains(p.getUniqueId())) {
                            p.setFlying(false);
                            p.setAllowFlight(p.getGameMode() == GameMode.CREATIVE);
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.