Commit Graph

4158 Commits

Author SHA1 Message Date
Risto Lahtela
5f4ee93f5f Stop using Paper virtual address method for join addresses
It is returning some garbage
2021-04-15 20:03:20 +03:00
Risto Lahtela
d1e00da51a Started using player UUID instead of name in URLs
- Changed instances where player name was given in a link instead of UUID where possible
  - Could not change for Extensions where "isPlayerName=true" is set for String data, the UUID is
    not available from the query

- Changed 404 error message to have '/player/{uuid/name}' instead of '/player/PlayerName'
- Changed export directory from names to uuids, change log should recommend export users to clear
  their player directory and to run /plan export players
- Fixed issue where Web users with level 2 could not access their own player page via /player/{uuid}

Affects issues:
- Close #1841
2021-04-15 10:13:32 +03:00
Risto Lahtela
1bded295e2 Fixed "Plan" appearing as server name on session accordion 2021-04-15 09:42:43 +03:00
Risto Lahtela
272defb205 Prevent use of / & and ? in a server name
Affects issues:
- Fixed #1831
2021-04-15 09:42:17 +03:00
Risto Lahtela
d860fbb606 Remove null character stuff from Join address & truncate
- Truncated the address to 255 characters in case the null character removal doesn't work
  for some reason.

Affects issues:
- Fixed #1842
2021-04-15 09:36:50 +03:00
Risto Lahtela
c401a7516a Registered Quests extension
- Allows tracking how many quests have been completed

