Commit Graph

3281 Commits

Author SHA1 Message Date
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
Risto Lahtela
d47c310a70
Merge branch 'development' into extension-api 2019-03-31 15:10:20 +03:00
Rsl1122
50727e92bb '(Legacy)' added to PluginData tabs 2019-03-31 15:05:55 +03:00
Rsl1122
0108050bb8 TableContainer no longer displays 'null' 2019-03-31 15:05:17 +03:00
Rsl1122
be0375c385 Fixed Aggregate label issues 2019-03-31 14:59:24 +03:00
Rsl1122
7002783dac Fixed Transaction#executeOther when using dbType 2019-03-31 14:58:27 +03:00
Rsl1122
9b29edd16e Fix some code smells 2019-03-31 14:20:10 +03:00
Rsl1122
abd6b04b8d Fixed 'sponge' module test errors 2019-03-31 14:04:06 +03:00
Rsl1122
e835d61aef Updated Essentials extension 2019-03-31 13:51:49 +03:00
Rsl1122
49c1660134 Updated extension versions 2019-03-31 13:15:18 +03:00
Rsl1122
ee795b7702 CallEvents.SERVER_PERIODICAL calls 2019-03-31 12:46:26 +03:00
Rsl1122
4fe85d95ed CallEvents.SERVER_EXTENSION_REGISTER call 2019-03-31 12:36:57 +03:00
Rsl1122
adb0a93713 Implemented Extension player method calls 2019-03-31 12:36:01 +03:00
Rsl1122
58e7534501 Implemented Caller and CallEvents filtering 2019-03-31 12:26:22 +03:00
Rsl1122
bb2be54604 More flexible definition of calling Extension methods 2019-03-31 12:12:59 +03:00
Rsl1122
ffce4c9e32 Removed update booleans from PluginInfo 2019-03-31 11:42:27 +03:00
Rsl1122
5928912a54 Registered Sponge Economy Extension 2019-03-30 16:45:54 +02:00
Rsl1122
731d80f7af Registered Essentials extension 2019-03-30 16:04:15 +02:00
Rsl1122
dfc30ef821 Removed date values from number aggregate query 2019-03-30 16:01:07 +02:00
Rsl1122
4c9488c859 Network ExtensionData visualization 2019-03-30 12:18:37 +02:00