mcMMO-Dev/mcMMO — pull request #1333 by riking (2013-08-01 00:03:39+00:00)
Title: Implement checkStructure() in FlatfileDatabaseManager, improve purge

Summary of changes:
* Old algorithm for flatfile purge is restored, with `OfflinePlayer` being used as an added backup method if the number is unparsable.
* If that backup method is triggered, the line will be rewritten in the database so that we don't need to use OfflinePlayer again next time.
* The flatfile `checkStructure()` TODO section is implemented. First, a colon is put on the end if there isn't one there already (something only possible from someone manually editing the file). If the length is greater than our maximum addressed item, it is passed over, otherwise, repair begins.
* A chained series of if's begin. Each one is an entry point, and if one is satisfied, all of its successors are satisfied too. The first one entered sets `oldVersion`, which will be output in the log, unless output is not set to true, which is currently done for only the most recent change.
* Each if appends some text to the end of the line representing a default value for the new field, always ending in a colon.
* A message is output to the server log (unless it was only a suppressed-message change) and the new line is written to the database.