Player Analytics plugin for Minecraft Server platforms (Bukkit/Sponge/Nukkit/BungeeCord/Velocity) - View player activity of your server with ease. 📆
Go to file
Risto Lahtela 802f0749eb
[Merge][#638] DataExtension API (#987)
* Plan api module

* Information annotations for DataExtension API

* Added BooleanProvider annotation

* Added NumberProvider

* Added DoubleProvider

* Added PercentageProvider

* Added StringProvider

* Retention and Target to Providers

* Validation class for annotations

* Refactored ExtensionExtractor, Added Group parameter

* Method names used as provider identifiers

* Begun work on extracting data providers

* Provider Extraction + priority to Providers:

Implemented methods for extracting each kind of Provider annotation
related method information to a DataProvider.

DataProviders required some duplicate code due to type erasure of the
parameter class.

----

Added Display-priority to Providers, highest value is placed top most.

InvalidateMethod annotations are now extracted.

* Small amount of code cleanup

* Storage of plugin info, icon and tabs of DataExtension

* Simplified Provider method calling:

- Added an enum for each method kind
  - Moved parameter resolution to the end of the chain, right before
    invoking the method.
  - The enum is used for storage in DataProviders for easier access.
- ProviderInformation created as early as possible

* Player data gathering for all providers:

- Incremental condition resolution of BooleanProvider conditions
- Gathering of Number and String values
- Gathering and disambiguation between double and percentage providers.

* Storage of Provider icons

* String provider extra info

* plan_extension_providers table information

* plan_extension_user_values table information

* BooleanProvider store transaction

* NumberProvider store transaction

* StringProvider store transaction

* DoubleProvider, PercentageProvider store transaction

* Boolean result store transaction

* Double result store transaction

* Number result store transaction

* Percentage result store transaction

* String result store transaction

* Transaction for removing invalid providers from storage

* Interface for registering DataExtensions

* ExtensionService implementation

* Handling of by default empty annotation values

* Extension table create table statements

* Annotation String length enforcement:

- Description is 150 characters max, truncated
- Others are 50 characters max, truncated
- StringProvider value is 50 characters max, truncated

* Logging of implementation mistake warnings

* Added 'extensions' module:

- Module is in charge of registering built in DataExtensions
- This is done via ExtensionRegister

* Config enable check for DataExtension registration

* Fixed Extension SQL syntax errors

* Debug logging of DataExtension registration

* Extension data updating to login listeners

* Fix Extension SQL Syntax errors related to id selection

* Fixed many Extension Provider store errors

* Data objects for extension data about a player

These objects make it easier to construct query data from database.

* Fix flipped double and percentage storage transactions

* getByName to Extension enums

* Query for DataExtension data of a single player

* Deprecated player plugin tab related things

* DataExtension API player page plugin tab generation

* Registered AdvancedBan extension

* Added BooleanProvider#hidden

* Added Conditional#negated

* Added booleans to PluginInfo for controlling method calls.

* Bump extension API to 0.0.2

* Extract method call booleans from PluginInfo

* Added flow for Negated conditions

Negated conditions' names are prefixed with not_

This allows checking against negated Conditionals and does not need
adding more table rows.

* Registered BanManager Extension

* Transaction for removing unsatisfied Conditional data:

This is one of the most complex queries I have made.

- Select all fulfilled conditions for all players (conditionName when
  true and not_conditionName when false)
- Left join with player value & provider tables when uuids match, and
  when condition matches a condition in the query above.
- Filter the join query for values where the condition did not match
  any provided condition in the join (Is null)
- Delete all player values with IDs that are returned by the left join
  query after filtering

In addition:
- Added test for the transaction
- Added extension data removal to RemoveEverythingTransaction
- Added unregister method to ExtensionService

* Reverse table names since MySQL can not select and update:

More information
https://stackoverflow.com/questions/4429319/you-cant-specify-target-table-for-update-in-from-clause

Attempts to fix:
'You can't specify target table 'plan_extension_user_values' for update
in FROM clause'

* Nest query since MySQL can not select and update:

More information
https://stackoverflow.com/a/9843719

Attempts to fix:
'You can't specify target table 'plan_extension_user_values' for update
in FROM clause'

* Added missing "as ..." to the query:

Attempts to fix
"Every derived table must have its own alias"

* Added comment about nested query

* Implemented BooleanProvider hidden parameter

* Bump extension versions

* Registered DiscordSRV extension

* Fixing some new code smells:

Critical:
- String literal duplication fixed in a few places
- Cognitive complexity reduced in BooleanProviderValueGatherer

Major:
- Called Optional#isPresent before accessing value
  16 instances in ProviderTransactions
- private constructor to Extension tables
- Missing deprecated tags to deprecated plugin tab stuff
- Unused class variable removal
- Throw dedicated exceptions in ServerServerInfo
- Unused method removal

Minor:
- Renamed 'API' field to 'service' in ExtensionService
- Unused variable removal

* Fix SQL error introduced when 'hidden' was added

* Color replacement to StringProvider values

* Gatherer methods for server providers

* Storage for extension server data

* Moved some results classes around

* ExtensionServerData class

* Fixed ConfigReader sometimes adding empty string to a null value.

* ExtensionServerDataQuery + BooleanAggregateQuery:

- Queries plan_extension_server_values

- Queries plan_extension_player_values for aggregates

* More Aggregate Queries

* Server ExtensionData visualization

* Network ExtensionData visualization

* Removed date values from number aggregate query

* Registered Essentials extension

* Registered Sponge Economy Extension

* Removed update booleans from PluginInfo

* More flexible definition of calling Extension methods

* Implemented Caller and CallEvents filtering

* Implemented Extension player method calls

* CallEvents.SERVER_EXTENSION_REGISTER call

* CallEvents.SERVER_PERIODICAL calls

* Updated extension versions

* Updated Essentials extension

* Fixed 'sponge' module test errors

* Fix some code smells

* Fixed Transaction#executeOther when using dbType

* Fixed Aggregate label issues

* TableContainer no longer displays 'null'

* '(Legacy)' added to PluginData tabs
2019-03-31 15:59:35 +03:00
.github/ISSUE_TEMPLATE Update issue templates (#696) 2018-08-23 08:53:54 +03:00
docs Fixed plan.inspect and plan.qinspect permission nodes for Sponge 2018-09-06 16:34:33 -04:00
Plan Fix another bad merge 2019-03-31 15:47:36 +03:00
PlanPluginBridge Bump nucleus-api from 1.9.1-S7.1 to 1.9.2-S7.1 in /PlanPluginBridge 2019-03-21 05:45:06 +00:00
scripts Added 'set -e' to test scripts to exit correctly 2019-01-04 17:18:35 +02:00
.gitattributes :octocat: Added .gitattributes 2016-12-08 19:28:26 +02:00
.gitignore Added gradle out/ folder to gitignore 2019-01-03 12:38:37 +02:00
.travis.yml Update .travis.yml 2019-01-27 11:31:38 +02:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2017-10-09 13:07:37 +03:00
CONTRIBUTING.md Update CONTRIBUTING.md 2017-10-24 11:38:52 +03:00
LICENSE [Merge] Changing license from proprietary to LGPLv3 2018-10-28 08:59:38 +02:00
README.md Updated build status badge 2019-01-20 13:05:56 +02:00
versions.txt Update versions.txt 2019-03-06 10:24:37 +02:00

Player Analytics

Build Status Discord Quality Gate
Maintainability Lines of Code Code coverage Duplicate lines Code Smells

Player Analytics is a Bukkit plugin that gathers data about player activity & displays that data on an internal webserver. Originally the plugin only displayed data of other plugins, but now it gathers it's own data, while displaying data from various other plugins.

Image

Documentation

Documentation can be found On the Wiki

Used Libraries