Examples of teleport()


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

    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

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

            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

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

            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

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

        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

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

                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

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

            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

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

        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

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

   */
  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

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

                Player player = (Player) passenger;
                if (!General.PlayerMovementLogic(player, event.getFrom(), event.getTo()))
                {
                    Location loc = General.getPlayer(player.getName()).getCurrentLocation();
                    loc.setY(loc.getY() + 1);
                    vehicle.teleport(loc);
                    vehicle.setVelocity(zero);
                }
            }
        }
    }
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.