LogBlock - Find and Backroll those Damn Griefers
Contents:
Description
Commands
Configuration
Installation
How to Find a Griefer
Downloads
FAQ
Future
Known Bugs
Screenshots
Discussion
Discussion
Special Thanks
Description:
LogLock logs block changes into a MySQL database. Block changes can be placed or destroyed block, explosions, burned blocks, sign text changes, chest access, leaves decay etc.
It can be used as griefer identification tool, to find out who build a particular building, or even roll back changes by certain players. Other purposes can be r.g. undoing of forest fires
All additional features are optional, to keep the database as short as possible. Nearly all database actions run in their own threads to avoid server lags.

The use of permissions plugin (or any clone) is possible, but not necessary.
Originally written by bootswithdefer for hMod

Video tuorial for old hMod LogBlock on Youtube Link
MySQL tuorial Link
LogBlock installation tutorial (Ger) Link
Commands:
Parameters in brackets [] are required, the ones in <> are optional.
/lb Displays players and number of blocks they've modified within default-distance blocks around you
/lb world Displays global block count for all players. Actually an alias for "/lb area 32767".
/lb area [radius] Like "/lb" but displays within [radius] distance instead of default-distance
/lb player [name] <radius> Displays count of blocks for one player within radius or default-distance blocks around you
/lb block [type] <radius> Displays players who chaged type (may be number or name) blocks within radius or default-distance blocks around you
/lb rollback player [name] <time> <minutes|hours|days> Rolls back a player's edits
/lb rollback area [radius] <time> <minutes|hours|days> Rolls back all changes within radius for the specified time
/lb rollback playerarea [name] [radius] <time> <minutes|hours|days> Rolls back a player's edits within radius
/lb rollback selection <time> <minutes|hours|days> Rolls back all changes in a WorldEdit selection. This requires WorldEdit.
/lb me Displays your block created/destroyed counts. Actually an alias for "/lb player yourname".
/lb writelogfile [player] Write all action from player into a log file to "/plugins/LogBlock/log". The layout is similar to the message from the wood pickaxe. If no results were found, the og file will be empty
Configuration:
In "/LogBlock/config.yml":
driver Database driver
url JDBC url for database
username Database username
password Database password
delay Maximum time between transaction runs (seconds)
tool-id Right click with this tool to check block history (default wood pick)
tool-block-id Place this block to check block history (default adminium)
tool-block-remove Automatically remove the tool block on use (default true)
default-distance Default distance used in /lb commands
default-time Default time used in /lb rollback commands
usePermissions Toggles if LogBlock uses the Permission Plugin
keepLogDays Deletes log on each serverstart that is older than days to shrink the db. -1 to disable.
worldNames Names of the worlds you want to log. Seperate with ",", brackets are neccessary. First world usually names "world". Example: "worldNames : [world, nether]"
worldTables Tables, where you want to have the log. Seperate with ",", brackets are neccessary. Must specify a table for each world listed under worldNames. You can use the same table for each, but this doestnt make much sense.
logSignTexts Toggle logging of sign texts. (without
logExplosion Toggles logging of tnt and creeper explosions. Currently logged as player "environment".
logFire Toggle logging of burned blocks. Currently logged as player "environment".
logChestAccess Toggle logging of chest access. Currently logs only who opened a chest.
logLeavesDecay Toggle logging of leaves decay. Works only with standart leaves decay. Currently logged as player "environment".
logTNTExplosionsAs, logCreeperExplosionsAs, logFireAs, logLeavesDecayAs The names, environment actions are logged as. To use the old behavoir set them all to "Environment". The names can be changed, this won't break the log.
In "/Permissions/config.yml" (Permissions v2.0) resp. "/Permissions/%worldname%.yml" (Permissions 2.1):
'logblock.lookup' Lookup block history with woodpickaxe or bedrock block
'logblock.me' Access to "/lb me" command
'logblock.area' Access to "/lb area", "/lb player", "/lb block" and similar commands
'logblock.rollback' Access to "/lb rollback" and "/lb writelogfile" commands
Installation:
How to Find a Griefer:
Changelog/Downloads:
Source code at GitHub
When you are updating over multiple versions, you have to run the SQl tables update for each version. Download mysql-connector-java-bin.jar Required, put this in the same folder as craftbukkit.jar
SQL tables Link Only in case that you have troubles with auto table creation
BB -> LB converter (broken)Link In case you are switching from BB to LB and want to keep you log
Default config Link In case you dont want to restart you server for auto config cretation.
FAQ:

I got an error: "[LogBlock] SQL exception [...]: Unknown database '[...]'". What should I do?
Either change the url in the config to an existing db or create a new one called like the unknown in error message.

I got an error: "[LogBlock] Exception while creation database connection java.lang.ClassNotFoundException: com.mysql.jdbc.Driver". What should I do?
Either you didn't place the mysql-connector-java-bin.jar properly or you changed the driver config entry badly. Try redownloading the mysql-connector-java-bin.jar and place it in the same directory as craftbukkit.jar. If this doesn't solve the issue, open the config and delete the whole line with driver.

I got an error: "[LogBlock] SQL exception [...]: Communications link failure Last packet sent to the server was 0 ms ago.". What should I do?
LogBlock can't create a connection to the database. Check your config.

I got an error: "Could not load plugins/mysql-connector-java-bin.jar in plugins: null". What should I do?
Make sure you placed the mysql-connector-java-bin.jar not in the plugins folder, it should be placed in the same directory as the craftbukkit.jar

I got an error: "java.sql.SQLException: near "AUTO_INCREMENT"". What sould I do?
This is the same error like Unkown database. See above.

Is it possible to log action from a editor like WorldEdit?
No. These editor change the world right in the server without firing the hooks.

LogBlock doesn't log what someone took from a chest, only "player looked inside"!
This feature is planned, but bukkit doesn't provide the hooks at the moment.

Future:
Undo rollback
Griefer detection
Known Bugs:
Doesn't runs well with BB at the same time for some reason
Can cause server crash when logging a huge tnt explosion. Disable explosion logging to avoid.
Screenshots:
none
Discussion:
LogBlock @ hMod Forums Link
LogBlock @ Bukkit Forums Link
Special Thanks:
to bootswithdefer for the original LogBlock source code
to skilinium for testing and bug reports
to Edward Hand for giving the solution to the rollback crashs