Package net.canarymod.api.entity.living.humanoid

Examples of net.canarymod.api.entity.living.humanoid.Player.teleportTo()


        if (player.hasPermission("canary.command.teleport.home.other")) {
            Player target = Canary.getServer().matchPlayer(args[1]);

            if (target != null) {
                if (target.hasHome()) {
                    target.teleportTo(target.getHome());
                }
                else {
                    player.notice(Translator.translateAndFormat("no home set other", target.getName()));
                }
            }
View Full Code Here


        Player target = Canary.getServer().matchPlayer(args[1]);

        if (target != null) {
            Location l = block.getBlock().getLocation();
            l.setY(l.getY()+1);
            target.teleportTo(l, TeleportHook.TeleportCause.COMMAND);
            block.message(Colors.YELLOW + Translator.translateAndFormat("tphere success", target.getName()));
        }
        else {
            block.notice(Translator.translateAndFormat("unknown player", args[1]));
        }
View Full Code Here

    private void player(Player player, String[] args) {
        Player target = Canary.getServer().matchPlayer(args[1]);

        if (target != null) {
            target.teleportTo(player.getLocation(), TeleportHook.TeleportCause.COMMAND);
            player.message(Colors.YELLOW + Translator.translateAndFormat("tphere success", target.getName()));
        }
        else {
            player.notice(Translator.translateAndFormat("unknown player", args[1]));
        }
View Full Code Here

        else {
            Player player = Canary.getServer().matchPlayer(args[2]);
            World w = Canary.getServer().getWorld(args[1]);

            if (player != null && w != null) {
                player.teleportTo(w.getSpawnLocation());
                caller.notice(Translator.translateAndFormat("spawn success other", player.getName()));
            }
            else {
                caller.notice(Translator.translate("spawn failed console"));
            }
View Full Code Here

        else {
            World w = Canary.getServer().getWorld(args[1]);
            Player target = Canary.getServer().matchPlayer(args[2]);

            if (target != null && w != null) {
                target.teleportTo(w.getSpawnLocation());
                player.message(Colors.YELLOW + Translator.translateAndFormat("spawn success other", player.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.