Affects issues:
- Close #1632
2021-04-14 19:24:49 +03:00
dependabot-preview[bot]
aacc4c1534 Bump dagger-compiler from 2.34 to 2.34.1 in /Plan
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.34 to 2.34.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.34...dagger-2.34.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-14 06:04:29 +00:00
dependabot-preview[bot]
a86e13eac4 Bump dagger from 2.34 to 2.34.1 in /Plan
Bumps [dagger](https://github.com/google/dagger) from 2.34 to 2.34.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.34...dagger-2.34.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-14 05:54:28 +00:00
Risto Lahtela
4ab6c68cdd Registered PlaceholderAPI extension
- Allows tracking any placeholders specified in the Plan config

Affects issues:
- Close #1584
2021-04-13 12:32:37 +03:00
Risto Lahtela
af858b8455 Plan API 5.2-R0.6: InvalidateMethod equivalent to ExtensionDataBuilder 2021-04-13 11:57:38 +03:00
Risto Lahtela
5cecde5500 Update Tebex extension
- Store buycraft payment information on Plan
- Store more than 100 payments, all of them instead
- Show all payments on the server page
- Show player made payments on the player's page

Affects issues:
- Close #1451
2021-04-13 11:43:13 +03:00
Risto Lahtela
439a5743b8 Update Bentobox Extension
- Adds MagicCobblestoneGenerator data
- Adds AOneBlock statistics about the phases

Affects issues:
- Close #1649
2021-04-12 12:47:30 +03:00
Risto Lahtela
65b409df2a Added LogBlock extension
Implemented following things:
- diamonds / stone ratio on the player list
- <ore> / stone ratio tables to player pages for each ore
- <nether ore> / Netherrack ratio tables to player pages for each ore

Affects issues:
- Close #1653
2021-04-11 11:58:52 +03:00
Risto Lahtela
ab31f8a074 Plan API 5.2-R0.5: More lenient TabInfo annotation usage
- No more warning when TabInfo is defined without Tab annotations.
  This is because builders can define tabs regardless.
2021-04-11 11:53:44 +03:00
Risto Lahtela
1dfc7df307 Added Lands Extension
Implemented following data points:
- number of chunk claims per player
- number of chunk to claim available per player
- land spawn coordinates if available
- no server data

Affects issues:
- Close #1429
2021-04-11 11:01:38 +03:00
Risto Lahtela
01d9942d96 Update ViaVersion extension: Added Velocity support 2021-04-11 10:32:21 +03:00
Risto Lahtela
c3ce37bfa9 Plan API 5.2-R0.4: SchedulerService
Allows scheduling async tasks for platforms that don't have static
accessors for registering tasks, such as Velocity
2021-04-11 10:28:08 +03:00
Risto Lahtela
9302067a49 Plan API 5.2-R0.3: ListenerService
Allows registering listeners for platforms that don't have static
accessors for registering listeners, such as Velocity
2021-04-11 10:16:37 +03:00
Risto Lahtela
5af889cba3 Registered React Extension
Affects issues:
- #583
2021-04-10 14:47:38 +03:00
Risto Lahtela
bafbfd65f9 Registered PlotSquared extension
Affects issues:
- #583
2021-04-10 14:09:12 +03:00
Risto Lahtela
2a0474a5c6 Registered Heroes Extension
Affects issues:
- #583
2021-04-09 17:21:34 +03:00
Risto Lahtela
699666e2ce Registered MarriageMaster Extension
Adds data about marriages and weddings.

Affects issues:
- Close #1229
2021-04-09 11:51:29 +03:00
Risto Lahtela
1fafd303d3 Publish Plan API 5.2-R0.2 with DataExtension Builder API 2021-04-09 11:00:53 +03:00
dependabot-preview[bot]
02877fd2fb Bump dagger-compiler from 2.33 to 2.34 in /Plan
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.33 to 2.34.
- [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.33...dagger-2.34)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 05:49:26 +00:00
dependabot-preview[bot]
5793872660 Bump mockito-junit-jupiter from 3.8.0 to 3.9.0 in /Plan
Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.8.0...v3.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 05:48:20 +00:00
dependabot-preview[bot]
a085e88be1 Bump dagger from 2.33 to 2.34 in /Plan
Bumps [dagger](https://github.com/google/dagger) from 2.33 to 2.34.
- [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.33...dagger-2.34)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 05:38:42 +00:00
dependabot-preview[bot]
74bfe68e7a Bump mockito-core from 3.8.0 to 3.9.0 in /Plan
Bumps [mockito-core](https://github.com/mockito/mockito) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.8.0...v3.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 05:38:20 +00:00
Risto Lahtela
9466dc3e9d Added a valueBuilder convenience method to DataExtension 2021-04-07 20:11:59 +03:00
Risto Lahtela
113d46669b
DataExtension Builder API (#1833)
* Rewrote annotated extension method extraction
* Enclose annotation based methods into a single ExtensionDataBuilder

All of the reflection related to extension annotation was difficult,
so now it's all dealt with in one place and it's abstracted away with the
upcoming builder based API.

Some odd additions had to be made to the interface, but they are mostly harmless,
as the annotations are used as method parameters where necessary. This way the
users of the API are unable to give weird values.

It was possible to reuse MethodWrapper and Parameters classes for calling the methods.

* Refactored server value storage to use builder data
* Refactored player value storage to use builder data
* Refactored table gathering to use builders
* Handle extension errors properly
* Javadocs for DataExtension builder API
* Removed DataProviders based implementation

- Renamed ProviderValueGatherer to DataValueGatherer
2021-04-07 19:09:38 +03:00
WolverStone
175094b6d6
Update locale_CS.txt (#1830) 2021-04-04 16:22:10 +03:00
Risto Lahtela
57b6ec87fd Updated SB Admin 4.2.1 -> 4.5.3
- Moved some of the custom rules to style.css
- Did not apply some color changes from upstream.
2021-04-04 10:56:44 +03:00
Hasan-Kose
d1e5b93eaa
Update locale_TR.txt (#1826) 2021-04-02 18:18:03 +03:00
Aurélien
aef0592b86
Update locale_FR (#1819)
* Update locale_FR
* Final edit
* Add missing translation
2021-03-31 08:46:23 +03:00
Risto Lahtela
2daedf98b7 Fixed server page calendar not appearing 2021-03-29 20:12:41 +03:00
Risto Lahtela
923e1ba892
Turkish locale updated by BruilsiozPro (#1823)
* Update locale_TR.txt (#1821)

Co-authored-by: Hasan-Kose <78485017+Hasan-Kose@users.noreply.github.com>

* Update locale_TR.txt (#1822)

Co-authored-by: Hasan-Kose <78485017+Hasan-Kose@users.noreply.github.com>

* Update LangCode.java

* Update Contributors.java

Co-authored-by: Hasan-Kose <78485017+Hasan-Kose@users.noreply.github.com>
2021-03-28 23:48:52 +03:00
Risto Lahtela
7325a92b56 Fixed exported player page not loading json 2021-03-26 18:52:54 +02:00
Kevin
757a31cfa6
Update locale_DE.txt (#1818) 2021-03-26 11:29:07 +02:00
Risto Lahtela
d29e1058a5 Fixed loader not being removed from player calendar 2021-03-26 09:35:10 +02:00
Risto Lahtela
335778d9af Fixed world change not applying world playtime to sessions properly 2021-03-26 09:32:02 +02:00
Risto Lahtela
fb8c381466 Applied typo fixes by WolverStones to Czech locale
- Added contributor & translator marks in the code

Affects:
- #1817 (Changes incorporated)
2021-03-26 08:53:57 +02:00
Risto Lahtela
28826f3b88
Update json-endpoints.md 2021-03-25 15:54:28 +02:00
Risto Lahtela
3acc001a13 Added a geolocations filter to query page 2021-03-25 09:42:37 +02:00
Risto Lahtela
837616159c Made join-address pie show text instead when there is only one address
Affects issues:
- Close #1809
2021-03-25 08:13:53 +02:00
Risto Lahtela
a0029f1df8 Made processing shutdown more aggressively
Affects issues:
- #1814
2021-03-25 08:00:04 +02:00
Risto Lahtela
4f39481549 Made sure json memory cache is never null
Affects issues:
- #1814
2021-03-25 07:52:51 +02:00
Risto Lahtela
42827d95b9 Added missing license header 2021-03-24 16:41:13 +02:00
Risto Lahtela
6ca352e6d0 Bump palVersion to 4.0.13 2021-03-24 14:52:23 +02:00
Risto Lahtela
6e2ea888dd Fix typo in utf8mb4 error message 2021-03-24 14:18:45 +02:00
Risto Lahtela
05cf40caac Updated locale files with new language 2021-03-24 14:07:25 +02:00
Risto Lahtela
d7ca428d41 Made shutdown session save a throwaway transaction 2021-03-24 14:03:57 +02:00
Risto Lahtela
2c8bbc80d8 Added a wait for SQLite to finish queries before closing the connection
Also:
- Transactions now execute as much as possible on the same connection instead
  of getting a new connection
- More shutdown messages when waiting for things (Like SQLite queries, or db transactions).

Affects issues:
- Possibly fixed #1814
2021-03-24 14:00:08 +02:00
dependabot-preview[bot]
a44c90f479 Bump net.kyori.blossom from 1.1.0 to 1.2.0 in /Plan
Bumps net.kyori.blossom from 1.1.0 to 1.2.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-24 05:25:57 +00:00
Risto Lahtela
2997e882a5 Fixed a bunch of IntelliJ inspection issues and typos 2021-03-23 11:57:01 +02:00
Risto Lahtela
bde57a0bdf Removed unnecessary parenthesis 2021-03-22 07:18:09 +02:00
Risto Lahtela
03782f18d5 Wrote an access control test for bypass checks
One bypass was discovered for detecting who has played on a server, where
403 is given for level 2 when user has played and 400 when they have not.
This was fixed.

One 500 error was discovered when the network has no proxy server, /v1/network/servers
ran into NullPointerException in a query.
2021-03-22 07:13:27 +02:00
Risto Lahtela
111affaa50 Implemented EnderCrystal kill detection for Sponge
Affects issues:
- #1571
2021-03-21 15:37:34 +02:00
Risto Lahtela
1f76e4a7c7 Implemented EnderCrystal kill detection for Nukkit
Affects issues:
- #1571
2021-03-21 14:58:05 +02:00
Risto Lahtela
89a3d63d8b Implemented EnderCrystal kill detection for Bukkit
Marks player EnderCrystal kills for a player and
also counts mobs killed with EnderCrystal explosions as mob kills for a player.

Affects issues:
- Close #1571
2021-03-21 14:49:14 +02:00
Risto Lahtela
8e0d833f3f Made filters more error-resilient for the future 2021-03-21 13:43:41 +02:00
Risto Lahtela
ac9ca5949e Fixed JSONStorage sometimes fetching the wrong thing 2021-03-21 12:10:27 +02:00
Risto Lahtela
19b64455b4 Catch UnsatisfiedLinkError when getting CPU usage
Affects issues:
- Fixed #1807
2021-03-21 11:12:24 +02:00
Risto Lahtela
624ed50054 Fixed order by related exception with some mysql versions 2021-03-21 11:09:53 +02:00
Creeperface01
0dd5d41955
Update nukkit module to support new PlaceholderAPI version (#1806) 2021-03-21 10:36:15 +02:00
Risto Lahtela
15aca9aafa Sorted out loaders for graphs 2021-03-21 08:41:57 +02:00
Risto Lahtela
cbb2d328a1 Removed some unused code 2021-03-21 08:26:25 +02:00
Risto Lahtela
8624d86793 Added a Join Address filter to query page 2021-03-20 21:05:05 +02:00
Risto Lahtela
9ee2a15008 Wrote tests for ElementOrder serialization 2021-03-20 17:34:58 +02:00
Risto Lahtela
7f153efcfa Fixed AFK Tracker counting afk time for those with ignore permission when they use afk command 2021-03-20 17:26:34 +02:00
Risto Lahtela
0851055d22 Wrote a test for AveragePing class 2021-03-20 17:25:54 +02:00
Risto Lahtela
91aa9e7ca6 Added missing command name for logout command 2021-03-20 13:44:20 +02:00
Risto Lahtela
080d3697ff Clear previous test's cookies during test 2021-03-20 12:56:19 +02:00
Risto Lahtela
8fa4af5a61 Fixed tests running to NPE with runnable factory 2021-03-20 12:44:32 +02:00
Risto Lahtela
07cca1f008 Added a logout command
Permission: plan.logout.other
Usage: /plan logout * or /plan logout <username>

Used for forcing a logout for users.
2021-03-20 12:33:09 +02:00
Risto Lahtela
fb4b272844 Implemented persistent cookies
Fixed security vulnerability with cookies not being invalidated properly
  Request headers were not properly set for the Request object,
  leading to the Cookie header missing when logging out, which then left
  the cookie in memory. Rogue actor who gained access to the cookie could then
  use the cookie to access the panel.

Made cookie expiry configurable with 'Webserver.Security.Cookie_expires_after'

Due to cookie persistence there is no way to log everyone out of the panel.
  This will be addressed in a future commit with addition of a command.

Affects issues:
- Close #1740
2021-03-20 12:02:02 +02:00
Risto Lahtela
a71d2f730f Unregister mysql driver after use
Affects issues:
- Fixed #1804
2021-03-19 17:45:52 +02:00
Risto Lahtela
b956a8f2ba Added warning when extension data can not be cleaned 2021-03-19 16:49:03 +02:00
Risto Lahtela
ebd6330ec1 Sort out weird time in DB clean task 2021-03-19 16:38:57 +02:00
Antti Koponen
aa1a35f794
Add a list of servers to the navbar (#1805)
Affects issues:
- Close #1790
2021-03-19 12:25:55 +02:00
Antti Koponen
428331de5b
Fixed URL hash handling with graph tabs (#1803)
Affects issues:
- Fixed 1736
2021-03-19 09:48:42 +02:00
Risto Lahtela
3ca98bb634 Enabled ExtensionsDatabaseTest again
Might hang in Github Actions, but remains to be seen if changes to
testing environment have fixed the test hanging
2021-03-18 11:27:45 +02:00
Risto Lahtela
7906126b5e Made fetchUserInformationOfUser return a Set instead of List
Fixes tests where there was some order-dependent stuff.
2021-03-18 10:15:39 +02:00
Antti Koponen
477c547c51
Fix page loader centering (#1802)
Affects issues:
- Fixed #1783
2021-03-18 09:25:50 +02:00
Risto Lahtela
aa25f2ff07 Fix issues caused by lowercasing of the join addresses 2021-03-17 16:19:26 +02:00
Risto Lahtela
ff679d626d Lowercase join addresses in the pie 2021-03-17 16:15:00 +02:00
Risto Lahtela
36bb989d7c Fixed network join address pie having duplicated address numbers
This would happen if player joined two game servers on a network
2021-03-17 16:11:15 +02:00
Risto Lahtela
2f240bd7d9 Moved join address pie further down on server page 2021-03-17 11:42:26 +02:00
Risto Lahtela
0e8b8315a2 Use last index of : instead of first to remove port 2021-03-17 11:31:57 +02:00
Risto Lahtela
2bc15db6d0 Sort out player join address things
Applied some thought to how this stuff should work.
- nulls now possible in the column when value is not available
- Called "Join addresses" instead of hostnames
- Remove bogus data with a patch

- Proper hostname method for spigot
- Removed method calls from nukkit since there was nothing that sounded
  proper

Affects:
- Close #1798 (Copied all code over)
2021-03-17 11:31:27 +02:00
Risto Lahtela
3711f0ca60 Fixed stackoverflow error 2021-03-16 18:30:12 +02:00
Risto Lahtela
62da72e6f1 Use paper method when available for hostname 2021-03-16 17:47:26 +02:00
Risto Lahtela
0ba6ff3d70 Update Host name every time player logs in 2021-03-16 17:40:48 +02:00
Risto Lahtela
2e753516e2 Revert changes to URIPathTest.java 2021-03-16 11:36:45 +02:00
Risto Lahtela
1c8fa4c18e Removed parameterized test names 2021-03-16 11:29:55 +02:00
Risto Lahtela
ebffd886fe Fixed parameterized test errors 2021-03-16 10:51:46 +02:00
Risto Lahtela
baab6e5f88 Fixing sonarcloud bugs and smells
Bugs fixed:
- LinkCommands: The return value of "orElseThrow" must be used.
- RegistrationCommands: Optional isPresent not same instance as Optional get

Smells fixed:
- Plan: "logger" is the name of a field in "JavaPlugin"
- PlayersTableJSONCreator: Reduce the total number of break and continue statements in this loop to use at most one.
- BukkitAFKListener, SpongeAFKListener, NukkitAFKListener, PlanAPI, CapabilityService: match the regular expression '^[a-z][a-zA-Z0-9]*$'
- TaskSystem: Reorder the modifiers to comply with the Java Language Specification.
- EntityNameFormatter: StringUtils.removeAll moved to RegExUtils.removeAll
- FiltersJSONResolver: fulfill compareTo contract
- ExportTask: Removed duplicate string literal
- FinishedSession.Id: Rename field "id"
2021-03-16 10:41:17 +02:00
Risto Lahtela
c54c3ce88b Fixed test compilation 2021-03-16 09:42:50 +02:00
Risto Lahtela
2e01758fd6 Fixed lag from host name lookup 2021-03-16 09:02:30 +02:00
Risto Lahtela
e66900117c Replace jcenter with mavenCentral since it is sunset 2021-03-15 18:26:57 +02:00
Risto Lahtela
2767c0ff65 Remove duplicate mysql relocation line 2021-03-15 18:25:16 +02:00
Risto Lahtela
7e08ea8245 Fixed plugin not enabling on Sponge or nukkit
- Removed module-info.class that came from asm
- Don't relocate SQLite since the NativeDB class is not relocated properly
2021-03-15 18:24:40 +02:00