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


    I'll figure something out to support them both...

    The PlayerPreLoginEvent is only called when the server is in "online" mode. But this plugin is intented for "offline" servers. There is the PlayerLoginEvent I could use but this one is not cleanly implemented in Bukkit and I can not reliable get the IP of a player. Which only leaves me with the PlayerJoinEvent.

    I already told all of this the xAuth dev and I think he implemented a fix in xAuth.
  3. Offline


    You right, they fixed it.
    Thnak you for your answer.

  4. Offline


    Can the subnet calculations be done in the plugin?

    For example, /subnetban MrSpammer would check his IP and ban his whole subnet automatically.
  5. Offline


    Unfortunatly not. There is no real standard in how the subnet informations are saved in the whois informations. That makes parsing impossible.
  6. Offline


    I think I already requested this, I'll just request it again. Can you change /eban playername [reason] [time] to /eban playername [time] [reason]. That way, I can do /eban person 10080 Disrespect and Harassment. The other way forces you to use underscores or just type one word for the reason.
  7. Offline


    No it doesnt.

    You can just write "/eban Player123 He griefed the big ship outside the station in the land of mordor near the yellow brick road 10080"
    When the last "word" is a number it is always interpreted as the time.

    You can also ban without giving a reason "/eban Player123 10080"
    or ban without a time(perm ban) "/eban Player123 He likes equus ferus caballus"
    or ban without reason and time "/eban Player123"
    AS1LV3RN1NJA likes this.
  8. Offline


    doesn't this plugin support spout?
  9. Offline


    I don't think that easyban has a feature that would benefit from spout...
  10. Offline


    Oh nevermind. I asked the wrong question xD
    Can you add a feature so it tells you why you're banned and why you're kicked (both as soon as you get banned/kicked and when you try to reconnect). It looks like you intended it for it to allow that, but it's not working for me. Here is my config:
    You are banned: You are banned
    ' is not banned': ' is not banned'
    Your country has been banned: Your country has been banned
    ' has been unbanned': ' has been unbanned'
    'Until: ': 'Until: '
    Wrong time format: Wrong time format
    'Reason: ': 'Reason: '
    'A country has been banned: ': 'A country has been banned: '
    ' has been kicked': ' has been kicked'
    Invalid Subnet: Invalid Subnet
    ' has been banned': ' has been banned'
    'Admin: ': 'Admin: '
    'Alternative nicks of ': 'Alternative nicks of '
    'A country has been unbanned: ': 'A country has been unbanned: '
    'Banned countries: ': 'Banned countries: '
    ' has been whitelisted': ' has been whitelisted'
    'Whitelist: ': 'Whitelist: '
    'Ips from ': 'Ips from '
    'Banned players: ': 'Banned players: '
    Users who connected from IP: Users who connected from IP
    'Banned subnets: ': 'Banned subnets: '
    'Temporary bans: ': 'Temporary bans: '
    You have been banned: You have been banned
    ' is banned': ' is banned'
    ' has been removed from the whitelist': ' has been removed from the whitelist'
    Your subnet is banned: Your subnet is banned
    'You are banned until: ': 'You are banned until: '
    You have been kicked: You have been kicked
  11. Offline


    I never actually implemented it... But I will do it in the next release.

    Now a note for everyone:
    When you have feature request and/or bug reports please use the bug tracker from BukkitDev. Its much easier for me to keep track of them on there than in this thread.
    pomo4ka and AS1LV3RN1NJA like this.
  12. can i ban players who exceed certain ping amount?
    they get kicked and messaged "Fix your ping!" or something?
  13. Offline


    Hi there!
    This just happened, with Bukkit 1060 and EasyBan 1.8
    10:12:23 [INFO] [EasyBan] Ban for Nickname detected
    10:12:23 [INFO] Nickname [/[IP address]:1172] logged in with entity id 2300 at
    ([newbie] -97.66296416795383, 64.0, -87.28836318024302)
    10:12:23 [INFO] [MultiInv] Shared worlds loaded with no errors
    10:12:50 [INFO] [xAuth] Nickname has logged in
    10:13:43 [INFO] [PLAYER_COMMAND] Nickname: /balance
    I masked the Nickname and IP address, ans I confirm that the nickname is banned on the config.
    Do you know what can do this?
    Update: It is happening with all banned players, and even players from a banned coutry!
  14. Offline


    I guess that it's an plugin that overwrites my cancellation of the PlayerLoginEvent...
  15. Offline


    Version: v1.9 (with 1.1 country bans require a additional plugin; see below for informations)

    Is the v1.9 a typo?
  16. Offline


    Why would that be a typo?
  17. Offline


    Lol oh right, "my bad" ;P
  18. Offline



    hi excuse me but you can create a version with geoip implementated or compatible with essentials geo ip ?

    i have essentialsgeoip and i don't like to use 2 geoip
  19. Offline


    Just tell the essentials guys to use GeoIPTools. This plugin is intended to be used by all GeoIP plugins to prevent that multiple plugins load multiple instances of the Maxmind database.
  20. Offline


    Thanks for the update, in fact the players go away, but this happens now...
    13:09:38 [INFO] Nickname [/[IP]:4091] logged in with entity id 50230 at
    ([world] 1.5, 66.62000000476837, 3.5)
    13:09:38 [INFO] [EasyBan] Ban for Nickname detected
    13:09:38 [INFO] [MultiInv] New player detected: Nickname
    13:09:38 [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(xAuthPla
            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(
    13:10:00 [INFO] Disconnecting Nickname [/[IP]:4105]: You are already online!
    13:10:10 [INFO] Disconnecting Nickname [/[IP]:4105]: You are already online!
    13:10:26 [INFO] Disconnecting Nickname [/[IP]:4105]: You are already online!
    And the players becames a a "idle ghost" on the spawn until I kick him...
    From my memory, this happened when I updated essentials to 2.5.8 I think.
    Do you think it's best to report to them?
  21. Offline


    As I said you must have some plugin installed that overwrites my "ban". What I changed with 1.9 is that I remove the banned player "by force". But this of course causes confusion with plugins that don't expect something like this. If you can give me a list of your plugins I might be able to investigate further.
  22. Offline


    Of course!

    I'll really apretiate that!

    14:11:35 [INFO] Plugins: AutoMessage, Essentials, EssentialsChat, GroupManager,
    EssentialsProtect, EssentialsSpawn, GeoIPTools, HeroicDeath, LogBlockQuestioner,
     MultiInv, Multiverse-Core, Multiverse-Portals, NoCheat, NoFloatingTrees, Rawcri
    ticsOreObfuscationPlugin, SimpleChestLock, Spout, WorldEdit, WorldGuard, xAuth,
    EasyBan, Permissions, dynmap, LogBlock
    In a few hours I will try to troubleshoot this by opening a side server and selecting some plugins.

    Best regards,
  23. Offline


    I just looked at the source of a few of them(not all are open source) and could not find anything

    I'm afraid that's going to be the only way...
  24. Offline


    I'll report back as soon as I have some updates.

    Once again, thanks for your time!

  25. Offline


    Did you update xAuth?
  26. Offline


    Yes, it's the version V2.0 b4.1
    Sorry I could not troubleshoot yesterday, today I will have some news.


    Hi again!

    Finally made my tests, its Essentials 2.5.8.
    If I remove the core plugin I get the normal message...

    21:49:11 [INFO] [EasyBan] Ban for Nickname detected
    21:49:11 [INFO] Disconnecting Nickname [/[IP]:62050]: You have been banned
    by Nickname


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 16, 2016
  27. Offline


    It's probably the best when you ask the Essentials guys about that. I myself am not using Essentials and I have no idea what they are doing here.
  28. Offline


    I use commandbook. It has less features, but it eats less resources. If you really want one of their extra features, I'm sure you can find a plugin for it :)
  29. Offline


    Well, that would be inevitable...

    I'm giving excuses to myself to not drop essentials because of the permission system I have.
    Oh well, time to move on I guess :)

  30. Offline


    You don't need the core essentials plugin to run Essentials Group Manager and Essentials Bridge (or whatever the file is called)
  31. Offline


    Awesome news Hydrosis!
    Thank you!

Share This Page