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

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


    private void player(Player player, String[] args) {
        if (args.length == 2) {
            Player target = Canary.getServer().matchPlayer(args[1]);
            if (target != null) {
                target.setHome(player.getLocation());
                target.message(Colors.YELLOW + "Your home has been set by " + player.getName());
                player.message(Colors.YELLOW + target.getName() + "'s  home has been set.");
            }
            else {
                player.notice(Translator.translateAndFormat("unknown player", args[1]));
            }
View Full Code Here


        if (target == null) {
            caller.notice(Translator.translateAndFormat("unknown player", args[args.length - 1]));
            return;
        }
        target.giveItem(item);
        target.message(Colors.YELLOW + Translator.translateAndFormat("give received", item.getType().getDisplayName()));
        caller.notice(Translator.translateAndFormat("give success other", target.getName()));

    }

    private void player(Player player, String[] args) {
View Full Code Here

                if (item == null) { // NULL CHECK!
                    player.notice(Translator.translateAndFormat("give invalid itemtype", args[1]));
                    return;
                }
                target.giveItem(item);
                target.message(Colors.YELLOW + Translator.translateAndFormat("give received", item.getType().getDisplayName()));
                player.notice(Translator.translateAndFormat("give success other", target.getName()));
            }
        }
        // Give to other
        else if (args.length == 4) {
View Full Code Here

            if (target == null) {
                player.notice(Translator.translateAndFormat("unknown player", args[3]));
                return;
            }
            target.giveItem(item);
            target.message(Colors.YELLOW + Translator.translateAndFormat("give received", item.getType().getDisplayName()));
            player.notice(Translator.translateAndFormat("give success other", target.getName()));
        }
    }

    /**
 
View Full Code Here

            // SET PUBLIC WARP
            if (args.length == 2 && player.hasPermission("canary.command.warp.set.public")) {
                Warp newWarp = new Warp(player.getLocation(), args[1]);

                Canary.warps().addWarp(newWarp);
                player.message(Colors.YELLOW + Translator.translateAndFormat("setwarp success", args[1]));
            }
            else if (args.length > 3) {
                // SET GROUP SPECIFIC WARP
                if (args[2].equalsIgnoreCase("G") && player.hasPermission("canary.command.warp.set.group")) {
                    Group[] groups = new Group[args.length - 3];
View Full Code Here

                        groups[i] = Canary.usersAndGroups().getGroup(args[i + 3]);
                    }
                    Warp newWarp = new Warp(player.getLocation(), groups, args[1]);

                    Canary.warps().addWarp(newWarp);
                    player.message(Colors.YELLOW + Translator.translateAndFormat("setwarp success group", args[1]));
                    return;
                }
                // SET PRIVATE WARP
                if (args[2].equalsIgnoreCase("P") && player.hasPermission("canary.command.warp.set.private")) {
                    Warp newWarp = new Warp(player.getLocation(), args[1], args[3], false);
View Full Code Here

                // SET PRIVATE WARP
                if (args[2].equalsIgnoreCase("P") && player.hasPermission("canary.command.warp.set.private")) {
                    Warp newWarp = new Warp(player.getLocation(), args[1], args[3], false);

                    Canary.warps().addWarp(newWarp);
                    player.message(Colors.YELLOW + Translator.translateAndFormat("setwarp success private", args[1]));
                }
                else {
                    Canary.help().getHelp(player, "setwarp");
                }
            }
View Full Code Here

            Player player = (Player) caller;
            Warp target = Canary.warps().getWarp(args[1]);

            if (target != null) {
                if (target.warp(player)) {
                    player.message(Colors.YELLOW + Translator.translateAndFormat("warp success", target.getName()));
                    return;
                }
                else {
                    player.message(Colors.YELLOW + Translator.translateAndFormat("warp not allowed", target.getName()));
                    return;
View Full Code Here

                if (target.warp(player)) {
                    player.message(Colors.YELLOW + Translator.translateAndFormat("warp success", target.getName()));
                    return;
                }
                else {
                    player.message(Colors.YELLOW + Translator.translateAndFormat("warp not allowed", target.getName()));
                    return;
                }
            }
            player.notice(Translator.translateAndFormat("warp unknown", args[1]));
        }
View Full Code Here

                Canary.logInfo(Translator.translate("no warps"));
            }
        }
        else {
            Player player = (Player) caller;
            player.message(Colors.YELLOW + Translator.translate("warps available"));

            List<Warp> warps = Canary.warps().getAllWarps();
            StringBuilder warpList = new StringBuilder();

            for (Warp w : warps) {
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.