Inactive [ADMN/SEC] EasyBan v2.1 - Ban people/subnets/countries from "offline" Servers [1185]

Discussion in 'Inactive/Unsupported Plugins' started by whoami, Jun 6, 2011.

  1. Offline


    Please use BukkitDev for bug reports/feature requests:

    EasyBan - Ban people/subnets/countries from "offline" Servers:
    Version: v2.1

    With this plugin you can ban griefers and other annoying people from your "offline" Server. To combat dynamic IPs EasyBan keeps track of players IP addresses and saves them into a file. Additionally you can ban entire subnets and/or countries if necessary. You can also add different DNSBL to block unwanted client hosts(open proxies, tor exit nodes, and much more)
    The plugin has support for PermissionsBukkit(Superperms) and Permissions. Without a Permissions plugin it defaults to op.

    • Kick and ban players and all their IP addresses
    • Temporary bans
    • Ban entire subnets
    • Ban entire countries
    • Ban hosts with the help of DNSBL
    • Customize plugin messages
    • IPv6 support
    • YAML, HSQLDB and MySQL database support
    Source Code:

    /ekick playername [reason] - Kick a player
    /ehistory playername - List all ips of a player
    /ealternative playername or ip - List all nicknames used by a player/show all players that connected from one ip
    /eban playername [reason] [time] - Ban a player. When time is given the player will be banned for [time] minutes
    /eunban playername - Unban a player
    /ebaninfo playername - Show informations about a ban
    /elistbans - List all banned players
    /elisttmpbans - List all temporary bans
    /ebansubnet networkprefix/subnetmask [reason] - Ban a subnet(e.g. /esubnetban or or 2001:470:1f09:e26::/64)
    /eunbansubnet networkprefix/subnetmask - Unban a subnet
    /elistsubnets - List all banned subnets
    /ebancountry countrycode - Ban a country(Country codes can be found here:
    /eunbancountry countrycode - Unban a country
    /elistcountries - List all banned countries
    /ewhitelist playername - Whitelist a player; Useful when a range ban hits an innocent
    /eunwhitelist playername - Remove player from whitelist
    /elistwhite - List all whitelisted players
    Country bans:
    Country bans are a optional feature just install the GeoIPTools plugin and they work.

    The YAML data backend is the default and doesn't need any configuration

    HSQLDB (open)

    To use the HSQL database download this.
    Create a "lib" directory in your server root and copy the downloaded file to that directory. Open the config.yml in plugins/EasyBan/ and replace "database: yaml" with "database: hsql"

    MySQL (open)

    To use MySQL as data backend download this.
    In that zip archive is a "mysql-connector-java-${VERSION}-bin.jar" file. Rename that file to "mysql-connector-java-bin.jar" and move it to the "lib" directory in your craftbukkit root folder. When the "lib" folder doesn't exist create it. Now create a database with a name of your choice.
    Open the config.yml in plugins/EasyBan/ and replace "database: yaml" with "database: mysql". Additionally you have to add these 5 settings:
    schema: 'XYZ' #database name(when not given it defaults to 'easyban')
    host: 'XYZ'  # MySQL Server address
    port: 'XYZ'  # MySQL Server port
    username: 'XYZ' # MySQL user
    password: 'XYZ' # password for that user

    easyban.${command} (e.g. easyban.ekick)
    Custom Messages:
    After the first start you'll find a messages.yml in "plugins/EasyBan/". To edit a message just change the part right of the ":".

    Update from <0.6 to 0.6 or higher
    Show (open)

    The layout of the bans.yml has changed and needs minor adjustments. Open bans.yml in an editor and change in the bans and subnets sections the lists to maps:

    Old Layout:
    - Pink
    - miau
    - deesck
    New Layout:
        Pink: {}
        miau: {}
        deesck: {}
    subnets: {} {} {}

    Version 2.1
    • added support for DNSBL
    Version 2.0
    • fixed #2
    • new configuration options
    More (open)

    Version 1.9
    • fixed #4
    • code cleanup
    Version 1.8
    • improved SQL code
    • player sees the reason for his kick/ban and for how long he was banned
    • added infos to plugin.yml
    Version 1.7
    • readded support for Permissions. If Permissions and PermissionsBukkit are installed Permissions will be used)
    Version 1.6
    • dropped support for Permissions
    • added support for PermissionsBukkit
    Version 1.5
    • Added configure option for mysql database schema
    • fixed MySQL temporary ban bug
    Version 1.4
    • /ealternative can now be used with a ip(request by AS1LV3RN1NJA)
    Version 1.3

    • MySQL support
    Version 1.2

    • HSQLDB support
    • Whitelist also works for subnet bans
    Version 1.1

    • GeoIPTools support
    Version 1.0

    • Added /ealternative command
    • Whitelist only works for country bans
    Version 0.9

    • Added country bans
    • Added a white list
    • Code cleanup
    • Renamed a few commands for consistency(esubnetban -> ebansubnet, esubnetunban -> eunbansubnet, elistips -> ehistory)
    • Moved messages form config.yml to messages.yml (custom messages will be copied automatically)
    • All actions are properly logged to console
    Version 0.8

    • Added temporary bans
    Version 0.7

    • Added missing message(thanks @l104693 for the report)
    Version 0.6

    • Reasons for bans
    • Saves who banned someone
    Version 0.5

    • Ignore case of commands
    Version 0.4

    • List commands
    Version 0.3

    • IPv6 Support
    • Thread safe
    • Ban subnets with CIDR notation
    • Messages moved to config.yml
    Version 0.2

    • Release
    Version 0.1

    • Internal test version
    efstajas, lastern and AS1LV3RN1NJA like this.
  2. Offline


    Most likely you mix up a letter or ignore that the plugin is case sensitive. Meaning when you ban Player "XyZa" its a different Player than "xYzA" I'm going to fix that with the next release.
  3. Offline


    Yes you have right, banning names work with case sensitive, but ip ban don't work, because if I ban somebody he can connect with new nickname(with the same IP and do what they want), so at the moment I turn my server to online mode.
  4. Offline


    I just tested that. And it works for me:
    I connected, banned myself, changed my name and tried to connect again and the plugin correctly dennied access. Am I missing something?
  5. Offline


    Hey I'm trying to use this plug-in but I have a few difficulties.
    Previously (1.6) I've been using "advanced Bans".
    Is it possible that you make it configurable that you don't ban ALL the ip's of a player but just the last one?
    Is it possible to change the commands? I hate the "e" in front of everything
    And I got an error when I did /ebaninfo on myself (maybe because I haven't banned someone?)
    20:30:20 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'eban
    info' in plugin EasyBan v0.6
            at org.bukkit.command.PluginCommand.execute(
            at org.bukkit.command.SimpleCommandMap.dispatch(
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.Packet3Chat.a(
            at net.minecraft.server.NetworkManager.b(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(
    Caused by: java.lang.NullPointerException
            at org.bukkit.craftbukkit.TextWrapper.wrapText(
            at net.minecraft.server.NetServerHandler.sendPacket(NetServerHandler.jav
            at org.bukkit.craftbukkit.entity.CraftPlayer.sendRawMessage(CraftPlayer.
            at org.bukkit.craftbukkit.entity.CraftPlayer.sendMessage(CraftPlayer.jav
            at org.bukkit.command.PluginCommand.execute(
            ... 12 more
    If you've fixed this small things, this will be a GREAT PLUGIN :D
  6. Offline


    If you want to ban a single IP just ban that IP with the subnetban function:
    For example:
    But I guess I could add someting like "/ebancurip playername" which bans only the current ip.

    You can use the alias function from craftbukkit to rename the commands to whatever you want.

    You found a bug I'll push an update asap.
  7. Offline


    Earlier I change config to give another announce (translate them) plugin don't work. When I delete config and let create default it works :)
  8. Offline


    Hm maybe you translated to much :) Only translate the parts right of the ":".
    ' is not banned': ' is not banned'
    translated to german
    ' is not banned': ' ist nicht gesperrt'
  9. Offline


    Some rigts parts after " : " are '...' and some are without apostrophes, mayby I can translate only 1 of this. It is any difference?
  10. Offline


    just put all your translations into apostrophes
  11. Offline


    I love your Plugin !
    Its works for bukkit #935 but not for bukkit #953

    My log (open)
    01:40:57 [GRAVE] Could not pass event PLAYER_JOIN to EasyBan
    java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Ha
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfiguration
    at net.minecraft.server.NetLoginHandler.b(
    at net.minecraft.server.NetLoginHandler.a(
    at net.minecraft.server.Packet1Login.a(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(
    at net.minecraft.server.NetLoginHandler.a(
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(

    I wait for EasyBan v0.8 :D
  12. Offline


    I'm running EasyBan on #953. According to you logs it is most likely that you either did not correctly follow the update guide or forgot to delete an old version of the plugin from the plugins folder.
  13. Thankyou for adding the ability to ban a country.
    No longer shall my server be plagued by Italians!
  14. Offline


    I had the same problem with Finns. That's why I added the function but as soon as I threatened to ban all of them they started to behave...
    AS1LV3RN1NJA likes this.
  15. I'm not sure the country ban is working, i need to ban everyone with 79. at the start of their IP, how would / can i do this?
  16. Offline


    it is working here... You can install the "CountryLoginMessage" plugin and you will see everyone from a banned country is removed from the server.

    With this you ban more than 16 million addresses so think twice before using it :)

    And if for example you want to ban Italy:

    /ebancountry IT
    Note that it is important to use "IT" and not "it".
    AS1LV3RN1NJA likes this.
    :D Thankyou for this.
  18. Offline


    Can we have command like /ealts <player> to show all playernames who have logged in from IPs in <player>'s history.
  19. /ehistory playername - List all ips of a player

    Wait, read your comment again. Not the same thing, sorry.
  20. Offline


    Ok I put it on the to do list.
  21. Offline


    Love the plugin, one error:

    Running CB #953
    Easyban 0.9
    Lots of other plugins
    One plugin is calling this error because of Easyban...
    xAuth v2.0 beta 3.5
    2011-07-18 21:16:59 [INFO] [EasyBan] Ban for -------- detected
    2011-07-18 21:17:00 [SEVERE] Could not pass event PLAYER_JOIN to xAuth
    	at com.cypherx.xauth.xAuth.protect(
    	at com.cypherx.xauth.xAuth.createGuest(
    	at com.cypherx.xauth.listeners.xAuthPlayerListener.onPlayerJoin(
    	at org.bukkit.plugin.RegisteredListener.callEvent(
    	at org.bukkit.plugin.SimplePluginManager.callEvent(
    	at net.minecraft.server.ServerConfigurationManager.c(
    	at net.minecraft.server.NetLoginHandler.b(
    	at net.minecraft.server.NetLoginHandler.a(
    	at net.minecraft.server.Packet1Login.a(SourceFile:43)
    	at net.minecraft.server.NetworkManager.b(
    	at net.minecraft.server.NetLoginHandler.a(
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    	at net.minecraft.server.MinecraftServer.h(
    2011-07-18 21:19:31 [INFO] [BBROTHER] Removed 995493 old records because of age in 20h00m00s.
    2011-07-18 21:20:01 [INFO] / lost connection
    2011-07-18 21:21:59 [SEVERE] java.lang.NullPointerException
    2011-07-18 21:21:59 [SEVERE] 	at com.cypherx.xauth.xAuth$
    2011-07-18 21:21:59 [SEVERE] 	at
    2011-07-18 21:21:59 [SEVERE] 	at Source)
  22. Offline


    Yeah I talked to the xAuth guys about that but there is not much I can do. Afaik they fixed that already in their repository you just have to wait for a release by them.
  23. A new version every day it seems :p

    Any chance we could have /ealternative work with ip's aswell?
    e.g. /ealternative comes up with everyone who accessed my server from my IP?
  24. Offline


    After I had all the needed SQL statements fro hsql it just was a minor adjustment to also support mysql...

    Ok it is on the todo list for the next version
  25. Offline


    Good afternoon. Necessary to ban a range of ip -

    what should I prescribe? - does not work! thanks

    thought could be so right / ebansubnet or /ebansubnet
  26. Offline


    Yes either one of the comands will ban -
  27. Offline


    Thank you very much! Plug-in great! Warm greetings from Russia! =)
  28. Offline


    Hm i don't understand how to ban a range like 12.23.*.*
    Is the command /ebansubnet 12.23/255.255 ?
  29. Offline


    "/ebansubnet" or "/ebansubnet"
  30. /ealternative can now be used with a ip(request by AS1LV3RN1NJA)

    Nice :D You need to update the thread title.
  31. Offline


    Can you make it so that it tells you how much time you have left in your ban if you try to reconnect? I like how we can modify the messages, but can you add a line on top of the custom message saying something like this:

    Line1: You are banned. Reason: <reason here>. Time Left: <time left of ban>
    Line2: <Custom message that can be edited in the config>

Share This Page