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

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


        ban.setIp(p.getIP());
        ban.setIsIpBan(true);
        Canary.bans().issueBan(ban);
        Canary.hooks().callHook(new BanHook(p, p.getIP(), null, reason, timestamp));
        caller.notice(Translator.translateAndFormat("ipban banned", cmd[1]));
        p.kick(reason);
    }

    private void player(Player caller, String[] cmd) {
        if (cmd.length < 2) {
            Canary.help().getHelp(caller, "ipban");
View Full Code Here


        ban.setIp(p.getIP());
        ban.setIsIpBan(true);
        Canary.bans().issueBan(ban);
        Canary.hooks().callHook(new BanHook(p, p.getIP(), caller, reason, timestamp));
        caller.notice(Translator.translateAndFormat("ipban banned", cmd[1]));
        p.kick(reason);
    }

}
View Full Code Here

        if (p != null) {
            ban.setSubject(p.getName());
            Canary.bans().issueBan(ban);
            Canary.hooks().callHook(new BanHook(p, p.getIP(), null, reason, timestamp));
            caller.notice(Translator.translateAndFormat("ban banned", p.getName()));
            p.kick(reason);
        }
        else {
            ban.setSubject(cmd[1]);
            Canary.bans().issueBan(ban);
            Canary.hooks().callHook(new BanHook(null, "xxx.xxx.xxx.xxx", null, reason, timestamp));
View Full Code Here

        if (p != null) {
            ban.setSubject(p.getName());
            Canary.bans().issueBan(ban);
            Canary.hooks().callHook(new BanHook(p, p.getIP(), (caller instanceof Player) ? (Player)caller : null, reason, timestamp));
            caller.notice(Translator.translateAndFormat("ban banned", p.getName()));
            p.kick(reason);
        }
        else {
            ban.setSubject(cmd[1]);
            Canary.bans().issueBan(ban);
            Canary.hooks().callHook(new BanHook(null, "xxx.xxx.xxx.xxx", (caller instanceof Player) ? (Player)caller : null, reason, timestamp));
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.