Examples of BanList


Examples of net.minecraft.server.management.BanList

            return null;
        }
        @Override
        public Set<String> getIPBans()
        {
            BanList bl = server.getConfigurationManager().getBannedIPs();
            Set<String> ips = new HashSet<String>();

            for (String s : bl.func_152685_a()) {
                ips.add(s);
            }
           
            return ips;
        }
View Full Code Here

Examples of org.bukkit.BanList

        final GlowServer server = player.getServer();
        final InetAddress address = player.getAddress().getAddress();
        final String addressString = address.getHostAddress();
        final PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, address);

        final BanList nameBans = server.getBanList(BanList.Type.NAME);
        final BanList ipBans = server.getBanList(BanList.Type.IP);

        if (nameBans.isBanned(player.getName())) {
            event.disallow(PlayerLoginEvent.Result.KICK_BANNED,
                    "Banned: " + nameBans.getBanEntry(player.getName()).getReason());
        } else if (ipBans.isBanned(addressString)) {
            event.disallow(PlayerLoginEvent.Result.KICK_BANNED,
                    "Banned: " + ipBans.getBanEntry(addressString).getReason());
        } else if (server.hasWhitelist() && !player.isWhitelisted()) {
            event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST,
                    "You are not whitelisted on this server.");
        } else if (server.getOnlinePlayers().size() >= server.getMaxPlayers()) {
            event.disallow(PlayerLoginEvent.Result.KICK_FULL,
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.