Inactive [ADMN] HeroicRebuke v1.2.7 - Warn Players and Track Warnings [211~1060]

Discussion in 'Inactive/Unsupported Plugins' started by SquallSeeD31, Feb 13, 2011.

  1. Offline

    SquallSeeD31

    HeroicRebuke - Warn Players and Track Warnings (v1.2.7)
    Download HeroicRebuke 1.2.7 [CraftBukkit 561+]
    Download HeroicRebuke 1.2.4 [CraftBukkit 560-]
    SQLite | MySQL

    Latest Jar Only

    COMPATIBILITY UPDATE: Due to recent changes in CraftBukkit version 561, all server admins upgrading to this version of CraftBukkit or higher will need to download HeroicRebuke 1.0.5 or higher. Server admins running CraftBukkit 560 and below should download HeroicRebuke 1.0.4, thank you for your understanding.

    HeroicRebuke allows the server admin and his designated moderators to Warn players for misbehaving and persistently track the warnings issued. This project was originally developed for the HeroCraft SMP server based on demand for a port of the "Warn" hey0 plugin by bootswithdefer. HeroicRebuke is an original creation extending that design with optional (but emphatically recommended) support for a lightweight SQLite database.

    Features
    • Warn players for lesser infractions not meriting a kick or ban
    • List a player's previous actions to track chronic violators
    • Supports partial name matching! (Squall, ed3, and LLSEE all match SquallSeeD31)
    • Supports SQLite or MySQL
    • Warnings can optionally root players, preventing all movement (including teleports)
    • Acknowledging your warning can optionally require a randomly-generated code, preventing automation and encouraging thorough review of the message
    • Commands can also be issued from the server console
    • Support for Permissions plugin, defining your own list of admins or just using Server Ops
    • Configurable display colors for messages, names, and key information
    Screenshots


    Help Interface
    [​IMG]

    Warning List for a Given Player
    [​IMG]

    Player Receiving a Warning
    [​IMG]

    Active Warnings List
    [​IMG]


    Installation

    HeroicRebuke works best with a database (SQLite or MySQL). The plugin is configured to look for the database connector "sqlitejdbc-v056.jar" (SQLite) or "mysql-connector-java-bin.jar" (MySQL) in the "/lib" directory of your server root. If you already have these files, you do not need to re-download them.
    1. Download latest .ZIP archive from the link at the top
    2. Extract the archive into your main server directory (archive contains directory mapping)
    3. Open /plugins/HeroicRebuke/config.yml and configure to taste
    4. Save configuration file and reload your server
    Using MySQL
    1. Check to be sure "mysql-connector-java-bin.jar" is in /lib (from server root)
    2. Set options.database to "mysql" in your config.yml
    3. Set options.mysql.location to the path (IP:port/DatabaseName) to your MySQL server
      1. It is not necessary to create a new Database for HeroicRebuke, but is recommended. The only table created currently is "warnings"
    4. Set options.mysql.username to a username that has access to the named Database on your MySQL server
    5. Set options.mysql.password to that user's password
    6. Save config.yml and reload your server
    Configuration

    config.yml
    The config file contains default text colors, options, and designated HeroicRebuke admins (if not using the Permissions plugin).

    This file is saved in the YAML format, so please be sure to maintain the formatting and change only the element values.
    Default configuration:

    Show Spoiler
    Code:
    # HeroicRebuke Configuration
    ## Color options
    ## message: Text color of all notifications, wrapped around info and names.
    ## name: Color for player names.
    ## info: Color for informational elements to make them "pop", such as command usage
    #Color is defined according to the Bukkit enum ChatColor
    #Acceptable entries:
    ##BLACK
    ##DARK_BLUE
    ##DARK_GREEN
    ##DARK_AQUA
    ##DARK_RED
    ##DARK_PURPLE
    ##GOLD
    ##GRAY
    ##DARK_GRAY
    ##BLUE
    ##GREEN
    ##AQUA
    ##RED
    ##LIGHT_PURPLE
    ##YELLOW
    ##WHITE
    #
    #If color entered is inappropriate, HeroicRebuke will default to the following values:
    ##message: RED
    ##name: DARK_AQUA
    ##info: GOLD
    colors:
        message: RED
        name: DARK_AQUA
        info: GOLD
    
    #Options:
    ##database:
    ##ACCEPTABLE VALUES:
    ###sqlite - Expects "sqlitejdbc-v056.jar" in the "/lib" directory of your server root, and uses SQLite.
    ###mysql - Expects "mysql-connector-java-bin.jar" in the "/lib" directory of your server root, and uses MySQL. MUST configure options.mysql section for this to work
    ###<anything else> - HeroicRebuke will not use a database and no data will persist
    ##permissions: String containing which permissions system to use.  Acceptable values:
    ###Permissions - Nijikokun's Permissions plugin
    ###Config - Define your own HeroicRebuke admins below under the "admins:" property
    ###Ops - Only Server Ops can use HeroicRebuke (Ops can use HeroicRebuke anyway regardless of setting)
    ##code:
    ###use: If true, a random alphanumeric code will be generated on warning, preventing users from automating the /warn acknowledge command.
    ###length: Length of random code string to use
    ##server_name: Name to display when warnings are issued from the server console
    ##block_move: Whether or not to restrict a user from moving (and teleporting) when being warned.  Move block is aggressive.
    ##only_warn_online: If true, you can only warn players who are online (enables partial matching)
    ##lines_per_page: How many warnings to display when using /warn active and /warn list commands
    ##timeformat: Uses format strings from Java SimpleDateFormat.  Read all here: http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html
    ##MySQL - If using "database: mysql", you must define the location, username and password to your MySQL server
    ###location: IP:PORT/DATABASE
    ###username: Self-explanatory
    ###password: Self-explanatory
    options:
        database: sqlite
        permissions: permissions
        code:
            use: true
            length: 6
        server_name: SERVER
        block_move: true
        only_warn_online: true
        lines_per_page: 4
        timeformat: MM/dd/yyyy HH:mm:ss z
        mysql:
            location: localhost:3306/HeroicRebuke
            username: root
            password:
    
    #If you want to use the "Config" permissions system, define your admins here
    #Each line below "admins:" *MUST* be formatted as such-> "    - 'username'"
    #Four spaces, hyphen, space, single quote, name of the admin, single quote
    admins:


    Admin Definition Example:
    Show Spoiler
    Code:
    admins:
        - 'SquallSeeD31'
        - 'DThielke'
        - 'Kainzo'
    


    Permissions
    Code:
    heroicrebuke.add (use /warn add)
    heroicrebuke.clear (use /warn clear)
    heroicrebuke.delete (use /warn delete)
    heroicrebuke.active (use /warn active)
    heroicrebuke.info (use /warn info)
    heroicrebuke.list (use /warn list - Displays only YOUR previous warnings)
    heroicrebuke.list.others (use /warn list <name> to display OTHER players' warnings)
    Recommended Settings:
    Admins:
    - 'heroicrebuke.*'

    Players:
    - 'heroicrebuke.list'

    Moderators:
    - 'heroicrebuke.add'
    - 'heroicrebuke.clear'
    - 'heroicrebuke.active'
    - 'heroicrebuke.info'
    - 'heroicrebuke.list.others'

    Changelog (Download Full Changelog)

    Version 1.2.7
    • Updated listener to use PlayerMoveEvent.setTo for the "bind" effect.
    Version 1.2.6
    • Updated to 617, added author to plugin.yml
    Version 1.2.5
    • Updated to Recommended Build 600/602
    • Changed type of code column to TEXT
    Version 1.2.4
    • Bugfix: Fixed potential NullPointerException in /warn clear command.
     
    wassilij, Killie01 and dark_hunter like this.
  2. Offline

    maxsteele

    Are you planning on adding MySQL support?

    I would install this if it was using MySQL. SQLLite really starts bogging down a server when it's used frequently, and the more plugins you have using SQLLite, the slower it goes.
     
  3. Offline

    Kainzo

    We may have MySQL Support in the future.
     
  4. Offline

    majorcyto

    I love you guys over at herocraft you release such innovative and helpful plugins x.x i think im using every released herocraft plugin at the moment. xD

    I have 60+ active users so all these plugins are usually helpful/right up my alley.
     
  5. Offline

    Kainzo

    I'm very glad you like our work :) feel free to leave good feedback and let us know of any bugs so we can hammer them out.
    --- merged: Feb 13, 2011 7:13 PM ---
    We're a big server and we usually code in the theory of big server use.
     
  6. Offline

    majorcyto

    You didnt include what the permissions were for the permissions system. :[
     
  7. Offline

    SquallSeeD31

    You... are absolutely right!

    My bad. That's what I get for releasing product at 4 in the morning.
    --- merged: Feb 13, 2011 8:20 PM ---
    MySQL support is absolutely a TODO for me; I wanted to get the plugin up and running now for admins that want to start using it with SQLite (this plugin is written for the HeroCraft server first), then go back and add MySQL support in the future for those who have it available/prefer to use it.

    This plugin was already delayed when I made Permissions optional at the last minute; I didn't want to delay it further to post an initial release with MySQL, but it is coming. With that being said, HeroicRebuke does attempt to minimize queries to the DB by checking its active (loaded into memory) warnings first, and storing the results of a query resulting in pagination to memory so that the DB isn't queried for each page request.

    Thanks for the feedback!
     
  8. Offline

    majorcyto

    Thanks Squall! <3
     
  9. Offline

    SquallSeeD31

    MySQL support added in version 1.1.0, please let me know if you find any bugs with it as I haven't used MySQL in a number of years. I tested all the core features under craftbukkit bamboo builds 211 and 302, but did not get a chance to put it through a proper stress test.
     
  10. Offline

    Kainzo

    Just in time! we're now using mysql!
     
  11. Offline

    SquallSeeD31

    Server Admins: If you're using a more recent build of CraftBukkit (since they moved to Jenkins 45+, or 400+), update to 1.2.1 to remove the nag-message about the stupidly long constructor.
     
  12. Offline

    RagingMonocle

    Is this usable with 1.3 and b432?
     
  13. Offline

    SquallSeeD31

    I haven't explicitly tested it against 432, but as long as you're using v1.2.1 it *should* work.
     
  14. Offline

    seriosbrad

    In my case with B1.3 and 432:
    Code:
    2011-02-23 20:50:43 [SEVERE] java.lang.ClassNotFoundException: com.mysql.jdbc.Dr
    iver
    2011-02-23 20:50:43 [SEVERE]    at java.net.URLClassLoader$1.run(Unknown Source)
    
    2011-02-23 20:50:43 [SEVERE]    at java.security.AccessController.doPrivileged(N
    ative Method)
    2011-02-23 20:50:43 [SEVERE]    at java.net.URLClassLoader.findClass(Unknown Sou
    rce)
    2011-02-23 20:50:43 [SEVERE]    at org.bukkit.plugin.java.PluginClassLoader.find
    Class(PluginClassLoader.java:30)
    2011-02-23 20:50:43 [SEVERE]    at java.lang.ClassLoader.loadClass(Unknown Sourc
    e)
    2011-02-23 20:50:43 [SEVERE]    at java.lang.ClassLoader.loadClass(Unknown Sourc
    e)
    2011-02-23 20:50:43 [SEVERE]    at java.lang.Class.forName0(Native Method)
    2011-02-23 20:50:43 [SEVERE]    at java.lang.Class.forName(Unknown Source)
    2011-02-23 20:50:43 [SEVERE]    at com.herocraftonline.squallseed31.heroicrebuke
    .HeroicRebukeMySQL.createConnection(HeroicRebukeMySQL.java:25)
    2011-02-23 20:50:43 [SEVERE]    at com.herocraftonline.squallseed31.heroicrebuke
    .HeroicRebukeDatasource.getConnection(HeroicRebukeDatasource.java:18)
    2011-02-23 20:50:43 [SEVERE]    at com.herocraftonline.squallseed31.heroicrebuke
    .HeroicRebukeMySQL.initDB(HeroicRebukeMySQL.java:40)
    2011-02-23 20:50:43 [SEVERE]    at com.herocraftonline.squallseed31.heroicrebuke
    .HeroicRebuke.onEnable(HeroicRebuke.java:118)
    2011-02-23 20:50:43 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(
    JavaPlugin.java:140)
    2011-02-23 20:50:43 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.enabl
    ePlugin(JavaPluginLoader.java:426)
    2011-02-23 20:50:43 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.enableP
    lugin(SimplePluginManager.java:187)
    2011-02-23 20:50:43 [SEVERE]    at org.bukkit.craftbukkit.CraftServer.loadPlugin
    (CraftServer.java:76)
    2011-02-23 20:50:43 [SEVERE]    at org.bukkit.craftbukkit.CraftServer.loadPlugin
    s(CraftServer.java:57)
    2011-02-23 20:50:43 [SEVERE]    at net.minecraft.server.MinecraftServer.e(Minecr
    aftServer.java:187)
    2011-02-23 20:50:43 [SEVERE]    at net.minecraft.server.MinecraftServer.a(Minecr
    aftServer.java:174)
    2011-02-23 20:50:43 [SEVERE]    at net.minecraft.server.MinecraftServer.d(Minecr
    aftServer.java:120)
    2011-02-23 20:50:43 [SEVERE]    at net.minecraft.server.MinecraftServer.run(Mine
    craftServer.java:227)
    2011-02-23 20:50:43 [SEVERE]    at net.minecraft.server.ThreadServerApplication.
    run(SourceFile:366)
    2011-02-23 20:50:43 [SEVERE] null (Is it up to date?)
    java.lang.NullPointerException
            at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebukeMySQL.initD
    B(HeroicRebukeMySQL.java:41)
            at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebuke.onEnable(H
    eroicRebuke.java:118)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:426)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:187)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:76)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:57)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  15. Offline

    SquallSeeD31

    Actually in your case it looks like a missing DB connector (and my fault for not catching the exception for MySQL). Make sure that "mysql-connector-java-bin.jar" is in /lib (from the server folder). You can grab that connector here if you don't have it.

    EDIT: I take it back, I *did* catch the exception and printed the stacktrace; I guess I forgot to print a pretty message. So, my bad anyway.
     
  16. Offline

    seriosbrad

    I've got it, I'm testing localhost to my remote database host so that might be the problem. Although, BigBrother works using the same method to connect to my database.... (local > remote) hmm.
     
  17. Offline

    SquallSeeD31

    I hate to ask again, but are you sure the exact file name "mysql-connector-java-bin.jar" is in a folder named "lib" that's located in your server root? Plugins are very specific about where they expect their DB connectors to be, and unfortunately we (plugin developers) don't have a universal standard for where to put them. So even if you've downloaded "the mysql connector" before, I've told HeroicRebuke to expect it in that exact spot.

    The only reason I bring it up is that I haven't heard any incompatibility reports with 432 yet, and I did actually get a chance just now to go in and check it with SQLite and MySQL.
     
  18. Offline

    Kainzo

    Will need to get this up to speed soon ;)
     
  19. Offline

    SquallSeeD31

    I tested it successfully in 440 and 493 myself under MySQL and SQLite, so at this point I would need to receive the usual reports from end users in order to determine what compatibility issues may exist with other systems.
     
  20. Offline

    Kainzo

    Just update the post if its 493 usable - I'm about to test it in our set up.
     
  21. Offline

    Matthew Bourdon

    I like this plugin. Ima scare me some noobs lol
     
  22. Offline

    seriosbrad

    @SquallSeeD31

    Hey, I just checked up on my MySQL database to look at the warnings, and noticed newer ones weren't being stored. So I gave myself a warning and watched the console output to see this:

    Also, when acknowledging the warn:

    Using CB 440 now
     
  23. Offline

    SquallSeeD31

    Surprisingly enough, I encountered this issue myself with another plugin in the past, so I actually know how to fix it now. The stacktrace in your case is far more useful than it was in my case, though. :p

    What's happening here is that MySQL has a configuration variable called "wait_timeout" that stores how long it will wait for a non-interactive connection before automatically closing it. By default, this is set to 28800 seconds (8 hours). If you don't warn people or list warnings very often, and your server is always on, it's very likely that you could exceed this amount. In your case, the stacktrace shows that the last transaction occurred 90780 seconds ago (just over a day).

    So you can either increase wait_timeout on your MySQL server, interact with the plugin (or reload plugins) on a set schedule that's under wait_timeout, or try out HeroicRebuke 1.2.3 that I just released which specifies the autoReconnect=true option. I haven't tested whether or not this solves the CommunicationsException, so it may be a good idea to increase your wait timeout anyway to avoid issue.
     
    seriosbrad likes this.
  24. Offline

    seriosbrad

    Thanks for the info! Will try out both options and let you know how it works out.
     
  25. Offline

    Lunar Delta

    I've been getting a ton of:

    Code:
    14:52:39 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'warn
    ' in plugin HeroicRebuke v1.2.3.78
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    83)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:619)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:582)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:576)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
            at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebuke.onCommand(
    HeroicRebuke.java:246)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    14:52:45 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'warn
    ' in plugin HeroicRebuke v1.2.3.78
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    )
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    83)
            at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:619)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:582)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:576)
            at net.minecraft.server.Packet3Chat.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
            at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebuke.onCommand(
    HeroicRebuke.java:246)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    >
    With the latest version and CB 522.[/code]
     
  26. Offline

    SquallSeeD31

    Fixed in 1.2.4, sorry for the inconvenience! (specifically occured with a case-sensitivity issue)
     
  27. Offline

    dslip

    Author,

    Please support the auto-updating plugin CraftBukkitUpToDate.
     
  28. Offline

    SquallSeeD31

    All of my plugins have always been permanent-linked and wget-friendly, but I went ahead and posted those permanent links on the author's thread.
     
  29. Offline

    Hoddie54

    Code:
    2011-03-12 07:34:17 [INFO] [PLAYER_COMMAND] Hoddie54: /plugin load HeroicRebuke
    2011-03-12 07:34:18 [SEVERE] [HeroicRebuke] Error connecting to MySQL Database: java.lang.IllegalAccessError: tried to access method com.mysql.jdbc.SQLError.get(Ljava/lang/String;)Ljava/lang/String; from class com.mysql.jdbc.MysqlIO
    2011-03-12 07:34:18 [SEVERE] java.sql.SQLException: java.lang.IllegalAccessError: tried to access method com.mysql.jdbc.SQLError.get(Ljava/lang/String;)Ljava/lang/String; from class com.mysql.jdbc.MysqlIO
    2011-03-12 07:34:18 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
    2011-03-12 07:34:18 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    2011-03-12 07:34:18 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
    2011-03-12 07:34:18 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
    2011-03-12 07:34:18 [SEVERE] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
    2011-03-12 07:34:18 [SEVERE] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
    2011-03-12 07:34:18 [SEVERE] at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebukeMySQL.createConnection(HeroicRebukeMySQL.java:39)
    2011-03-12 07:34:18 [SEVERE] at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebukeDatasource.getConnection(HeroicRebukeDatasource.java:18)
    2011-03-12 07:34:18 [SEVERE] at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebukeMySQL.<init>(HeroicRebukeMySQL.java:22)
    2011-03-12 07:34:18 [SEVERE] at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebuke.onEnable(HeroicRebuke.java:109)
    2011-03-12 07:34:18 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    2011-03-12 07:34:18 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
    2011-03-12 07:34:18 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    2011-03-12 07:34:18 [SEVERE] at com.earth2me.essentials.commands.Commandplugin$1.run(Commandplugin.java:115)
    2011-03-12 07:34:18 [SEVERE] at java.lang.Thread.run(Thread.java:636)
     
  30. Offline

    SquallSeeD31

    Do you have the file "mysql-connector-java-bin.jar" in the /lib directory of your server's root directory?
     

Share This Page