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

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


        Player target = Canary.getServer().matchPlayer(args[args.length - 1]);
        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()));

    }
View Full Code Here


                Item item = makeItem(args[1], 1);
                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
View Full Code Here

            Player target = Canary.getServer().matchPlayer(args[3]);
            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

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.