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

    angus22397

    thx =D
     
  3. Offline

    SquallSeeD31

    No problem! Let me know if it works and what CB build you tested it on, as that will help me integrate it into the main branch eventually. =)
     
  4. Offline

    angus22397

    cant test it right now but i will soon =D
     
  5. Offline

    AntonyDream

    I get this every time when plugin trying to save new warning to mysql
    b556
    Code:
    [SEVERE] [HeroicRebuke] Warning creation error: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'code' at row 1
    Ahh.. nevermind, I just set code more than 6 symbols ^^
     
  6. Offline

    Jinivus

    Does this work with the latest recommended(602)?
     
  7. Offline

    SquallSeeD31

    It does as of 1.2.5.

    To Antony: Sorry, that was a huge oversight on my part; I originally fixed code at 6 explicitly before opening up a configuration option to change it, and at that time I forgot to expand the column definition in the database. I'm used to high-load situations where you simply DON'T allow the field to be bigger than it absolutely has to be, but for most plugins' purposes, TEXT is a perfectly acceptable datatype. If you are comfortable with MySQL, you can fix it with the following statement: "ALTER TABLE warnings MODIFY code TEXT;"
     
  8. Offline

    untergrundbiber

    Can you add a comment function for admins?
    So i can make comments to user without they can see it.

    And support for language files would be very nice: D
     
  9. Offline

    SquallSeeD31

    I can look into both when the 1.4 transition has settled down a bit more.
     
  10. Offline

    untergrundbiber

    Thanks, that would be niceee :D
     
  11. Offline

    KrazyBonez

    I can not remove warnings, me and another admin warned each other to test it out, and now im unable to remove it

    I do /warn list name
    /warn info number
    /warn delete (whatever code:xxxxxx says)
    and i get this...

    Error: Bad number format. <index> must represent a valid index number

    I swear im doing it right...
     
  12. Offline

    SquallSeeD31

    It'd be /warn delete <number>

    The code is only for the user making their warning go away by acknowledging it (/warn acknowledge code).
     
  13. Offline

    iBstoneyDave

    The plugin seems to be fairly broken for me, these errors show up all the time:
    Code:
    14:33:37 [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
     14:33:37 [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
     14:33:37 [SEVERE]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
     14:33:37 [SEVERE]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
     14:33:37 [SEVERE]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
     14:33:37 [SEVERE]     at com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
     14:33:37 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
     14:33:37 [SEVERE]     at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
     14:33:37 [SEVERE]     at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebukeMySQL.createConnection(HeroicRebukeMySQL.java:39)
     14:33:37 [SEVERE]     at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebukeDatasource.getConnection(HeroicRebukeDatasource.java:18)
     14:33:37 [SEVERE]     at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebukeMySQL.<init>(HeroicRebukeMySQL.java:22)
     14:33:37 [SEVERE]     at com.herocraftonline.squallseed31.heroicrebuke.HeroicRebuke.onEnable(HeroicRebuke.java:120)
     14:33:37 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
     14:33:37 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:514)
     14:33:37 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:216)
     14:33:37 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:94)
     14:33:37 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:72)
     14:33:37 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
     14:33:37 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
     14:33:37 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
     14:33:37 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
     14:33:37 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     14:33:37 [INFO] [HeroicRebuke] No database enabled, warnings will not persist.
     14:33:37 [INFO] [HeroicRebuke] 1.2.6.86 enabled.
    All my servers plugins and version can be seen here:
    http://www.minewank.net/mcserver.html
     
  14. Offline

    Jonathan Bloom

    Can you integrate this with Essentials? So when you warn someone they are jailed at a specified jail?

    Jailing someone is less confusing than rooting their movements.
     
  15. Offline

    SquallSeeD31

    Which version of the MySQL JDBC do you have, what is it named, and where is it located in your server folder? Also, have you always had these errors, or has it connected just fine for you in the past?

    @Jonathan Bloom: I try to keep external dependencies to a minimum, but I can look into it.
     
  16. Offline

    iBstoneyDave

    I'm running JDBC 5.1.15, filename is 'mysql-connector-java-bin.jar'. Its located in the /lib directory in the root of my server (/lib is in the same directory as craftbukkit).
     
  17. Offline

    SquallSeeD31

    HeroicRebuke is built against 5.1.6, and I'll have to check the changelog, but I doubt there's substantial changes in those revisions that would merit an error of that nature. Still something worth looking into...

    In the meantime, the error that you're experiencing occurs when I create a connection to the MySQL database via a driver that has answered for MySQL. It's encountering a SQLException error, and then what's perplexing is that the error is coming from the driver itself, rather than HeroicRebuke.
     
  18. Offline

    iBstoneyDave

    Thanks for taking the time to reply dude, i've confirmed that it is the MySQL connector thats causing the problem with HB, when using sqlite it works fine. Howver the connector isn't causing any issues with iConomy or any other plugin using mysql unless HB is trying to use it too. Don't know if that helps or not.
     
  19. Offline

    SquallSeeD31

    I ran into a very unique issue with the way that most plugin developers were registering their drivers (simply using Class.forName(driver);) in HeroicRebuke: People who had the SQLite and the MySQL JDBC loaded were finding that HeroicRebuke was calling the MySQL connect string with the SQLite driver. WTF!!

    So I changed it to iterate over the list of drivers until it found one for MySQL, then explicitly calls that driver's connect method. I *also* use MySQL URI options, which is another difference from most plugins that use it. Personally, I don't like using a MySQL database for something so simple, but for reasons unknown the community tends to demand SQLite and MySQL support.
     
  20. Offline

    PatrickFreed

    what is the index number?
    edit: never mind, I found it. :p
     
  21. Offline

    VoidingNixx

    Nice plugin. But '/warn list <player>' is broken. In fact, /warn list itself is broken. I just warned myself, and it shows active warnings, but doesn't show any past warnings, even tho they are added into the database.

    **Just re-installed the plugin. Took care of the issue. Weird, because I only replaced with the exact same version.

    CB#670
     
  22. Offline

    SquallSeeD31

    Might have been a minor change in the database code; the symptoms you describe sound like what would happen if the database doesn't load: HeroicRebuke works, but doesn't persist.
     
  23. Offline

    VoidingNixx

    Ahh.. thanks. ;)
    Well, nice plugin. I'll just give it a couple swift kicks if it does that again. ^-^
     
  24. Offline

    Geoff Winans

    Recommendation:

    This plugin needs the ability to add warnings to offline players. Finding incidental griefs when they're offline is more common than not. Or finding out about other crap that happened when not around..

    Not being able to do so severely hampers the ability for this plugin to be truly effective. Enforce the no-movement when they login!
     
  25. Offline

    SquallSeeD31

    You actually can warn offline players, but the default behavior is to require them to be online for the benefit of matching their name to an existing player and allowing partial matches. So, to enable offline warning, set the "only_warn_online" config option to false.
     
  26. Offline

    Geoff Winans

    Weird. My config doesn't have that. Time to powerbomb the config and let it recreate it!
     
  27. Offline

    VoidingNixx

    When I issue a stop on the server, and while the server is shutting down... I receive the following message in the console...

    OK, so I restarted the server, and yet again, /warn list <player> is not showing players with warnings... and /warn active is not showing active warnings... I'm not sure if those got reset when the server rebooted or what... but neither of these are working properly... the information is in the database, but this plugin is not retrieving it... removing HeroicRebuke until it is more stable. Keep it up! I hope I can grab a version of this down the road which will work flawlessly for me.

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

    SquallSeeD31

    Yeah the NonTransientLinkException is a MySQL server error that many devs have encountered, but nobody knows exactly what causes it because it generally has to do with the configuration of that MySQL server.
     
  29. Offline

    VoidingNixx

    Thanks for the response, SquallSeeD31.

    Hmm... well, my MySQL server is a standard setup, nothing special. Pretty much basic, with some tweaks for user privileges. I hope it is resolved in the future, because I would rather use the database than using a flat file. If this is a problem which isn't in your code and is caused more-so by MySQL, my apologies.

    Hopefully, later down the road, whatever is causing this problem is found, so plugins like this will work fully using MySQL. I will be waiting for that day. ;)

    Other than that, everything else about this plugin is nice. It worked superbly, when it did work. Keep it up! I'll follow your updates and add this back onto my server when I see I can run it.

    *edit
    I'm not sure if this would be a problem or not, but my databases all use underscores in their naming. ie. (user name)_plugin_hr, was how this database was named. Just throwing out an idea. I recently had an Apache problem caused by long names and spacing. ;p
     
  30. Offline

    crysis992

    It would be awesome when you could add these features:
    If a user has reached x amount of warnings he get kicked from the server.
    If a user reach x amount of warnings he get banned from the server.

    Warnings clear after 24 hours.

    example:
    /warn crysis992 Stop it
    Message: You have now 1/5 warnings blablabla

    /warn crysis992 Stop it, i warned you.
    Message: You have now 3/5 warnings
    autokick username with the reason.

    Also the warn message should be serverwide and not only a personal message to the player.
    These features would be awesome.
     
  31. Offline

    SquallSeeD31

    I actually have an experimental feature in the live build that you can activate to ban people after a certain limit. It's tested, but I want to get some more testing before I call it stable and mark it as public.

    To turn it on, set the "ban.enable" config option to true, "ban.threshold" to the number of warns you'd like to ban them after, and "ban.message" to the message you'd like to send them when they are banned.
     

Share This Page