Package org.bukkit.entity

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


    public static void chimaeraExecuteTeleport() {
        Player player = mcMMOPlayer.getPlayer();

        if (player.getBedSpawnLocation() != null) {
            player.teleport(player.getBedSpawnLocation());
        }
        else {
            Location spawnLocation = player.getWorld().getSpawnLocation();
            if (spawnLocation.getBlock().getType() == Material.AIR) {
                player.teleport(spawnLocation);
View Full Code Here

            player.teleport(player.getBedSpawnLocation());
        }
        else {
            Location spawnLocation = player.getWorld().getSpawnLocation();
            if (spawnLocation.getBlock().getType() == Material.AIR) {
                player.teleport(spawnLocation);
            }
            else {
                player.teleport(player.getWorld().getHighestBlockAt(spawnLocation).getLocation());
            }
        }
View Full Code Here

            Location spawnLocation = player.getWorld().getSpawnLocation();
            if (spawnLocation.getBlock().getType() == Material.AIR) {
                player.teleport(spawnLocation);
            }
            else {
                player.teleport(player.getWorld().getHighestBlockAt(spawnLocation).getLocation());
            }
        }

        player.setItemInHand(new ItemStack(getChimaeraWing(player.getItemInHand().getAmount() - Config.getInstance().getChimaeraUseCost())));
        player.updateInventory();
View Full Code Here

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

        player.teleport(player.getTargetBlock(null, 100).getLocation(), TeleportCause.PLUGIN);

        String unleashMessage = AdvancedConfig.getInstance().getPlayerUnleashMessage();

        if (!unleashMessage.isEmpty()) {
            player.sendMessage(unleashMessage);
View Full Code Here

                location = hashmap.get(team);
            } else {
                location = locations[i++];
            }

            player.teleport(new Location(world, Math.floor(location.getX()) + 0.5D, world.getHighestBlockYAt((int) location.getX(), (int) location.getZ()), Math.floor(location.getZ()) + 0.5D));
            double value = Double.MAX_VALUE;

            for (int k = 0; k < locations.length; ++k) {
                if (location != locations[k]) {
                    double d = location.distanceSquared(locations[k]);
View Full Code Here

            ClaimedResidence res = rmanager.getByLoc(player.getLocation());
            if (res == null) {
                player.sendMessage(ChatColor.RED + language.getPhrase("NotInResidence"));
            } else {
                player.sendMessage(ChatColor.YELLOW + language.getPhrase("Moved") + "...");
                player.teleport(res.getOutsideFreeLoc(player.getLocation()));
            }
            return true;
        }
        if (cmd.equals("mirror")) {
            if (args.length != 3) {
View Full Code Here

        Block block = getBackBlock();
        while(!BlockType.canPassThrough(block.getTypeId()))
            block = block.getRelative(0,1,0);

        p.teleport(block.getLocation().add(0.5, 0.5, 0.5));
        CraftBookPlugin.inst().wrapPlayer(p).print(welcome);
        TeleportTransmitter.lastKnownLocations.put(band, block.getLocation());
        return true;
    }
View Full Code Here

   */
  public void playerWin(Player p) {
    if (GameMode.DISABLED == mode) return;
    Player win = activePlayers.get(0);
    // clearInv(p);
    win.teleport(SettingsManager.getInstance().getLobbySpawn());
    restoreInv(win);
    msgmgr.broadcastFMessage(PrefixType.INFO, "game.playerwin","arena-"+gameID, "victim-"+p.getName(), "player-"+win.getName());
    LobbyManager.getInstance().display(new String[] {
        win.getName(), "", "Won the ", "Survival Games!"
    }, gameID);
View Full Code Here

*/
       
        if(GameManager.getInstance().getBlockGameId(p.getLocation()) != -1){
            Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable(){
                public void run(){
                    p.teleport(SettingsManager.getInstance().getLobbySpawn());

                }
            }, 5L);
        }
        if((p.isOp() || p.hasPermission("sg.system.updatenotify")) && SettingsManager.getInstance().getConfig().getBoolean("check-for-update", true)){
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.