Inactive [ADMN] BanHammer v2.0.2 Bans, kicks and records [1.3.1-R2.0]

Discussion in 'Inactive/Unsupported Plugins' started by grandwazir, Jun 26, 2011.

  1. Offline

    grandwazir

    [​IMG]

    BanHammer is a plugin that allows adminstrators and other trusted users to ban and kick players. The basic idea is to have a lightweight banning solution that includes all the features you help manage your server. Additionally the plugin stores all bans using the Bukkit persistance system, using permissions for all commands and is simple to configure.

    Features
    • Simple and easy to configure.
    • Supports permenant as well as temporary bans.
    • Custom configurable limits to prevent moderators banning for too long.
    • Ban offline and online players.
    • Player name matching when kicking or banning players (no need to type every letter)
    • Can broadcast notifications to other players.
    • Review previous bans of a player, even after they have expired.
    • Review recent bans to see what has been happening while you have been away.
    • Banned names are cached for quick logins.
    • Reload the banned name cache on command (useful if you alter the database outside the plugin)
    • Uses Bukkit persistence for data storage; you choose what is best for you.
    • Supports built in Bukkit permissions, operators have all commands by default.
    • Command help system, simply type /bh.
    Requirements
    • Bukkit Persistence needs to be configured in bukkit.yml
    • If using MySQL for Persistence, you need a MySQL database
    Installation

    Ensure you are using the latest recommended build.

    Before installing, you need to make sure you are running at least the latest recommended build for Bukkit. Support is only given for problems when using a recommended build. This does not mean that the plugin will not work on other versions of Bukkit, the likelihood is it will, but it is not supported.

    Getting BanHammer

    The best way to install BanHammer is to use the symbolic link to the latest version. This link always points to the latest version of BanHammer, so is safe to use in scripts or update plugins. Additionally you can to use the RSS feed provided by BukkitDev as this also includes a version changelog.

    Alternatively older versions are available as well, however they are not supported. If you are forced to use an older version for whatever reason, please let me know why by opening a issue on GitHub.

    Configuration
    1. Configure permissions if necessary.
    2. Optionally configure your ban limits (config.yml) and assign them to moderators.
    All documentation for BanHammer is available on the GitHub wiki, including example usage.

    Reporting issues

    If you encounter any problems using BanHammer, and you believe it is due to a bug in BanHammer, report the issue on the issue tracker. Please do not report issues in this thread as I will not see them as quickly as if you place them on the tracker.
     
    klarnet, PatrickFreed and fromgate like this.
  2. Offline

    nicklas1162

    If you get banned and try to log-in does it shows this message: The BanHammer has spoken!
     
  3. Offline

    agubelu

    Does this plugin support IPbans?
     
  4. Offline

    Regulus123

    Is that possible to make Banlist using this plugin? I want to put it on website for users, to see for what are they banned.
     
  5. Offline

    Zobobing

    ummm wheres the download link srry :/
     
  6. Offline

    yonji

    Hmmm this plugin doesn't seem to work with PermissionsEx. It says I have to add perm, but it's already done. Any help?
     
  7. Offline

    toon7

    I get this error when i use /bh recent:

    Code:
    01:05:54 [INFO] [BanHammer] 123 has been banned by########.
    01:06:02 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'bh' in plugin BanHammer v1.8.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:386)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:777)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:737)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:725)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:178)
        at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:587)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
        at name.richardson.james.bukkit.banhammer.ban.RecentCommand.execute(RecentCommand.java:58)
        at name.richardson.james.bukkit.util.command.PlayerCommand.onCommand(PlayerCommand.java:92)
        at name.richardson.james.bukkit.util.command.CommandManager.onCommand(CommandManager.java:51)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
        ... 14 more
    
     
  8. Offline

    grandwazir

    toon7 I am aware of this one. Will be fixed in next release.
     
  9. Offline

    toon7

    ok thx :D
     
  10. Offline

    Black_Jack

    Download link is broken

    I was wrong
     
  11. Offline

    Pr07o7yp3

    Where is the IP ban?
     
  12. Offline

    Dragonowy

    I'm using BK 1.1 R3.
    And I can See that, when BH start
    Code:
    [SEVERE] Error occurred while enabling BanHammer v1.8.1 (Is it up to date?): The permission banhammer.* is already defined!
    java.lang.IllegalArgumentException: The permission banhammer.* is already defined!
    ??
     
  13. Offline

    grandwazir

    Are you sure you are not trying to load two copies of BanHammer?
     
  14. Offline

    Andrew5243

    I don't know how to use your API. Where should I put getBanHammer() method? When I try it in main class "banHammerHandler" is underlined.
     
    grandwazir likes this.
  15. Offline

    Dragonowy

    Nope there is only one copy og BH,
    i forgot to say, we want to use it with plugin TOWNY ( RPG )
     
  16. Offline

    Cpt. Brenner

    I'm having a bit of trouble here, after setting up the permission nodes under PermissionEx (1.1.8). I'll try to ban/kick my test player(s) and get an error in-game saying...
    "You do not have permission to do this.
    You require banhammer.[ban/kick] to do this."

    The red line is from PermissionEx and the purple line is from banhammer. The interesting thing is that the nodes are correctly placed in Pex and will work if I place myself in OP.txt

    I've updated PermissionEx to the latest build, no go.
    I've looked at console when tying in the command and get "10:37:11 [INFO] [BanHammer] 5000"
    During the boot up the server, the banhammer immediately goes to OP style of permission.

    Any info would be marvelous.
    [Note: I will not give my permission.yml or my console report unless asked, if then it will be submitted via PM]

    -Signed Cpt. Brenner
    NoobGalore Minecraft DEV Team
     
  17. Offline

    hqSparx

    Can you please add ban broadcasts? with reason/time
     
  18. Offline

    hqSparx

    same thing here, my mods cant ban
    couldnt you just make it use bukkitperms?
     
  19. Offline

    grandwazir

    You need to add the BanHammer.jar to your build path like you did with Bukkit. Once you have done that, if you are using my example function, you should place it in your main class. It does not have to go their but the example expects that is where it would be placed. You can then use the methods as described here.

    The first line isn't from PEX, it is generated from BanHammer when you do not have a permission. The second line is only generated if you are running with debugging on. Making yourself an OP will make it work since player.hasPermission always returns true when a player is an OP.

    If you are attempting to ban a player permanently, you require both banhammer.ban and banhammer.ban.* to do so. The wildcard enables you to skip over the ban limit check. If you have defined no limits and you attempt to ban without banhammer.ban.* you will receive this error message. I have updated the documentation on the ExampleUsage page to reflect this.

    The 5000 is coming from the time in milliseconds that you want to ban someone for and should not be outputted to the log and will be removed in the next release.

    This is already added to the plugin. Give players who should receive these messages the banhammer.notify permission. Also for your permission problems look at the link above that I gave Cpt. Brenner.

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

    hqSparx

    Well, I think its problem with PEX, my mods have "banhammer.ban" permission, and they cant even ban for one minute (max temp ban is set to 3 days)
     
  21. Offline

    Cpt. Brenner

    Ah, I figured it out now, its confusing at first since your wiki doesn't fully explain it in full detail as to how to add a temp ban system to mods other than just stating the node. Read the spoiler for more info on temp bans
    Show Spoiler
    To add a temp ban node of lets say long (7 day ban), you need to add the following nodes:
    - banhammer.ban
    - banhammer.ban.[short/medium/long] (depending on the time frame you want it set too)

    Then from there they can only ban to the highest time they have to them (which in our case is long), same thing goes for the specific time bans too (i.e. /ban [name] [reason] t:6d14m7s). If they try to go over their limit it refuses that command.


    Now you can also change the length of the bans to a custom length of your choice. Read spoiler for more info.
    Show Spoiler
    To add more configured banning times lets say 1day, 7day, 9day, and 14day. First go into your config file and rename your length bans to whatever you wish (NOTE: They need to be words so having 5short will work whereas 5m will not.) For example, here is what my config looks like:
    - 1long: 1d
    - 7long: 7d
    - 9long: 9d
    - 14long: 14d

    The program will read them like that and will accept it. I stay with the [short], [medium], and [long] just because its easier to remember that way but you can change it to anything you want. If setting custom time limits for mods to use, the same rule applies so lets pick 9 days for our example, our permissions would look like:
    - banhammer.ban
    - banhammer.ban.9long (this the same as above, make sure its exactly how it's spelled otherwise it'll complain or worse crash)

    Now your mods can ban up to 9 day and cannot go over. You can always add additional times to the config as long as its typed the same was as the others (if not it'll not work).
    There you go, its pretty much straight forward for the most part, if at any times please feel free to ask me here or at www.noobgalore.us/forums

    -Signed Cpt. Brenner
    NoobGalore Minecraft DEV Team
     
  22. Offline

    Jumla

    Hey, will these plugin be updated to 1.2? Sorry to ask-It's pretty essential for our server.
     
  23. Offline

    Krunal

    This is the only kick/ban plugin I enjoy using. Many of the other ones don't work properly or are over-featured. Please update :)
     
  24. Offline

    grandwazir

    Thanks for the feedback. BanHammer has been ready for the update since 28th of January. As long as you are using a version >= 1.70 it will work fine.
     
  25. Offline

    frog

    I'm using RB1.1-R7 with PEX1.19.

    Just installed BanHammer 1.8.1 and the following appears on server launch. (See end for error)

    Code:
    10:57:25 [INFO] [BanHammer] Enabling BanHammer v1.8.1
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammerConfiguration> Registering ban limits
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammerConfiguration> Creating new ban limit warning with a maximum time of 1h (3600000).
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammerConfiguration> Creating new ban limit short with a maximum time of 1d (86400000).
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammerConfiguration> Creating new ban limit medium with a maximum time of 3d (259200000).
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammerConfiguration> Creating new ban limit long with a maximum time of 7d (604800000).
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.DatabaseHandler> Attempting to return records matching the class: name.richardson.james.bukkit.banhammer.BanRecord
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.DatabaseHandler> class name.richardson.james.bukkit.banhammer.BanRecord
    10:57:25 [INFO] [BanHammer] 0 banned names loaded.
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.ban (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.ban.* (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.ban.warning (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.ban.short (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.ban.medium (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.ban.long (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.kick (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.pardon (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.pardon.* (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.pardon.all (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.check (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.export (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.history (default: true)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.history.* (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.history.others (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.import (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.limits (default: true)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.purge (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.recent (default: op)
    10:57:25 [FINE] <name.richardson.james.bukkit.banhammer.BanHammer> Adding permission: banhammer.reload (default: op)
    10:57:25 [SEVERE] Error occurred while enabling BanHammer v1.8.1 (Is it up to date?)
    java.lang.NullPointerException
            at name.richardson.james.bukkit.banhammer.BanHammer.registerCommands(BanHammer.java:205)
            at name.richardson.james.bukkit.banhammer.BanHammer.onEnable(BanHammer.java:171)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:336)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:363)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:250)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:232)
            at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:356)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:343)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:174)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    
     
  26. Offline

    P_S

    Hi, can you add ip to mysql with ban of name ??
     
  27. Offline

    Marko1000Marko

    Hey,can you update this to 1.2 please? Thanks!
     
  28. Offline

    joudar11

    Also works with my R5 bukkit. Great job by the way ;)

    It works with R5 bro'

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

    grandwazir

    I can not duplicate this on my server using the latest beta build. I will test and see if this happens with R7.
     
  30. Offline

    IOn Vash

    Is there a way to have this also ban by ip and not just by name?
     
  31. Offline

    Serilum

    I've got a self-made kick plugin, but this one overrides it. Can you show me where the kick-code is so I can remove it, or create an options to disable it?
     

Share This Page