This is a merge commit of a PR that introduces Velocity support.
Some of this support has been ported to APF already and will be removed after merge.
Thanks to Micklebrick and astei! :)
Database was not enabled when the call was made, leading to a NPE when
using MySQL. (DataSource not initialized)
Fixed by moving the calls to scheduled tasks inside TaskSystems.
Some features could not be implemented or will have reduced precision:
- Server type
- Players Online is deduced from TPS data
- Analysis Refresh date is now a true/false based on cache value
Compile issues were caused by recent changes in APF:
* ISender -> Sender rename
* BukkitCMDSender was in use in test, but was made package private.
Fixes:
* Replaced ISender -> Sender
* Replaced BukkitCMDSender use in MiscUtilsTest
* Moved two database tests out from MiscUtilsTest
Session#getLongestWorldPlayed was a violation of Single Responsibility
Principle.
The method was moved to WorldAliasSettings, although still a violation,
it makes more sense there than inside the Session class. It also allows
creation of Session without a WorldAliasSettings dependency.
Most uses of this method were already handled, but database related were
not. Dependency was met by adding a Supplier<UUID> to SQLDB class.
Patch and Table classes have getServerUUID() method that use supplier in
SQLDB.
UserImportDataBuilder required the dependency, and it was provided via
UserImportData#builder(UUID).
This exception was caused by analysisData being null during PluginData
analysis - This should not occur unless two analysis are being performed
concurrently & first analysis finishes and clears the variable.
Additional work is required for preventing two concurrent analysis.
Affected issues: #711
1 second delay is not enough when a patch system has not applied all
patches, and some data requiring patching is scheduled for removal.
Affected issues: #732
ErrorResponse caught an IOException for reading a file from the jar,
but this error should be moved further up stream - thus catching it was
delegated to ResponseFactory, where the error can be parsed into
InternalErrorResponse and dealt with accordingly.