}
}
private static final void mysqlFind(final Plugin plugin, final String playerName, final Location location, final int radius, final WorldManager manager, final ArrayList<Player> players) {
BBPlayerInfo hunted = BBUsersTable.getInstance().getUserByName(playerName);
PreparedStatement ps = null;
ResultSet rs = null;
HashMap<Integer, Integer> creations = new HashMap<Integer, Integer>();
HashMap<Integer, Integer> destructions = new HashMap<Integer, Integer>();
HashMap<Integer, Integer> explosions = new HashMap<Integer, Integer>();
HashMap<Integer, Integer> burns = new HashMap<Integer, Integer>();
Connection conn = null;
try {
conn = ConnectionManager.getConnection();
if(conn==null) return;
// TODO maybe more customizable actions?
String actionString = "action IN('" + Action.BLOCK_BROKEN.ordinal() + "', '" + Action.BLOCK_PLACED.ordinal() + "', '" + Action.LEAF_DECAY.ordinal() + "', '" + Action.TNT_EXPLOSION.ordinal() + "', '" + Action.CREEPER_EXPLOSION.ordinal() + "', '" + Action.MISC_EXPLOSION.ordinal() + "', '" + Action.LAVA_FLOW.ordinal() + "', '" + Action.BLOCK_BURN.ordinal() + "')";
ps = conn.prepareStatement("SELECT action, type FROM " + BBDataTable.getInstance().getTableName() + " WHERE " + actionString
+ " AND rbacked = 0 AND x < ? AND x > ? AND y < ? AND y > ? AND z < ? AND z > ? AND player = ? AND world = ? order by date desc");
ps.setInt(1, location.getBlockX() + radius);
ps.setInt(2, location.getBlockX() - radius);
ps.setInt(3, location.getBlockY() + radius);
ps.setInt(4, location.getBlockY() - radius);
ps.setInt(5, location.getBlockZ() + radius);
ps.setInt(6, location.getBlockZ() - radius);
ps.setInt(7, hunted.getID());
ps.setInt(8, manager.getWorld(location.getWorld().getName()));
rs = ps.executeQuery();
conn.commit();
int size = 0;