Commit Graph

3450 Commits

Author SHA1 Message Date
Risto Lahtela
1dcae30d67
[Merge][#638] Plan API 0.0.4, Tables for DataExtensions (#1010) 2019-04-14 10:31:30 +03:00
dependabot[bot]
ded89b9d8c Bump mockito-core from 2.26.0 to 2.27.0 in /Plan
Bumps [mockito-core](https://github.com/mockito/mockito) from 2.26.0 to 2.27.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.26.0...v2.27.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-11 07:14:04 +00:00
dependabot[bot]
a118d14a06 Bump mockito-junit-jupiter from 2.26.0 to 2.27.0 in /Plan
Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 2.26.0 to 2.27.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.26.0...v2.27.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-11 06:16:40 +00:00
Rsl1122
473dd7e404 Bump org.sonarqube plugin to v2.7 2019-04-10 11:19:38 +03:00
dependabot[bot]
021c3e19c9 Bump junit-platform-runner from 1.4.1 to 1.4.2 in /Plan
Bumps [junit-platform-runner](https://github.com/junit-team/junit5) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 08:57:13 +00:00
dependabot[bot]
aed1c8f356 Bump junit-jupiter-params from 5.4.1 to 5.4.2 in /Plan
Bumps [junit-jupiter-params](https://github.com/junit-team/junit5) from 5.4.1 to 5.4.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.4.1...r5.4.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 08:40:16 +00:00
dependabot[bot]
1f24c554f5 Bump mockito-core from 2.25.1 to 2.26.0 in /Plan
Bumps [mockito-core](https://github.com/mockito/mockito) from 2.25.1 to 2.26.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.25.1...v2.26.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 08:21:18 +00:00
dependabot[bot]
9ad80b529d Bump dagger-compiler from 2.21 to 2.22.1 in /Plan
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.21 to 2.22.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.21...dagger-2.22.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 08:15:23 +00:00
dependabot[bot]
29a48133bb Bump mockito-junit-jupiter from 2.25.1 to 2.26.0 in /Plan
Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 2.25.1 to 2.26.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v2.25.1...v2.26.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 07:55:23 +00:00
dependabot[bot]
0872a09c6c Bump junit-jupiter-engine from 5.4.1 to 5.4.2 in /Plan
Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.4.1 to 5.4.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.4.1...r5.4.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 07:29:22 +00:00
dependabot[bot]
b44934f962 Bump junit-vintage-engine from 5.4.1 to 5.4.2 in /Plan
Bumps [junit-vintage-engine](https://github.com/junit-team/junit5) from 5.4.1 to 5.4.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.4.1...r5.4.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 06:32:59 +00:00
dependabot[bot]
b06eb86dd8 Bump dagger from 2.21 to 2.22.1 in /Plan
Bumps [dagger](https://github.com/google/dagger) from 2.21 to 2.22.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.21...dagger-2.22.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 06:25:30 +00:00
dependabot[bot]
7fd8706722 Bump dagger from 2.21 to 2.22.1 in /PlanPluginBridge
Bumps [dagger](https://github.com/google/dagger) from 2.21 to 2.22.1.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.21...dagger-2.22.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 06:17:20 +00:00
dependabot[bot]
bd1fcf00ad Bump luckperms-api from 4.3 to 4.4 in /PlanPluginBridge
Bumps [luckperms-api](https://github.com/lucko/LuckPerms) from 4.3 to 4.4.
- [Release notes](https://github.com/lucko/LuckPerms/releases)
- [Commits](https://github.com/lucko/LuckPerms/compare/v4.3...v4.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-08 06:11:10 +00:00
Rsl1122
e18bf38637 Added a CapabilityService to api module 2019-04-07 13:45:44 +03:00
Risto Lahtela
c25fa693c6
Update CONTRIBUTING.md 2019-04-07 11:03:02 +03:00
Risto Lahtela
d127030616
Update versions.txt 2019-04-07 09:23:06 +03:00
Risto Lahtela
e1b3c3291a
[Merge] Version 4.8.1 (#995) 2019-04-07 09:22:31 +03:00
Rsl1122
af124bc146 Version bump to 4.8.1 2019-04-07 09:11:21 +03:00
Rsl1122
3fd0f635a6 [#994] Player Calendar now shows kill victim names. 2019-04-07 09:08:55 +03:00
Risto Lahtela
05bfea37b0
Update versions.txt 2019-04-06 16:43:00 +03:00
Rsl1122
18ca22920a Update CoreProtect extension 2019-04-06 16:38:32 +03:00
Rsl1122
46a865da8e [#992] Added base color to tps and disk graphs 2019-04-06 16:32:18 +03:00
Rsl1122
05b320839b [#991] Fixed custom file path resolution 2019-04-06 16:29:25 +03:00
Risto Lahtela
0956cfa0ff
Update versions.txt 2019-04-05 17:12:23 +03:00
Risto Lahtela
02648b0e42
[Merge] Version 4.8.0 (#990) 2019-04-05 17:11:39 +03:00
Rsl1122
7cb55a7258 Version bump to 4.8.0 2019-04-05 16:41:13 +03:00
Rsl1122
679104c6d9 Fixed some minor details 2019-04-05 16:40:23 +03:00
Rsl1122
cbdaa3255a Updated most tests in 'common' to JUnit 5
Not included:
- CommonDBTest (abstract) and it's extensions. JUnit 5 does not support
  recursive test discovery. Different method needs to be implemented
  for these to move over.
2019-04-04 21:08:57 +03:00
Rsl1122
74bf3901bc Moved everything in /assets/ to /assets/plan 2019-04-03 23:30:41 +03:00
Rsl1122
8ff4a12bd7 Excluded test dependencies 2019-04-03 23:14:55 +03:00
Rsl1122
576ec7c1a5 Added missing license header 2019-04-03 22:47:33 +03:00
Rsl1122
461c9ea472 Updated to gradle 5.3.1 2019-04-03 22:44:26 +03:00
Rsl1122
1335ba299f [#922] Refactored file accessing
- All plugin files moved to /assets/ inside the jar
- InputStreams, lines and flat string now accessed through Resource
  interface obtained from PlanFiles
- Removed FileUtil
- Removed old methods from PlanFiles that returned something that is now
  accessed via Resource interface.
- Implemented a PlanFiles class for Sponge that uses Sponge
  Asset API for fetching items in the jar.
2019-04-03 19:35:14 +03:00
Rsl1122
f1b42e9a58 Fixed duplicate plan_user_info removal on MySQL 2019-04-02 18:57:29 +03:00
Rsl1122
7dead97213 [#971] Timezone setting now affects calendar and recent days formatting 2019-04-02 18:52:05 +03:00
Rsl1122
0ff83713ec [#979] Moved '../' '../../' replacement
This fixes issue where exported player pages' js and css links are one
level too high
2019-04-02 17:44:02 +03:00
Rsl1122
8928ded103 Removed redundant left join 2019-04-02 17:29:13 +03:00
Rsl1122
e1860cc62c [#967, #956] Removal of 'plan_user_info' duplicates 2019-04-02 17:07:14 +03:00
Rsl1122
52841f3724 Fixed MySQL transaction timeout caused by CleanTask 2019-04-01 20:47:39 +03:00
Rsl1122
fb7e752300 Caller updates now async 2019-04-01 20:32:18 +03:00
Rsl1122
d9bf729f40 Registered MinigamesLib Extension 2019-04-01 17:47:52 +03:00
Rsl1122
bdcf7c9dc0 Registered CoreProtect extension 2019-04-01 16:38:28 +03:00
dependabot[bot]
2881c82821 Bump httpclient from 4.5.7 to 4.5.8 in /Plan
Bumps httpclient from 4.5.7 to 4.5.8.

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-01 06:22:13 +00:00
Rsl1122
ee02a2a50e 'fa-fw' icon alignment fix 2019-03-31 18:50:51 +03:00
Rsl1122
04f3dd9415 Updated font awesome to v5.8.1 2019-03-31 18:45:08 +03:00
Risto Lahtela
0551d55603
Update versions.txt 2019-03-31 16:31:48 +03:00
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
Rsl1122
b97f162c94 Fix another bad merge 2019-03-31 15:47:36 +03:00
Rsl1122
89bc90d0b5 Fix bad merge 2019-03-31 15:40:56 +03:00