Package net.canarymod.hook.player

Examples of net.canarymod.hook.player.BanHook


        ban.setBanningPlayer(caller.getName());
        ban.setSubject(p.getName());
        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);
    }
View Full Code Here


        ban.setBanningPlayer(caller.getName());
        ban.setSubject(p.getName());
        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

        ban.setTimestamp(timestamp);
        ban.setBanningPlayer(caller.getName());
        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));
            caller.notice(Translator.translateAndFormat("ban banned", cmd[1]));
        }
    }
View Full Code Here

        ban.setTimestamp(timestamp);
        ban.setBanningPlayer(caller.getName());
        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));
            caller.notice(Translator.translateAndFormat("ban banned", cmd[1]));
        }
    }
View Full Code Here

TOP

Related Classes of net.canarymod.hook.player.BanHook

Copyright © 2018 www.massapicom. 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.