Compare commits

...

88 Commits

Author SHA1 Message Date
AuroraLS3 c8fee67f10 Update versions.txt 5.6 build 2883 2024-05-26 15:08:30 +00:00
Aurora Lahtela bea0ef85b3 Fix join address validator test 2024-05-25 10:39:14 +03:00
Aurora Lahtela 8309f8725e Add config options for enabling and filtering join address gathering
Affects issues:
- Close #3631
2024-05-25 10:22:54 +03:00
dependabot[bot] 8e6befc953
Bump swagger-ui from 5.17.10 to 5.17.12 in /Plan/react/dashboard (#3636)
Bumps [swagger-ui](https://github.com/swagger-api/swagger-ui) from 5.17.10 to 5.17.12.
- [Release notes](https://github.com/swagger-api/swagger-ui/releases)
- [Changelog](https://github.com/swagger-api/swagger-ui/blob/master/.releaserc)
- [Commits](https://github.com/swagger-api/swagger-ui/compare/v5.17.10...v5.17.12)

---
updated-dependencies:
- dependency-name: swagger-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 10:19:01 +03:00
Aurora Lahtela 41ae9a3a70 Add plan_server_uptime placeholder
Supports :server parameter

Affects issues:
- Close #3647
2024-05-25 09:43:54 +03:00
dependabot[bot] 18a154e6b0
Bump highcharts from 11.4.1 to 11.4.3 in /Plan/react/dashboard (#3637)
Bumps [highcharts](https://github.com/highcharts/highcharts-dist) from 11.4.1 to 11.4.3.
- [Commits](https://github.com/highcharts/highcharts-dist/compare/v11.4.1...v11.4.3)

---
updated-dependencies:
- dependency-name: highcharts
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:37:39 +03:00
dependabot[bot] 3e30340aa8
Bump react-i18next from 14.1.1 to 14.1.2 in /Plan/react/dashboard (#3640)
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 14.1.1 to 14.1.2.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v14.1.1...v14.1.2)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:37:30 +03:00
dependabot[bot] 4b67a89d8c
Bump @vitejs/plugin-react from 4.2.1 to 4.3.0 in /Plan/react/dashboard (#3633)
Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 4.2.1 to 4.3.0.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/v4.3.0/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:37:03 +03:00
dependabot[bot] c5513cd5db
Bump axios from 1.6.8 to 1.7.2 in /Plan/react/dashboard (#3634)
Bumps [axios](https://github.com/axios/axios) from 1.6.8 to 1.7.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.8...v1.7.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:36:47 +03:00
dependabot[bot] cde66f1981
Bump @fortawesome/react-fontawesome in /Plan/react/dashboard (#3635)
Bumps [@fortawesome/react-fontawesome](https://github.com/FortAwesome/react-fontawesome) from 0.2.1 to 0.2.2.
- [Release notes](https://github.com/FortAwesome/react-fontawesome/releases)
- [Changelog](https://github.com/FortAwesome/react-fontawesome/blob/0.2.x/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/react-fontawesome/compare/0.2.1...0.2.2)

---
updated-dependencies:
- dependency-name: "@fortawesome/react-fontawesome"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:36:26 +03:00
dependabot[bot] 4481c6411e
Bump @fullcalendar/core from 6.1.11 to 6.1.13 in /Plan/react/dashboard (#3638)
Bumps [@fullcalendar/core](https://github.com/fullcalendar/fullcalendar/tree/HEAD/packages/core) from 6.1.11 to 6.1.13.
- [Release notes](https://github.com/fullcalendar/fullcalendar/releases)
- [Changelog](https://github.com/fullcalendar/fullcalendar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fullcalendar/fullcalendar/commits/v6.1.13/packages/core)

---
updated-dependencies:
- dependency-name: "@fullcalendar/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:36:08 +03:00
dependabot[bot] 99d22185bb
Bump i18next from 23.11.4 to 23.11.5 in /Plan/react/dashboard (#3639)
Bumps [i18next](https://github.com/i18next/i18next) from 23.11.4 to 23.11.5.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.11.4...v23.11.5)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:35:46 +03:00
dependabot[bot] 26fd2992a8
Bump i18next-http-backend from 2.5.1 to 2.5.2 in /Plan/react/dashboard (#3641)
Bumps [i18next-http-backend](https://github.com/i18next/i18next-http-backend) from 2.5.1 to 2.5.2.
- [Changelog](https://github.com/i18next/i18next-http-backend/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next-http-backend/compare/v2.5.1...v2.5.2)

---
updated-dependencies:
- dependency-name: i18next-http-backend
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:35:32 +03:00
dependabot[bot] 5472144f74
Bump react-dom from 18.2.0 to 18.3.1 in /Plan/react/dashboard (#3642)
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 18.2.0 to 18.3.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:35:21 +03:00
dependabot[bot] dddb9186b2
Bump com.google.code.gson:gson from 2.10.1 to 2.11.0 in /Plan (#3643)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.10.1 to 2.11.0.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.10.1...gson-parent-2.11.0)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:34:22 +03:00
dependabot[bot] c5f811f99e
Bump org.apache.commons:commons-compress from 1.26.1 to 1.26.2 in /Plan (#3644)
Bumps org.apache.commons:commons-compress from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:34:11 +03:00
dependabot[bot] b2deda8a28
Bump org.mariadb.jdbc:mariadb-java-client from 3.3.3 to 3.4.0 in /Plan (#3645)
Bumps [org.mariadb.jdbc:mariadb-java-client](https://github.com/mariadb-corporation/mariadb-connector-j) from 3.3.3 to 3.4.0.
- [Release notes](https://github.com/mariadb-corporation/mariadb-connector-j/releases)
- [Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mariadb-corporation/mariadb-connector-j/compare/3.3.3...3.4.0)

---
updated-dependencies:
- dependency-name: org.mariadb.jdbc:mariadb-java-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 09:34:01 +03:00
Aurora Lahtela edb871661c Truncate access address in case it is spoofed
Fixes an exception on inserting too long IP address
2024-05-24 17:24:32 +03:00
Aurora Lahtela ad98e28e4c Check permissions when performing tab completion
- Fixes advisory GHSA-cchm-2r9h-xvhv
2024-05-23 21:08:44 +03:00
Aurora Lahtela 365ea2d333 Lower webserver disabled log message from warn to info level 2024-05-18 19:16:30 +03:00
张宇衡 fefbd9ae23
Folia support added by ZhangYuheng (#3617)
* folia support finished
* add Contributors
* try to use reflection to load class
* finish the compatible for java11 and java 17+ (folia)
* change pal version to 5.2.0, due to the merge of folia-layer.
now this can be compiled by CI-CD(workflow)
* separate folia pal to standalone gradle module
so javadoc gen may success
* made folia module skip javadoc compile
* take advise from AnttiMK. Thank u :)
* make folia pal with runtimeOnly
* extend FileWatcherTest time await up to 5 sec

Affects issues:
- Close #2962
2024-05-18 18:52:39 +03:00
dependabot[bot] 5e0780be1a
Bump ejs from 3.1.7 to 3.1.10 in /Plan/react/dashboard (#3591)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.7 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.7...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-18 10:46:30 +03:00
Aurora Lahtela 3dc6ac5afa Fix rate limiter failing /manage page test
Poor implementation makes /manage/groups page request /v1/permissions n times,
where n is amount of groups. Since each visibility test registers a new group,
there are a lot of them when opening the manage page, leading to tripping the
rate-limiter
2024-05-18 10:46:49 +03:00
Aurora Lahtela 8a16455e95 Update highcharts 2024-05-18 09:36:39 +03:00
Aurora Lahtela de75d3c56f Fix className is undefined error for FontAwesome 2024-05-18 09:32:14 +03:00
Aurora Lahtela 7de0464137 Update dependencies 2024-05-17 20:52:44 +03:00
jhqwqmc 8b2f32bb7d
Update locale_CN.yml (#3616) 2024-05-13 21:55:21 +03:00
Aurora Lahtela ca9870d9fe Fix CorrectWrongCharacterEncodingPatch failing on mysql.user table being a view 2024-05-11 18:58:22 +03:00
Aurora Lahtela 9e25f2b26c Sanitize and validate more join address variations
- Added Data_gathering.Preserve_invalid_join_addresses to allow overriding this behavior.

Affects issues:
- Fixed #3545
2024-04-27 10:08:18 +03:00
Aurora Lahtela 24a8c75b67 Add support for configuring the plugin using environment variables.
Examples:
- Plugin.ServerName -> PLAN_PLUGIN_SERVERNAME
- Database.MySQL.Password -> PLAN_DATABASE_MYSQL_PASSWORD

Affects issues:
- Close #1353
- #1991
2024-04-21 20:35:41 +03:00
Sniper_TVmc 132fa2f919
Update locale_FR.yml (#3578) 2024-04-21 09:25:28 +03:00
Aurora Lahtela 7f268d9a07
Update versions.txt 2024-04-20 20:42:27 +03:00
Aurora Lahtela be8c8951c9 Update jitpack.yml to use JDK 21 2024-04-20 10:34:03 +03:00
AuroraLS3 e630db1b71 Update versions.txt 5.6 DEV build 2850 2024-04-20 07:26:27 +00:00
Aurora Lahtela 0d5d9adb77 Bump Extension-PlaceholderAPI to R1.6
Allows configuring invalid placeholder values that should not overwrite existing values.

Affects issues:
- Fixed #3566
2024-04-20 10:12:15 +03:00
jhqwqmc 590e0445cb
Update locale CN by jhqwqmc (#3567) 2024-04-20 10:04:24 +03:00
Aurora Lahtela bd4108a367 Update dependencies
- @testing-library/react
- i18next
- i18next-http-backend
- sass
- swagger-ui
- org.apache.commons.commons-text
- slf4j
2024-04-20 10:02:35 +03:00
Drex faa911e232
Update to 1.20.5 Fabric by DrexHD (#3424)
* Update to 24w03b
* Update to 1.20.5-rc2
* Bump minecraft dependency
2024-04-20 09:48:33 +03:00
dependabot[bot] 6776c79a14
Bump org.sonarqube from 4.4.1.3373 to 5.0.0.4638 in /Plan (#3542)
Bumps org.sonarqube from 4.4.1.3373 to 5.0.0.4638.

---
updated-dependencies:
- dependency-name: org.sonarqube
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-07 14:40:15 +03:00
dependabot[bot] 13d168a593
Bump daggerVersion from 2.51 to 2.51.1 in /Plan (#3555)
Bumps `daggerVersion` from 2.51 to 2.51.1.

Updates `com.google.dagger:dagger` from 2.51 to 2.51.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.51...dagger-2.51.1)

Updates `com.google.dagger:dagger-compiler` from 2.51 to 2.51.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.51...dagger-2.51.1)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-07 13:41:33 +03:00
Aurora Lahtela 634d6f2a77 Update javascript dependencies
- font awesome
- sass
- swagger-ui
2024-04-07 13:40:41 +03:00
Aurora Lahtela 74ae2dcf40 Fix server allowlist bounces not being exported 2024-04-07 11:18:38 +03:00
Aurora Lahtela f40e1498c1
3268/redesign join address visualization (#3558)
- Join address pie removed
- Join address group mechanism added
  - User can select multiple addresses for each group
  - User can rename each group to their liking
  - The groups are stored in preferences so that user doesn't need to add them back every time
- Use the join address group mechanism for time series of Join Addresses
- Use the join address group mechanism for Player Retention
- Small improvement to retention graph: Show multiple labels
- Small improvement to site clock: Can now hover to show actual date

Affected issues:
- Close #3268
2024-04-07 11:13:18 +03:00
dependabot[bot] b6f68936cf
Bump org.seleniumhq.selenium:selenium-java in /Plan (#3554)
Bumps [org.seleniumhq.selenium:selenium-java](https://github.com/SeleniumHQ/selenium) from 4.18.1 to 4.19.1.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: org.seleniumhq.selenium:selenium-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:34:01 +03:00
dependabot[bot] 55799eafa0
Bump vite from 5.2.2 to 5.2.8 in /Plan/react/dashboard (#3548)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.2.2 to 5.2.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:31:45 +03:00
Aurora Lahtela 8c36f318c7 Prevent duplicate key exception from being thrown entirely
Affects issues:
- Fixed #3543
2024-03-30 10:11:15 +02:00
Aurora Lahtela 49269d3aab Attempt to fix duplicate key issue in UpdateWebPermissionsPatch
Affects issues:
- #3543
2024-03-30 09:48:19 +02:00
dependabot[bot] 95a20b54a3
Bump @testing-library/react in /Plan/react/dashboard (#3528)
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 14.2.1 to 14.2.2.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v14.2.1...v14.2.2)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:25:36 +02:00
dependabot[bot] 2b9314a104
Bump sass from 1.71.1 to 1.72.0 in /Plan/react/dashboard (#3520)
Bumps [sass](https://github.com/sass/dart-sass) from 1.71.1 to 1.72.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.71.1...1.72.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:25:29 +02:00
dependabot[bot] 5a80c6482b
Bump io.swagger.core.v3.swagger-gradle-plugin in /Plan (#3533)
Bumps io.swagger.core.v3.swagger-gradle-plugin from 2.2.20 to 2.2.21.

---
updated-dependencies:
- dependency-name: io.swagger.core.v3.swagger-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:09:06 +02:00
dependabot[bot] 92f887b4a0
Bump react-bootstrap from 2.10.1 to 2.10.2 in /Plan/react/dashboard (#3529)
Bumps [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap) from 2.10.1 to 2.10.2.
- [Release notes](https://github.com/react-bootstrap/react-bootstrap/releases)
- [Changelog](https://github.com/react-bootstrap/react-bootstrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-bootstrap/react-bootstrap/compare/v2.10.1...v2.10.2)

---
updated-dependencies:
- dependency-name: react-bootstrap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:08:53 +02:00
dependabot[bot] 5af89eb787
Bump swaggerVersion from 2.2.20 to 2.2.21 in /Plan (#3532)
Bumps `swaggerVersion` from 2.2.20 to 2.2.21.

Updates `io.swagger.core.v3:swagger-core-jakarta` from 2.2.20 to 2.2.21

Updates `io.swagger.core.v3:swagger-jaxrs2-jakarta` from 2.2.20 to 2.2.21

---
updated-dependencies:
- dependency-name: io.swagger.core.v3:swagger-core-jakarta
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.swagger.core.v3:swagger-jaxrs2-jakarta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:07:54 +02:00
dependabot[bot] d5fc213523
Bump vite from 5.1.5 to 5.2.2 in /Plan/react/dashboard (#3531)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.5 to 5.2.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@5.2.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:07:38 +02:00
dependabot[bot] e4a43af3ef
Bump org.apache.commons:commons-compress from 1.26.0 to 1.26.1 in /Plan (#3522)
Bumps org.apache.commons:commons-compress from 1.26.0 to 1.26.1.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:06:46 +02:00
dependabot[bot] a543af9562
Bump i18next from 23.10.0 to 23.10.1 in /Plan/react/dashboard (#3518)
Bumps [i18next](https://github.com/i18next/i18next) from 23.10.0 to 23.10.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.10.0...v23.10.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:06:31 +02:00
dependabot[bot] 9a605994e8
Bump axios from 1.6.7 to 1.6.8 in /Plan/react/dashboard (#3530)
Bumps [axios](https://github.com/axios/axios) from 1.6.7 to 1.6.8.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.7...v1.6.8)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:05:43 +02:00
dependabot[bot] aac41547db
Bump swagger-ui from 5.11.10 to 5.12.0 in /Plan/react/dashboard (#3517)
Bumps [swagger-ui](https://github.com/swagger-api/swagger-ui) from 5.11.10 to 5.12.0.
- [Release notes](https://github.com/swagger-api/swagger-ui/releases)
- [Changelog](https://github.com/swagger-api/swagger-ui/blob/master/.releaserc)
- [Commits](https://github.com/swagger-api/swagger-ui/compare/v5.11.10...v5.12.0)

---
updated-dependencies:
- dependency-name: swagger-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-23 13:04:19 +02:00
Aurora Lahtela 6d9494d680
Add mcmdev as contributor
For this contribution https://github.com/plan-player-analytics/Extension-LibertyBans/pull/9
2024-03-21 21:28:17 +02:00
Aurora Lahtela b800a9b3ee Bump Extension-LibertyBans to 1.1.0-R1.5 2024-03-20 17:13:05 +02:00
jhqwqmc bd8d92b45c
Update locale_CN.yml (#3516) 2024-03-17 20:15:14 +02:00
Aurora Lahtela 4fb67d7ba7 Update French Locale (FR) by Sniper_TVmc 2024-03-14 20:44:50 +02:00
Aurora Lahtela a4cd8257e2 Fix New Query view not opening at all
The Edit Query effect broke when view wasn't present somewhere
2024-03-14 20:43:23 +02:00
Aurora Lahtela 20b8ab9baa Add 'Edit Query' button to Query Results
This allows easier editing of existing query results
2024-03-14 20:17:08 +02:00
AuroraLS3 e021162729 Update versions.txt 5.6 build 2820 2024-03-14 15:16:46 +00:00
Aurora Lahtela 7463d4e440 Fix exception related to CONCAT on SQLite in Extension boolean storage
Affects issues:
- Fixed #3514
2024-03-11 20:52:41 +02:00
Aurora Lahtela 9fa1a94301 Fix join address not appearing in /plan ingame
Affects issues:
- Fixed #3513
2024-03-11 20:30:31 +02:00
jhqwqmc 30532acf46
Update locale_CN.yml (#3512) 2024-03-11 20:18:30 +02:00
AuroraLS3 4617876e44 Update versions.txt 5.6 build 2816 2024-03-10 08:46:34 +00:00
Aurora Lahtela 252832fcf6 Bump Extension-FastLogin to R1.3
Increase wait up to 9 seconds, until not unknown anymore

Affects issues:
- Close #3485
2024-03-10 10:27:13 +02:00
Aurora Lahtela 8116063e62
Whitelist bounce gathering (#3511)
* Store bounced whitelist logins

* Add allowlist bounce endpoint

* Restore locale file indent from master branch

* Add UI for allowlist

* Update locale

* Fix sonar detected bug and implement database tests

Affects issues:
- Close #2233
2024-03-10 10:25:42 +02:00
Aurora Lahtela 24e6af2d03 Bump Extension-Quests to 5.0.1-R1.0
Affects issues:
- Fixed #3347
- Close https://github.com/PikaMug/Quests/issues/2192
2024-03-10 10:22:23 +02:00
Aurora Lahtela 7299e10064 Fix InstalledPluginGatheringTask running on server thread 2024-03-09 21:15:43 +02:00
Aurora Lahtela de9f9ec5b4
Sonar fixes (#3510)
* Remove deprecated code

- RemoveUnsatisfiedConditionalPlayerResultsTransaction.java
- RemoveUnsatisfiedConditionalServerResultsTransaction.java

* Fix apache compress deprecations

- Use org.apache.commons.io.IOUtils instead of org.apache.commons.compress.utils.IOUtils
- Use TarArchiveInputStream#getNextEntry instead of getNextTarEntry

* Rename variable in BukkitPingCounter

* Extract ApiServices from PlanSystem
2024-03-09 14:43:41 +02:00
Aurora Lahtela 670ef2aff3 Fix exception when storing Extension boolean values with MySQL
Query was using reserved keyword 'stored' as a table alias

Changed it to use 'indb' as the alias

Affects issues:
- Fixed #3508
2024-03-09 10:51:53 +02:00
Aurora Lahtela 9c43287f60 Add Join Address to /plan ingame and placeholders
Adds a %plan_player_join_address% placeholder

Affects issues:
- Close #3463
2024-03-09 10:44:33 +02:00
Aurora Lahtela 9ade3fbf01 Skip yarn build steps on Jitpack
Jitpack doesn't have gclib required for Node 20 which means all builds fail there when yarn build is attempted.

This makes yarn tasks conditional dependency with -PisJitpack flag which skips the problematic section

Affects issues:
- Possibly fixed #3411
2024-03-09 10:29:44 +02:00
Aurora Lahtela 3aa8a71501 Bump Extension-FastLogin to R1.2
Wait one second before asking premium status

Affects issues:
- Possibly fixed #3485
2024-03-09 10:21:14 +02:00
dependabot[bot] 9e29b5aa6b
Bump mockitoVersion from 5.10.0 to 5.11.0 in /Plan (#3505)
Bumps `mockitoVersion` from 5.10.0 to 5.11.0.

Updates `org.mockito:mockito-core` from 5.10.0 to 5.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.10.0 to 5.11.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.10.0...v5.11.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 10:12:03 +02:00
dependabot[bot] 94c13f38e4
Bump export-to-csv from 1.2.3 to 1.2.4 in /Plan/react/dashboard (#3503)
Bumps [export-to-csv](https://github.com/alexcaza/export-to-csv) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/alexcaza/export-to-csv/releases)
- [Commits](https://github.com/alexcaza/export-to-csv/compare/v1.2.3...v1.2.4)

---
updated-dependencies:
- dependency-name: export-to-csv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 10:11:52 +02:00
dependabot[bot] b244d43635
Bump react-router-dom from 6.22.2 to 6.22.3 in /Plan/react/dashboard (#3500)
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.2 to 6.22.3.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.3/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 10:11:37 +02:00
dependabot[bot] 05a61ec75a
Bump swagger-ui from 5.11.8 to 5.11.10 in /Plan/react/dashboard (#3501)
Bumps [swagger-ui](https://github.com/swagger-api/swagger-ui) from 5.11.8 to 5.11.10.
- [Release notes](https://github.com/swagger-api/swagger-ui/releases)
- [Changelog](https://github.com/swagger-api/swagger-ui/blob/master/.releaserc)
- [Commits](https://github.com/swagger-api/swagger-ui/compare/v5.11.8...v5.11.10)

---
updated-dependencies:
- dependency-name: swagger-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 10:11:30 +02:00
dependabot[bot] 51d31daa81
Bump react-i18next from 14.0.5 to 14.1.0 in /Plan/react/dashboard (#3502)
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 14.0.5 to 14.1.0.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v14.0.5...v14.1.0)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 10:11:23 +02:00
dependabot[bot] 0c2b4e1b3e
Bump com.github.seancfoley:ipaddress from 5.4.2 to 5.5.0 in /Plan (#3507)
Bumps [com.github.seancfoley:ipaddress](https://github.com/seancfoley/IPAddress) from 5.4.2 to 5.5.0.
- [Release notes](https://github.com/seancfoley/IPAddress/releases)
- [Commits](https://github.com/seancfoley/IPAddress/compare/v5.4.2...v5.5.0)

---
updated-dependencies:
- dependency-name: com.github.seancfoley:ipaddress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 10:11:16 +02:00
dependabot[bot] 520adf6ca8
Bump testContainersVersion from 1.19.6 to 1.19.7 in /Plan (#3506)
Bumps `testContainersVersion` from 1.19.6 to 1.19.7.

Updates `org.testcontainers:testcontainers` from 1.19.6 to 1.19.7
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.6...1.19.7)

Updates `org.testcontainers:junit-jupiter` from 1.19.6 to 1.19.7
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.6...1.19.7)

Updates `org.testcontainers:nginx` from 1.19.6 to 1.19.7
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.6...1.19.7)

---
updated-dependencies:
- dependency-name: org.testcontainers:testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.testcontainers:nginx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 10:11:02 +02:00
dependabot[bot] 1a0f0f33a7
Bump vite from 5.1.4 to 5.1.5 in /Plan/react/dashboard (#3504)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.4 to 5.1.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-09 10:10:54 +02:00
Aurora Lahtela 1beb1ec4bd Revert SQLite driver back to 3.42.0.1
Affects issues:
- #3436
2024-03-09 10:10:01 +02:00
Aurora Lahtela 70e3f394ba Change player ping graph data format
HighCharts error 12 was occurring due to too many data points

This commit changes player ping graph data to be served in format expected by turbo-mode so that it renders.

Affects issues:
- Fixed #3498
2024-03-05 20:10:20 +02:00
AuroraLS3 e1b4e34e77 Update versions.txt 5.6 DEV build 2796 2024-03-03 08:39:26 +00:00
160 changed files with 3957 additions and 2252 deletions

View File

@ -30,7 +30,7 @@ jobs:
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
distribution: 'adopt' distribution: 'adopt'
java-version: '17' java-version: '21'
- name: 💼 Load Gradle Cache - name: 💼 Load Gradle Cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:

View File

@ -16,8 +16,8 @@ plugins {
id 'java-library' id 'java-library'
id "jacoco" id "jacoco"
id "checkstyle" id "checkstyle"
id "org.sonarqube" version "4.4.1.3373" id "org.sonarqube" version "5.0.0.4638"
id 'fabric-loom' version '1.3-SNAPSHOT' apply false id 'fabric-loom' version '1.6-SNAPSHOT' apply false
} }
apply plugin: 'nebula-aggregate-javadocs' apply plugin: 'nebula-aggregate-javadocs'
@ -69,9 +69,9 @@ subprojects {
} }
ext { ext {
daggerVersion = "2.51" daggerVersion = "2.51.1"
palVersion = "5.1.0" palVersion = "5.2.0"
bukkitVersion = "1.13.2-R0.1-SNAPSHOT" bukkitVersion = "1.13.2-R0.1-SNAPSHOT"
spigotVersion = "1.13.2-R0.1-SNAPSHOT" spigotVersion = "1.13.2-R0.1-SNAPSHOT"
@ -83,22 +83,22 @@ subprojects {
redisBungeeVersion = "0.3.8-SNAPSHOT" redisBungeeVersion = "0.3.8-SNAPSHOT"
redisBungeeProxioDevVersion = "0.7.3" redisBungeeProxioDevVersion = "0.7.3"
commonsTextVersion = "1.11.0" commonsTextVersion = "1.12.0"
commonsCompressVersion = "1.26.0" commonsCompressVersion = "1.26.2"
commonsCodecVersion = "1.16.1" commonsCodecVersion = "1.17.0"
caffeineVersion = "3.1.8" caffeineVersion = "3.1.8"
jettyVersion = "11.0.20" jettyVersion = "11.0.21"
caffeineVersion = "2.9.2" caffeineVersion = "2.9.2"
mysqlVersion = "8.3.0" mysqlVersion = "8.4.0"
mariadbVersion = "3.3.3" mariadbVersion = "3.4.0"
sqliteVersion = "3.45.1.0" sqliteVersion = "3.42.0.1"
adventureVersion = "4.14.0" adventureVersion = "4.17.0"
hikariVersion = "5.1.0" hikariVersion = "5.1.0"
slf4jVersion = "2.0.11" slf4jVersion = "2.0.13"
geoIpVersion = "4.2.0" geoIpVersion = "4.2.0"
gsonVersion = "2.10.1" gsonVersion = "2.11.0"
dependencyDownloadVersion = "1.3.1" dependencyDownloadVersion = "1.3.1"
ipAddressMatcherVersion = "5.4.2" ipAddressMatcherVersion = "5.5.0"
jasyptVersion = "1.9.3" jasyptVersion = "1.9.3"
bstatsVersion = "3.0.2" bstatsVersion = "3.0.2"
@ -106,9 +106,10 @@ subprojects {
nkPlaceholderapiVersion = "1.4-SNAPSHOT" nkPlaceholderapiVersion = "1.4-SNAPSHOT"
junitVersion = "5.10.2" junitVersion = "5.10.2"
mockitoVersion = "5.10.0" mockitoVersion = "5.12.0"
testContainersVersion = "1.19.6" seleniumVersion = "4.21.0"
swaggerVersion = "2.2.20" testContainersVersion = "1.19.8"
swaggerVersion = "2.2.22"
} }
repositories { repositories {

View File

@ -36,6 +36,7 @@ import org.bukkit.command.PluginCommand;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import java.lang.reflect.Constructor;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@ -62,7 +63,18 @@ public class Plan extends JavaPlugin implements PlanPlugin {
@Override @Override
public void onLoad() { public void onLoad() {
abstractionLayer = new BukkitPlatformLayer(this); if (isFolia()) {
try {
// Attempt to load and use the Folia library for Java 17+
Class<?> foliaPlatformLayer = Class.forName("net.playeranalytics.plugin.FoliaPlatformLayer");
abstractionLayer = (PlatformAbstractionLayer) foliaPlatformLayer.getConstructor(JavaPlugin.class).newInstance(this);
} catch (Exception e) {
this.getLogger().log(Level.SEVERE, "Failed to load FoliaPlatformLayer", e);
abstractionLayer = new BukkitPlatformLayer(this);
}
} else {
abstractionLayer = new BukkitPlatformLayer(this);
}
pluginLogger = abstractionLayer.getPluginLogger(); pluginLogger = abstractionLayer.getPluginLogger();
runnableFactory = abstractionLayer.getRunnableFactory(); runnableFactory = abstractionLayer.getRunnableFactory();
} }
@ -167,7 +179,18 @@ public class Plan extends JavaPlugin implements PlanPlugin {
public void cancelAllTasks() { public void cancelAllTasks() {
runnableFactory.cancelAllKnownTasks(); runnableFactory.cancelAllKnownTasks();
Bukkit.getScheduler().cancelTasks(this); if (!isFolia()) {
Bukkit.getScheduler().cancelTasks(this);
}
}
private static boolean isFolia() {
try {
Class.forName("io.papermc.paper.threadedregions.RegionizedServer");
return true;
} catch (ClassNotFoundException e) {
return false;
}
} }
@Override @Override

View File

@ -16,6 +16,7 @@
*/ */
package com.djrapitops.plan.gathering.listeners.bukkit; package com.djrapitops.plan.gathering.listeners.bukkit;
import com.djrapitops.plan.gathering.JoinAddressValidator;
import com.djrapitops.plan.gathering.cache.JoinAddressCache; import com.djrapitops.plan.gathering.cache.JoinAddressCache;
import com.djrapitops.plan.gathering.domain.BukkitPlayerData; import com.djrapitops.plan.gathering.domain.BukkitPlayerData;
import com.djrapitops.plan.gathering.domain.event.PlayerJoin; import com.djrapitops.plan.gathering.domain.event.PlayerJoin;
@ -28,6 +29,8 @@ import com.djrapitops.plan.identification.ServerUUID;
import com.djrapitops.plan.storage.database.DBSystem; import com.djrapitops.plan.storage.database.DBSystem;
import com.djrapitops.plan.storage.database.transactions.events.BanStatusTransaction; import com.djrapitops.plan.storage.database.transactions.events.BanStatusTransaction;
import com.djrapitops.plan.storage.database.transactions.events.KickStoreTransaction; import com.djrapitops.plan.storage.database.transactions.events.KickStoreTransaction;
import com.djrapitops.plan.storage.database.transactions.events.StoreAllowlistBounceTransaction;
import com.djrapitops.plan.utilities.dev.Untrusted;
import com.djrapitops.plan.utilities.logging.ErrorContext; import com.djrapitops.plan.utilities.logging.ErrorContext;
import com.djrapitops.plan.utilities.logging.ErrorLogger; import com.djrapitops.plan.utilities.logging.ErrorLogger;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
@ -50,6 +53,7 @@ public class PlayerOnlineListener implements Listener {
private final PlayerJoinEventConsumer playerJoinEventConsumer; private final PlayerJoinEventConsumer playerJoinEventConsumer;
private final PlayerLeaveEventConsumer playerLeaveEventConsumer; private final PlayerLeaveEventConsumer playerLeaveEventConsumer;
private final JoinAddressValidator joinAddressValidator;
private final JoinAddressCache joinAddressCache; private final JoinAddressCache joinAddressCache;
private final ServerInfo serverInfo; private final ServerInfo serverInfo;
@ -61,6 +65,7 @@ public class PlayerOnlineListener implements Listener {
public PlayerOnlineListener( public PlayerOnlineListener(
PlayerJoinEventConsumer playerJoinEventConsumer, PlayerJoinEventConsumer playerJoinEventConsumer,
PlayerLeaveEventConsumer playerLeaveEventConsumer, PlayerLeaveEventConsumer playerLeaveEventConsumer,
JoinAddressValidator joinAddressValidator,
JoinAddressCache joinAddressCache, JoinAddressCache joinAddressCache,
ServerInfo serverInfo, ServerInfo serverInfo,
DBSystem dbSystem, DBSystem dbSystem,
@ -69,6 +74,7 @@ public class PlayerOnlineListener implements Listener {
) { ) {
this.playerJoinEventConsumer = playerJoinEventConsumer; this.playerJoinEventConsumer = playerJoinEventConsumer;
this.playerLeaveEventConsumer = playerLeaveEventConsumer; this.playerLeaveEventConsumer = playerLeaveEventConsumer;
this.joinAddressValidator = joinAddressValidator;
this.joinAddressCache = joinAddressCache; this.joinAddressCache = joinAddressCache;
this.serverInfo = serverInfo; this.serverInfo = serverInfo;
this.dbSystem = dbSystem; this.dbSystem = dbSystem;
@ -82,18 +88,14 @@ public class PlayerOnlineListener implements Listener {
UUID playerUUID = event.getPlayer().getUniqueId(); UUID playerUUID = event.getPlayer().getUniqueId();
ServerUUID serverUUID = serverInfo.getServerUUID(); ServerUUID serverUUID = serverInfo.getServerUUID();
boolean banned = PlayerLoginEvent.Result.KICK_BANNED == event.getResult(); boolean banned = PlayerLoginEvent.Result.KICK_BANNED == event.getResult();
boolean notWhitelisted = PlayerLoginEvent.Result.KICK_WHITELIST == event.getResult();
String address = event.getHostname(); if (notWhitelisted) {
if (!address.isEmpty()) { dbSystem.getDatabase().executeTransaction(new StoreAllowlistBounceTransaction(playerUUID, event.getPlayer().getName(), serverUUID, System.currentTimeMillis()));
if (address.contains(":")) { }
address = address.substring(0, address.lastIndexOf(':'));
} @Untrusted String address = joinAddressValidator.sanitize(event.getHostname());
if (address.contains("\u0000")) { if (joinAddressValidator.isValid(address)) {
address = address.substring(0, address.indexOf('\u0000'));
}
if (address.contains("fml")) {
address = address.substring(0, address.lastIndexOf("fml"));
}
joinAddressCache.put(playerUUID, address); joinAddressCache.put(playerUUID, address);
} }
dbSystem.getDatabase().executeTransaction(new BanStatusTransaction(playerUUID, serverUUID, banned)); dbSystem.getDatabase().executeTransaction(new BanStatusTransaction(playerUUID, serverUUID, banned));

View File

@ -89,9 +89,9 @@ public class BukkitPingCounter extends TaskSystem.Task implements Listener {
startRecording = new ConcurrentHashMap<>(); startRecording = new ConcurrentHashMap<>();
playerHistory = new HashMap<>(); playerHistory = new HashMap<>();
Optional<PingMethod> pingMethod = loadPingMethod(); Optional<PingMethod> loaded = loadPingMethod();
if (pingMethod.isPresent()) { if (loaded.isPresent()) {
this.pingMethod = pingMethod.get(); this.pingMethod = loaded.get();
pingMethodAvailable = true; pingMethodAvailable = true;
} else { } else {
pingMethodAvailable = false; pingMethodAvailable = false;

View File

@ -4,7 +4,7 @@ import org.apache.tools.ant.filters.ReplaceTokens
plugins { plugins {
id "dev.vankka.dependencydownload.plugin" version "$dependencyDownloadVersion" id "dev.vankka.dependencydownload.plugin" version "$dependencyDownloadVersion"
id "com.github.node-gradle.node" version "7.0.2" id "com.github.node-gradle.node" version "7.0.2"
id "io.swagger.core.v3.swagger-gradle-plugin" version "2.2.20" id "io.swagger.core.v3.swagger-gradle-plugin" version "2.2.22"
} }
configurations { configurations {
@ -56,7 +56,7 @@ dependencies {
shadow project(":extensions") shadow project(":extensions")
shadow "net.playeranalytics:platform-abstraction-layer-api:$palVersion" shadow "net.playeranalytics:platform-abstraction-layer-api:$palVersion"
compileOnly "net.kyori:adventure-api:4.14.0" compileOnly "net.kyori:adventure-api:$adventureVersion"
shadow("dev.vankka:dependencydownload-runtime:$dependencyDownloadVersion") { shadow("dev.vankka:dependencydownload-runtime:$dependencyDownloadVersion") {
// Effectively disables relocating // Effectively disables relocating
exclude module: "jar-relocator" exclude module: "jar-relocator"
@ -87,7 +87,7 @@ dependencies {
// Swagger annotations // Swagger annotations
implementation "jakarta.ws.rs:jakarta.ws.rs-api:3.1.0" implementation "jakarta.ws.rs:jakarta.ws.rs-api:4.0.0"
implementation "io.swagger.core.v3:swagger-core-jakarta:$swaggerVersion" implementation "io.swagger.core.v3:swagger-core-jakarta:$swaggerVersion"
implementation "io.swagger.core.v3:swagger-jaxrs2-jakarta:$swaggerVersion" implementation "io.swagger.core.v3:swagger-jaxrs2-jakarta:$swaggerVersion"
@ -95,12 +95,21 @@ dependencies {
testArtifacts project(":extensions:adventure") testArtifacts project(":extensions:adventure")
testImplementation project(":extensions:adventure") testImplementation project(":extensions:adventure")
testImplementation "com.google.code.gson:gson:$gsonVersion" testImplementation "com.google.code.gson:gson:$gsonVersion"
testImplementation "org.seleniumhq.selenium:selenium-java:4.18.1" testImplementation "org.seleniumhq.selenium:selenium-java:$seleniumVersion"
testImplementation "org.testcontainers:testcontainers:$testContainersVersion" testImplementation "org.testcontainers:testcontainers:$testContainersVersion"
testImplementation "org.testcontainers:junit-jupiter:$testContainersVersion" testImplementation "org.testcontainers:junit-jupiter:$testContainersVersion"
testImplementation "org.testcontainers:nginx:$testContainersVersion" testImplementation "org.testcontainers:nginx:$testContainersVersion"
} }
test {
environment "PLAN_TEST_NODE_STRING", "String"
environment "PLAN_TEST_NODE_BOOLEAN", "true"
environment "PLAN_TEST_NODE_INTEGER", "5"
environment "PLAN_TEST_NODE_DOUBLE", "0.5"
environment "PLAN_TEST_NODE_LONG", "9223372036854775807"
environment "PLAN_TEST_NODE_STRINGLIST", "- Test\n- Another"
}
task updateVersion(type: Copy) { task updateVersion(type: Copy) {
from('src/main/resources') { from('src/main/resources') {
include 'plugin.yml' include 'plugin.yml'
@ -233,8 +242,12 @@ artifacts {
} }
processResources { processResources {
dependsOn copyYarnBuildResults // Skips Yarn build on Jitpack since Jitpack doesn't offer gclib version compatible with Node 20
dependsOn determineAssetModifications // Jitpack build is used mainly for java dependencies.
if (!project.hasProperty("isJitpack")) {
dependsOn copyYarnBuildResults
dependsOn determineAssetModifications
}
dependsOn generateResourceForMySQLDriver dependsOn generateResourceForMySQLDriver
dependsOn generateResourceForSQLiteDriver dependsOn generateResourceForSQLiteDriver
dependsOn generateResourceForIpAddressMatcher dependsOn generateResourceForIpAddressMatcher

View File

@ -0,0 +1,119 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan;
import com.djrapitops.plan.component.ComponentSvc;
import com.djrapitops.plan.delivery.web.ResolverSvc;
import com.djrapitops.plan.delivery.web.ResourceSvc;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.ListenerSvc;
import com.djrapitops.plan.settings.SchedulerSvc;
import com.djrapitops.plan.settings.SettingsSvc;
import javax.inject.Inject;
import javax.inject.Singleton;
/**
* Breaks up {@link PlanSystem} to be a smaller class.
*
* @author AuroraLS3
*/
@Singleton
public class ApiServices {
private final ComponentSvc componentService;
private final ResolverSvc resolverService;
private final ResourceSvc resourceService;
private final ExtensionSvc extensionService;
private final QuerySvc queryService;
private final ListenerSvc listenerService;
private final SettingsSvc settingsService;
private final SchedulerSvc schedulerService;
@Inject
public ApiServices(
ComponentSvc componentService,
ResolverSvc resolverService,
ResourceSvc resourceService,
ExtensionSvc extensionService,
QuerySvc queryService,
ListenerSvc listenerService,
SettingsSvc settingsService,
SchedulerSvc schedulerService
) {
this.componentService = componentService;
this.resolverService = resolverService;
this.resourceService = resourceService;
this.extensionService = extensionService;
this.queryService = queryService;
this.listenerService = listenerService;
this.settingsService = settingsService;
this.schedulerService = schedulerService;
}
public void register() {
extensionService.register();
componentService.register();
resolverService.register();
resourceService.register();
listenerService.register();
settingsService.register();
schedulerService.register();
queryService.register();
}
public void registerExtensions() {
extensionService.registerExtensions();
}
public void disableExtensionDataUpdates() {
extensionService.disableUpdates();
}
public ComponentSvc getComponentService() {
return componentService;
}
public ResolverSvc getResolverService() {
return resolverService;
}
public ResourceSvc getResourceService() {
return resourceService;
}
public ExtensionSvc getExtensionService() {
return extensionService;
}
public QuerySvc getQueryService() {
return queryService;
}
public ListenerSvc getListenerService() {
return listenerService;
}
public SettingsSvc getSettingsService() {
return settingsService;
}
public SchedulerSvc getSchedulerService() {
return schedulerService;
}
}

View File

@ -17,25 +17,17 @@
package com.djrapitops.plan; package com.djrapitops.plan;
import com.djrapitops.plan.api.PlanAPI; import com.djrapitops.plan.api.PlanAPI;
import com.djrapitops.plan.component.ComponentSvc;
import com.djrapitops.plan.delivery.DeliveryUtilities; import com.djrapitops.plan.delivery.DeliveryUtilities;
import com.djrapitops.plan.delivery.export.ExportSystem; import com.djrapitops.plan.delivery.export.ExportSystem;
import com.djrapitops.plan.delivery.formatting.Formatters; import com.djrapitops.plan.delivery.formatting.Formatters;
import com.djrapitops.plan.delivery.web.ResolverSvc;
import com.djrapitops.plan.delivery.web.ResourceSvc;
import com.djrapitops.plan.delivery.webserver.NonProxyWebserverDisableChecker; import com.djrapitops.plan.delivery.webserver.NonProxyWebserverDisableChecker;
import com.djrapitops.plan.delivery.webserver.WebServerSystem; import com.djrapitops.plan.delivery.webserver.WebServerSystem;
import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.cache.CacheSystem; import com.djrapitops.plan.gathering.cache.CacheSystem;
import com.djrapitops.plan.gathering.importing.ImportSystem; import com.djrapitops.plan.gathering.importing.ImportSystem;
import com.djrapitops.plan.gathering.listeners.ListenerSystem; import com.djrapitops.plan.gathering.listeners.ListenerSystem;
import com.djrapitops.plan.identification.ServerInfo; import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.processing.Processing; import com.djrapitops.plan.processing.Processing;
import com.djrapitops.plan.query.QuerySvc;
import com.djrapitops.plan.settings.ConfigSystem; import com.djrapitops.plan.settings.ConfigSystem;
import com.djrapitops.plan.settings.ListenerSvc;
import com.djrapitops.plan.settings.SchedulerSvc;
import com.djrapitops.plan.settings.SettingsSvc;
import com.djrapitops.plan.settings.locale.LocaleSystem; import com.djrapitops.plan.settings.locale.LocaleSystem;
import com.djrapitops.plan.storage.database.DBSystem; import com.djrapitops.plan.storage.database.DBSystem;
import com.djrapitops.plan.storage.file.PlanFiles; import com.djrapitops.plan.storage.file.PlanFiles;
@ -77,14 +69,7 @@ public class PlanSystem implements SubSystem {
private final ImportSystem importSystem; private final ImportSystem importSystem;
private final ExportSystem exportSystem; private final ExportSystem exportSystem;
private final DeliveryUtilities deliveryUtilities; private final DeliveryUtilities deliveryUtilities;
private final ComponentSvc componentService; private final ApiServices apiServices;
private final ResolverSvc resolverService;
private final ResourceSvc resourceService;
private final ExtensionSvc extensionService;
private final QuerySvc queryService;
private final ListenerSvc listenerService;
private final SettingsSvc settingsService;
private final SchedulerSvc schedulerService;
private final PluginLogger logger; private final PluginLogger logger;
private final ErrorLogger errorLogger; private final ErrorLogger errorLogger;
@ -104,16 +89,9 @@ public class PlanSystem implements SubSystem {
ImportSystem importSystem, ImportSystem importSystem,
ExportSystem exportSystem, ExportSystem exportSystem,
DeliveryUtilities deliveryUtilities, DeliveryUtilities deliveryUtilities,
ComponentSvc componentService,
ResolverSvc resolverService,
ResourceSvc resourceService,
ExtensionSvc extensionService,
QuerySvc queryService,
ListenerSvc listenerService,
SettingsSvc settingsService,
SchedulerSvc schedulerService,
PluginLogger logger, PluginLogger logger,
ErrorLogger errorLogger, ErrorLogger errorLogger,
ApiServices apiServices, // API v5
@SuppressWarnings("deprecation") PlanAPI.PlanAPIHolder apiHolder // Deprecated PlanAPI, backwards compatibility @SuppressWarnings("deprecation") PlanAPI.PlanAPIHolder apiHolder // Deprecated PlanAPI, backwards compatibility
) { ) {
this.files = files; this.files = files;
@ -130,16 +108,9 @@ public class PlanSystem implements SubSystem {
this.importSystem = importSystem; this.importSystem = importSystem;
this.exportSystem = exportSystem; this.exportSystem = exportSystem;
this.deliveryUtilities = deliveryUtilities; this.deliveryUtilities = deliveryUtilities;
this.componentService = componentService;
this.resolverService = resolverService;
this.resourceService = resourceService;
this.extensionService = extensionService;
this.queryService = queryService;
this.listenerService = listenerService;
this.settingsService = settingsService;
this.schedulerService = schedulerService;
this.logger = logger; this.logger = logger;
this.errorLogger = errorLogger; this.errorLogger = errorLogger;
this.apiServices = apiServices;
logger.info("§2"); logger.info("§2");
logger.info("§2 ██▌"); logger.info("§2 ██▌");
@ -162,14 +133,7 @@ public class PlanSystem implements SubSystem {
* Enables the rest of the systems that are not enabled in {@link #enableForCommands()}. * Enables the rest of the systems that are not enabled in {@link #enableForCommands()}.
*/ */
public void enableOtherThanCommands() { public void enableOtherThanCommands() {
extensionService.register(); apiServices.register();
componentService.register();
resolverService.register();
resourceService.register();
listenerService.register();
settingsService.register();
schedulerService.register();
queryService.register();
enableSystems( enableSystems(
processing, processing,
@ -193,7 +157,7 @@ public class PlanSystem implements SubSystem {
)); ));
} }
extensionService.registerExtensions(); apiServices.registerExtensions();
enabled = true; enabled = true;
String javaVersion = System.getProperty("java.specification.version"); String javaVersion = System.getProperty("java.specification.version");
@ -223,7 +187,7 @@ public class PlanSystem implements SubSystem {
enabled = false; enabled = false;
Formatters.clearSingleton(); Formatters.clearSingleton();
extensionService.disableUpdates(); apiServices.disableExtensionDataUpdates();
disableSystems( disableSystems(
taskSystem, taskSystem,
@ -316,12 +280,8 @@ public class PlanSystem implements SubSystem {
return enabled; return enabled;
} }
public ExtensionSvc getExtensionService() { public ApiServices getApiServices() {
return extensionService; return apiServices;
}
public ComponentSvc getComponentService() {
return componentService;
} }
public static long getServerEnableTime() { public static long getServerEnableTime() {

View File

@ -140,13 +140,21 @@ public class PlanCommand {
} }
public List<String> serverNames(CMDSender sender, @Untrusted Arguments arguments) { public List<String> serverNames(CMDSender sender, @Untrusted Arguments arguments) {
@Untrusted String asString = arguments.concatenate(" "); if (sender.hasPermission(Permissions.SERVER)) {
return tabCompleteCache.getMatchingServerIdentifiers(asString); @Untrusted String asString = arguments.concatenate(" ");
return tabCompleteCache.getMatchingServerIdentifiers(asString);
}
return List.of();
} }
private List<String> playerNames(CMDSender sender, @Untrusted Arguments arguments) { private List<String> playerNames(CMDSender sender, @Untrusted Arguments arguments) {
@Untrusted String asString = arguments.concatenate(" "); if (sender.hasPermission(Permissions.PLAYER_OTHER)) {
return tabCompleteCache.getMatchingPlayerIdentifiers(asString); @Untrusted String asString = arguments.concatenate(" ");
return tabCompleteCache.getMatchingPlayerIdentifiers(asString);
} else if (sender.hasPermission(Permissions.PLAYER_SELF)) {
return sender.getPlayerName().map(List::of).orElse(List.of());
}
return List.of();
} }
private Subcommand serverCommand() { private Subcommand serverCommand() {
@ -403,6 +411,9 @@ public class PlanCommand {
} }
private List<String> getBackupFilenames(CMDSender sender, @Untrusted Arguments arguments) { private List<String> getBackupFilenames(CMDSender sender, @Untrusted Arguments arguments) {
if (!sender.hasPermission(Permissions.DATA_RESTORE)) {
return List.of();
}
if (arguments.get(1).isPresent()) { if (arguments.get(1).isPresent()) {
return DBType.names(); return DBType.names();
} }
@ -531,6 +542,9 @@ public class PlanCommand {
} }
private List<String> webGroupTabComplete(CMDSender sender, @Untrusted Arguments arguments) { private List<String> webGroupTabComplete(CMDSender sender, @Untrusted Arguments arguments) {
if (!sender.hasPermission(Permissions.SET_GROUP)) {
return List.of();
}
Optional<String> groupArgument = arguments.get(1); Optional<String> groupArgument = arguments.get(1);
if (groupArgument.isPresent()) { if (groupArgument.isPresent()) {
return tabCompleteCache.getMatchingWebGroupNames(groupArgument.get()); return tabCompleteCache.getMatchingWebGroupNames(groupArgument.get());

View File

@ -29,6 +29,7 @@ import com.djrapitops.plan.delivery.formatting.Formatter;
import com.djrapitops.plan.delivery.formatting.Formatters; import com.djrapitops.plan.delivery.formatting.Formatters;
import com.djrapitops.plan.exceptions.ExportException; import com.djrapitops.plan.exceptions.ExportException;
import com.djrapitops.plan.gathering.domain.GeoInfo; import com.djrapitops.plan.gathering.domain.GeoInfo;
import com.djrapitops.plan.gathering.domain.event.JoinAddress;
import com.djrapitops.plan.gathering.importing.ImportSystem; import com.djrapitops.plan.gathering.importing.ImportSystem;
import com.djrapitops.plan.gathering.importing.importers.Importer; import com.djrapitops.plan.gathering.importing.importers.Importer;
import com.djrapitops.plan.identification.Identifiers; import com.djrapitops.plan.identification.Identifiers;
@ -42,6 +43,7 @@ import com.djrapitops.plan.settings.locale.Locale;
import com.djrapitops.plan.settings.locale.lang.CommandLang; import com.djrapitops.plan.settings.locale.lang.CommandLang;
import com.djrapitops.plan.settings.locale.lang.GenericLang; import com.djrapitops.plan.settings.locale.lang.GenericLang;
import com.djrapitops.plan.settings.locale.lang.HelpLang; import com.djrapitops.plan.settings.locale.lang.HelpLang;
import com.djrapitops.plan.settings.locale.lang.HtmlLang;
import com.djrapitops.plan.storage.database.DBSystem; import com.djrapitops.plan.storage.database.DBSystem;
import com.djrapitops.plan.storage.database.Database; import com.djrapitops.plan.storage.database.Database;
import com.djrapitops.plan.storage.database.queries.containers.ContainerFetchQueries; import com.djrapitops.plan.storage.database.queries.containers.ContainerFetchQueries;
@ -258,12 +260,17 @@ public class DataUtilityCommands {
Optional<GeoInfo> mostRecentGeoInfo = new GeoInfoMutator(geoInfo).mostRecent(); Optional<GeoInfo> mostRecentGeoInfo = new GeoInfoMutator(geoInfo).mostRecent();
String geolocation = mostRecentGeoInfo.isPresent() ? mostRecentGeoInfo.get().getGeolocation() : "-"; String geolocation = mostRecentGeoInfo.isPresent() ? mostRecentGeoInfo.get().getGeolocation() : "-";
SessionsMutator sessionsMutator = SessionsMutator.forContainer(player); SessionsMutator sessionsMutator = SessionsMutator.forContainer(player);
String latestJoinAddress = sessionsMutator.latestSession()
.flatMap(session -> session.getExtraData(JoinAddress.class))
.map(JoinAddress::getAddress)
.orElse("-");
String table = locale.getString(CommandLang.HEADER_INSPECT, playerName) + '\n' + String table = locale.getString(CommandLang.HEADER_INSPECT, playerName) + '\n' +
locale.getString(CommandLang.INGAME_ACTIVITY_INDEX, activityIndex.getFormattedValue(formatters.decimals()), activityIndex.getGroup()) + '\n' + locale.getString(CommandLang.INGAME_ACTIVITY_INDEX, activityIndex.getFormattedValue(formatters.decimals()), activityIndex.getGroup()) + '\n' +
locale.getString(CommandLang.INGAME_REGISTERED, timestamp.apply(() -> registered)) + '\n' + locale.getString(CommandLang.INGAME_REGISTERED, timestamp.apply(() -> registered)) + '\n' +
locale.getString(CommandLang.INGAME_LAST_SEEN, timestamp.apply(() -> lastSeen)) + '\n' + locale.getString(CommandLang.INGAME_LAST_SEEN, timestamp.apply(() -> lastSeen)) + '\n' +
locale.getString(CommandLang.INGAME_GEOLOCATION, geolocation) + '\n' + locale.getString(CommandLang.INGAME_GEOLOCATION, geolocation) + '\n' +
" §2" + locale.getString(HtmlLang.LABEL_LABEL_JOIN_ADDRESS) + ": §f" + latestJoinAddress + '\n' +
locale.getString(CommandLang.INGAME_TIMES_KICKED, player.getValue(PlayerKeys.KICK_COUNT).orElse(0)) + '\n' + locale.getString(CommandLang.INGAME_TIMES_KICKED, player.getValue(PlayerKeys.KICK_COUNT).orElse(0)) + '\n' +
'\n' + '\n' +
locale.getString(CommandLang.INGAME_PLAYTIME, length.apply(sessionsMutator.toPlaytime())) + '\n' + locale.getString(CommandLang.INGAME_PLAYTIME, length.apply(sessionsMutator.toPlaytime())) + '\n' +

View File

@ -16,6 +16,8 @@
*/ */
package com.djrapitops.plan.delivery.domain; package com.djrapitops.plan.delivery.domain;
import java.util.Objects;
/** /**
* Object that has a value tied to a date. * Object that has a value tied to a date.
* *
@ -39,4 +41,25 @@ public class DateObj<T> implements DateHolder {
public T getValue() { public T getValue() {
return value; return value;
} }
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DateObj<?> dateObj = (DateObj<?>) o;
return getDate() == dateObj.getDate() && Objects.equals(getValue(), dateObj.getValue());
}
@Override
public int hashCode() {
return Objects.hash(getDate(), getValue());
}
@Override
public String toString() {
return "DateObj{" +
"date=" + date +
", value=" + value +
'}';
}
} }

View File

@ -28,7 +28,7 @@ import java.util.Objects;
*/ */
public class JoinAddressCount implements Comparable<JoinAddressCount> { public class JoinAddressCount implements Comparable<JoinAddressCount> {
private final int count; private int count;
private String joinAddress; private String joinAddress;
public JoinAddressCount(Map.Entry<String, Integer> entry) { public JoinAddressCount(Map.Entry<String, Integer> entry) {
@ -52,6 +52,10 @@ public class JoinAddressCount implements Comparable<JoinAddressCount> {
return count; return count;
} }
public void setCount(int count) {
this.count = count;
}
@Override @Override
public int compareTo(@NotNull JoinAddressCount other) { public int compareTo(@NotNull JoinAddressCount other) {
return String.CASE_INSENSITIVE_ORDER.compare(this.joinAddress, other.joinAddress); return String.CASE_INSENSITIVE_ORDER.compare(this.joinAddress, other.joinAddress);

View File

@ -19,6 +19,9 @@ package com.djrapitops.plan.delivery.domain.auth;
import com.djrapitops.plan.settings.locale.lang.Lang; import com.djrapitops.plan.settings.locale.lang.Lang;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.function.Supplier; import java.util.function.Supplier;
/** /**
@ -47,7 +50,8 @@ public enum WebPermission implements Supplier<String>, Lang {
PAGE_NETWORK_SESSIONS_LIST("See list of sessions"), PAGE_NETWORK_SESSIONS_LIST("See list of sessions"),
PAGE_NETWORK_JOIN_ADDRESSES("See Join Addresses -tab"), PAGE_NETWORK_JOIN_ADDRESSES("See Join Addresses -tab"),
PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS("See Join Address graphs"), PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS("See Join Address graphs"),
PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_PIE("See Latest Join Addresses graph"), @Deprecated
PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_PIE("See Latest Join Addresses graph", true),
PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_TIME("See Join Addresses over time graph"), PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_TIME("See Join Addresses over time graph"),
PAGE_NETWORK_RETENTION("See Player Retention -tab"), PAGE_NETWORK_RETENTION("See Player Retention -tab"),
PAGE_NETWORK_GEOLOCATIONS("See Geolocations tab"), PAGE_NETWORK_GEOLOCATIONS("See Geolocations tab"),
@ -82,7 +86,8 @@ public enum WebPermission implements Supplier<String>, Lang {
PAGE_SERVER_SESSIONS_LIST("See list of sessions"), PAGE_SERVER_SESSIONS_LIST("See list of sessions"),
PAGE_SERVER_JOIN_ADDRESSES("See Join Addresses -tab"), PAGE_SERVER_JOIN_ADDRESSES("See Join Addresses -tab"),
PAGE_SERVER_JOIN_ADDRESSES_GRAPHS("See Join Address graphs"), PAGE_SERVER_JOIN_ADDRESSES_GRAPHS("See Join Address graphs"),
PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_PIE("See Latest Join Addresses graph"), @Deprecated
PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_PIE("See Latest Join Addresses graph", true),
PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_TIME("See Join Addresses over time graph"), PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_TIME("See Join Addresses over time graph"),
PAGE_SERVER_RETENTION("See Player Retention -tab"), PAGE_SERVER_RETENTION("See Player Retention -tab"),
PAGE_SERVER_GEOLOCATIONS("See Geolocations tab"), PAGE_SERVER_GEOLOCATIONS("See Geolocations tab"),
@ -93,6 +98,7 @@ public enum WebPermission implements Supplier<String>, Lang {
PAGE_SERVER_PERFORMANCE_OVERVIEW("See Performance numbers"), PAGE_SERVER_PERFORMANCE_OVERVIEW("See Performance numbers"),
PAGE_SERVER_PLUGIN_HISTORY("See Plugin History"), PAGE_SERVER_PLUGIN_HISTORY("See Plugin History"),
PAGE_SERVER_PLUGINS("See Plugins -tabs of servers"), PAGE_SERVER_PLUGINS("See Plugins -tabs of servers"),
PAGE_SERVER_ALLOWLIST_BOUNCE("See list of Game allowlist bounces"),
PAGE_PLAYER("See all of player page"), PAGE_PLAYER("See all of player page"),
PAGE_PLAYER_OVERVIEW("See Player Overview -tab"), PAGE_PLAYER_OVERVIEW("See Player Overview -tab"),
@ -155,4 +161,23 @@ public enum WebPermission implements Supplier<String>, Lang {
public String getDefault() { public String getDefault() {
return description; return description;
} }
public static WebPermission[] nonDeprecatedValues() {
return Arrays.stream(values())
.filter(Predicate.not(WebPermission::isDeprecated))
.toArray(WebPermission[]::new);
}
public static Optional<WebPermission> findByPermission(String permission) {
String name = StringUtils.upperCase(permission).replace('.', '_');
try {
return Optional.of(valueOf(name));
} catch (IllegalArgumentException noSuchEnum) {
return Optional.empty();
}
}
public static boolean isDeprecated(String permission) {
return findByPermission(permission).map(WebPermission::isDeprecated).orElse(false);
}
} }

View File

@ -0,0 +1,82 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.delivery.domain.datatransfer;
import com.djrapitops.plan.utilities.dev.Untrusted;
import java.util.Objects;
import java.util.UUID;
/**
* Represents an event where player bounced off the whitelist.
*
* @author AuroraLS3
*/
public class AllowlistBounce {
private final UUID playerUUID;
@Untrusted
private final String playerName;
private final int count;
private final long lastTime;
public AllowlistBounce(UUID playerUUID, String playerName, int count, long lastTime) {
this.playerUUID = playerUUID;
this.playerName = playerName;
this.count = count;
this.lastTime = lastTime;
}
public UUID getPlayerUUID() {
return playerUUID;
}
public String getPlayerName() {
return playerName;
}
public int getCount() {
return count;
}
public long getLastTime() {
return lastTime;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AllowlistBounce bounce = (AllowlistBounce) o;
return getCount() == bounce.getCount() && getLastTime() == bounce.getLastTime() && Objects.equals(getPlayerUUID(), bounce.getPlayerUUID()) && Objects.equals(getPlayerName(), bounce.getPlayerName());
}
@Override
public int hashCode() {
return Objects.hash(getPlayerUUID(), getPlayerName(), getCount(), getLastTime());
}
@Override
public String toString() {
return "AllowlistBounce{" +
"playerUUID=" + playerUUID +
", playerName='" + playerName + '\'' +
", count=" + count +
", lastTime=" + lastTime +
'}';
}
}

View File

@ -0,0 +1,67 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.delivery.domain.datatransfer;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
/**
* Represents data returned by {@link com.djrapitops.plan.delivery.webserver.resolver.json.PlayerJoinAddressJSONResolver}.
*
* @author AuroraLS3
*/
public class PlayerJoinAddresses {
private final List<String> joinAddresses;
private final Map<UUID, String> joinAddressByPlayer;
public PlayerJoinAddresses(List<String> joinAddresses, Map<UUID, String> joinAddressByPlayer) {
this.joinAddresses = joinAddresses;
this.joinAddressByPlayer = joinAddressByPlayer;
}
public List<String> getJoinAddresses() {
return joinAddresses;
}
public Map<UUID, String> getJoinAddressByPlayer() {
return joinAddressByPlayer;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PlayerJoinAddresses that = (PlayerJoinAddresses) o;
return Objects.equals(getJoinAddresses(), that.getJoinAddresses()) && Objects.equals(getJoinAddressByPlayer(), that.getJoinAddressByPlayer());
}
@Override
public int hashCode() {
return Objects.hash(getJoinAddresses(), getJoinAddressByPlayer());
}
@Override
public String toString() {
return "PlayerJoinAddresses{" +
"joinAddresses=" + joinAddresses +
", joinAddressByPlayer=" + joinAddressByPlayer +
'}';
}
}

View File

@ -28,15 +28,15 @@ import java.util.Objects;
*/ */
public class ServerSpecificLineGraph { public class ServerSpecificLineGraph {
private final List<Double[]> points; private final List<Number[]> points;
private final ServerDto server; private final ServerDto server;
public ServerSpecificLineGraph(List<Double[]> points, ServerDto server) { public ServerSpecificLineGraph(List<Number[]> points, ServerDto server) {
this.points = points; this.points = points;
this.server = server; this.server = server;
} }
public List<Double[]> getPoints() { public List<Number[]> getPoints() {
return points; return points;
} }

View File

@ -121,7 +121,6 @@ public class NetworkPageExporter extends FileExporter {
"graph?type=uniqueAndNew", "graph?type=uniqueAndNew",
"graph?type=hourlyUniqueAndNew", "graph?type=hourlyUniqueAndNew",
"graph?type=serverPie", "graph?type=serverPie",
"graph?type=joinAddressPie",
"graph?type=joinAddressByDay", "graph?type=joinAddressByDay",
"graph?type=activity", "graph?type=activity",
"graph?type=geolocation", "graph?type=geolocation",

View File

@ -100,6 +100,7 @@ public class ServerPageExporter extends FileExporter {
server + serverUUID + "/playerbase", server + serverUUID + "/playerbase",
server + serverUUID + "/join-addresses", server + serverUUID + "/join-addresses",
server + serverUUID + "/retention", server + serverUUID + "/retention",
server + serverUUID + "/allowlist",
server + serverUUID + "/players", server + serverUUID + "/players",
server + serverUUID + "/geolocations", server + serverUUID + "/geolocations",
server + serverUUID + "/performance", server + serverUUID + "/performance",
@ -137,7 +138,6 @@ public class ServerPageExporter extends FileExporter {
"graph?type=geolocation&server=" + serverUUID, "graph?type=geolocation&server=" + serverUUID,
"graph?type=uniqueAndNew&server=" + serverUUID, "graph?type=uniqueAndNew&server=" + serverUUID,
"graph?type=hourlyUniqueAndNew&server=" + serverUUID, "graph?type=hourlyUniqueAndNew&server=" + serverUUID,
"graph?type=joinAddressPie&server=" + serverUUID,
"graph?type=joinAddressByDay&server=" + serverUUID, "graph?type=joinAddressByDay&server=" + serverUUID,
"graph?type=serverCalendar&server=" + serverUUID, "graph?type=serverCalendar&server=" + serverUUID,
"graph?type=punchCard&server=" + serverUUID, "graph?type=punchCard&server=" + serverUUID,
@ -148,7 +148,8 @@ public class ServerPageExporter extends FileExporter {
"extensionData?server=" + serverUUID, "extensionData?server=" + serverUUID,
"serverIdentity?server=" + serverUUID, "serverIdentity?server=" + serverUUID,
"retention?server=" + serverUUID, "retention?server=" + serverUUID,
"joinAddresses?server=" + serverUUID "joinAddresses?server=" + serverUUID,
"gameAllowlistBounces?server=" + serverUUID
); );
} }

View File

@ -111,7 +111,10 @@ public class Contributors {
new Contributor("Jumala9163", LANG), new Contributor("Jumala9163", LANG),
new Contributor("Dreeam-qwq", CODE), new Contributor("Dreeam-qwq", CODE),
new Contributor("jhqwqmc", LANG), new Contributor("jhqwqmc", LANG),
new Contributor("liuzhen932", LANG) new Contributor("liuzhen932", LANG),
new Contributor("Sniper_TVmc", LANG),
new Contributor("mcmdev", CODE),
new Contributor("ZhangYuheng", CODE)
}; };
private Contributors() { private Contributors() {

View File

@ -18,6 +18,7 @@ package com.djrapitops.plan.delivery.rendering.json;
import com.djrapitops.plan.delivery.domain.DateObj; import com.djrapitops.plan.delivery.domain.DateObj;
import com.djrapitops.plan.delivery.domain.RetentionData; import com.djrapitops.plan.delivery.domain.RetentionData;
import com.djrapitops.plan.delivery.domain.datatransfer.PlayerJoinAddresses;
import com.djrapitops.plan.delivery.domain.datatransfer.ServerDto; import com.djrapitops.plan.delivery.domain.datatransfer.ServerDto;
import com.djrapitops.plan.delivery.domain.mutators.PlayerKillMutator; import com.djrapitops.plan.delivery.domain.mutators.PlayerKillMutator;
import com.djrapitops.plan.delivery.domain.mutators.SessionsMutator; import com.djrapitops.plan.delivery.domain.mutators.SessionsMutator;
@ -34,6 +35,7 @@ import com.djrapitops.plan.identification.Server;
import com.djrapitops.plan.identification.ServerInfo; import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.identification.ServerUUID; import com.djrapitops.plan.identification.ServerUUID;
import com.djrapitops.plan.settings.config.PlanConfig; import com.djrapitops.plan.settings.config.PlanConfig;
import com.djrapitops.plan.settings.config.paths.DataGatheringSettings;
import com.djrapitops.plan.settings.config.paths.DisplaySettings; import com.djrapitops.plan.settings.config.paths.DisplaySettings;
import com.djrapitops.plan.settings.config.paths.TimeSettings; import com.djrapitops.plan.settings.config.paths.TimeSettings;
import com.djrapitops.plan.settings.locale.Locale; import com.djrapitops.plan.settings.locale.Locale;
@ -48,6 +50,7 @@ import com.djrapitops.plan.storage.database.queries.analysis.PlayerRetentionQuer
import com.djrapitops.plan.storage.database.queries.objects.*; import com.djrapitops.plan.storage.database.queries.objects.*;
import com.djrapitops.plan.storage.database.queries.objects.playertable.NetworkTablePlayersQuery; import com.djrapitops.plan.storage.database.queries.objects.playertable.NetworkTablePlayersQuery;
import com.djrapitops.plan.storage.database.queries.objects.playertable.ServerTablePlayersQuery; import com.djrapitops.plan.storage.database.queries.objects.playertable.ServerTablePlayersQuery;
import com.djrapitops.plan.storage.database.sql.tables.JoinAddressTable;
import com.djrapitops.plan.utilities.comparators.SessionStartComparator; import com.djrapitops.plan.utilities.comparators.SessionStartComparator;
import com.djrapitops.plan.utilities.dev.Untrusted; import com.djrapitops.plan.utilities.dev.Untrusted;
import com.djrapitops.plan.utilities.java.Maps; import com.djrapitops.plan.utilities.java.Maps;
@ -160,14 +163,52 @@ public class JSONFactory {
return db.query(PlayerRetentionQueries.fetchRetentionData()); return db.query(PlayerRetentionQueries.fetchRetentionData());
} }
public Map<UUID, String> playerJoinAddresses(ServerUUID serverUUID) { private static void removeFiltered(Map<UUID, String> addressByPlayerUUID, List<String> filteredJoinAddresses) {
Database db = dbSystem.getDatabase(); if (filteredJoinAddresses.isEmpty() || filteredJoinAddresses.equals(List.of("play.example.com"))) return;
return db.query(JoinAddressQueries.latestJoinAddressesOfPlayers(serverUUID));
Set<UUID> toRemove = new HashSet<>();
// Remove filtered addresses from the data
for (Map.Entry<UUID, String> entry : addressByPlayerUUID.entrySet()) {
if (filteredJoinAddresses.contains(entry.getValue())) {
toRemove.add(entry.getKey());
}
}
for (UUID playerUUID : toRemove) {
addressByPlayerUUID.put(playerUUID, JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP);
}
} }
public Map<UUID, String> playerJoinAddresses() { public PlayerJoinAddresses playerJoinAddresses(ServerUUID serverUUID, boolean includeByPlayerMap) {
Database db = dbSystem.getDatabase(); Database db = dbSystem.getDatabase();
return db.query(JoinAddressQueries.latestJoinAddressesOfPlayers()); List<String> filteredJoinAddresses = config.get(DataGatheringSettings.FILTER_JOIN_ADDRESSES);
if (includeByPlayerMap) {
Map<UUID, String> addresses = db.query(JoinAddressQueries.latestJoinAddressesOfPlayers(serverUUID));
removeFiltered(addresses, filteredJoinAddresses);
return new PlayerJoinAddresses(
addresses.values().stream().distinct().sorted().collect(Collectors.toList()),
addresses
);
} else {
List<String> addresses = db.query(JoinAddressQueries.uniqueJoinAddresses(serverUUID));
addresses.removeAll(filteredJoinAddresses);
return new PlayerJoinAddresses(addresses, null);
}
}
public PlayerJoinAddresses playerJoinAddresses(boolean includeByPlayerMap) {
Database db = dbSystem.getDatabase();
List<String> filteredJoinAddresses = config.get(DataGatheringSettings.FILTER_JOIN_ADDRESSES);
List<String> unique = db.query(JoinAddressQueries.uniqueJoinAddresses());
unique.removeAll(filteredJoinAddresses);
if (includeByPlayerMap) {
Map<UUID, String> latest = db.query(JoinAddressQueries.latestJoinAddressesOfPlayers());
removeFiltered(latest, filteredJoinAddresses);
return new PlayerJoinAddresses(unique, latest);
} else {
return new PlayerJoinAddresses(unique, null);
}
} }
public List<Map<String, Object>> serverSessionsAsJSONMap(ServerUUID serverUUID) { public List<Map<String, Object>> serverSessionsAsJSONMap(ServerUUID serverUUID) {

View File

@ -154,9 +154,9 @@ public class PlayerJSONCreator {
private Map<String, Object> createPingGraphJson(PlayerContainer player) { private Map<String, Object> createPingGraphJson(PlayerContainer player) {
PingGraph pingGraph = graphs.line().pingGraph(player.getUnsafe(PlayerKeys.PING)); PingGraph pingGraph = graphs.line().pingGraph(player.getUnsafe(PlayerKeys.PING));
return Maps.builder(String.class, Object.class) return Maps.builder(String.class, Object.class)
.put("min_ping_series", pingGraph.getMinGraph().getPoints()) .put("min_ping_series", pingGraph.getMinGraph().getPointArrays())
.put("avg_ping_series", pingGraph.getAvgGraph().getPoints()) .put("avg_ping_series", pingGraph.getAvgGraph().getPointArrays())
.put("max_ping_series", pingGraph.getMaxGraph().getPoints()) .put("max_ping_series", pingGraph.getMaxGraph().getPointArrays())
.put("colors", Maps.builder(String.class, String.class) .put("colors", Maps.builder(String.class, String.class)
.put("min", theme.getValue(ThemeVal.GRAPH_MIN_PING)) .put("min", theme.getValue(ThemeVal.GRAPH_MIN_PING))
.put("avg", theme.getValue(ThemeVal.GRAPH_AVG_PING)) .put("avg", theme.getValue(ThemeVal.GRAPH_AVG_PING))

View File

@ -32,7 +32,6 @@ import com.djrapitops.plan.delivery.rendering.json.graphs.line.LineGraphFactory;
import com.djrapitops.plan.delivery.rendering.json.graphs.line.PingGraph; import com.djrapitops.plan.delivery.rendering.json.graphs.line.PingGraph;
import com.djrapitops.plan.delivery.rendering.json.graphs.line.Point; import com.djrapitops.plan.delivery.rendering.json.graphs.line.Point;
import com.djrapitops.plan.delivery.rendering.json.graphs.pie.Pie; import com.djrapitops.plan.delivery.rendering.json.graphs.pie.Pie;
import com.djrapitops.plan.delivery.rendering.json.graphs.pie.PieSlice;
import com.djrapitops.plan.delivery.rendering.json.graphs.pie.WorldPie; import com.djrapitops.plan.delivery.rendering.json.graphs.pie.WorldPie;
import com.djrapitops.plan.delivery.rendering.json.graphs.special.WorldMap; import com.djrapitops.plan.delivery.rendering.json.graphs.special.WorldMap;
import com.djrapitops.plan.delivery.rendering.json.graphs.stack.StackGraph; import com.djrapitops.plan.delivery.rendering.json.graphs.stack.StackGraph;
@ -57,7 +56,7 @@ import com.djrapitops.plan.storage.database.queries.analysis.PlayerCountQueries;
import com.djrapitops.plan.storage.database.queries.objects.*; import com.djrapitops.plan.storage.database.queries.objects.*;
import com.djrapitops.plan.storage.database.sql.tables.JoinAddressTable; import com.djrapitops.plan.storage.database.sql.tables.JoinAddressTable;
import com.djrapitops.plan.utilities.comparators.DateHolderOldestComparator; import com.djrapitops.plan.utilities.comparators.DateHolderOldestComparator;
import com.djrapitops.plan.utilities.comparators.PieSliceComparator; import com.djrapitops.plan.utilities.dev.Untrusted;
import com.djrapitops.plan.utilities.java.Lists; import com.djrapitops.plan.utilities.java.Lists;
import com.djrapitops.plan.utilities.java.Maps; import com.djrapitops.plan.utilities.java.Maps;
import net.playeranalytics.plugin.scheduling.TimeAmount; import net.playeranalytics.plugin.scheduling.TimeAmount;
@ -457,34 +456,6 @@ public class GraphJSONCreator {
.build(); .build();
} }
public Map<String, Object> playerHostnamePieJSONAsMap() {
String[] pieColors = theme.getPieColors(ThemeVal.GRAPH_WORLD_PIE);
Map<String, Integer> joinAddresses = dbSystem.getDatabase().query(JoinAddressQueries.latestJoinAddresses());
translateUnknown(joinAddresses);
List<PieSlice> slices = graphs.pie().joinAddressPie(joinAddresses).getSlices();
slices.sort(new PieSliceComparator());
return Maps.builder(String.class, Object.class)
.put("colors", pieColors)
.put("slices", slices)
.build();
}
public Map<String, Object> playerHostnamePieJSONAsMap(ServerUUID serverUUID) {
String[] pieColors = theme.getPieColors(ThemeVal.GRAPH_WORLD_PIE);
Map<String, Integer> joinAddresses = dbSystem.getDatabase().query(JoinAddressQueries.latestJoinAddresses(serverUUID));
translateUnknown(joinAddresses);
List<PieSlice> slices = graphs.pie().joinAddressPie(joinAddresses).getSlices();
slices.sort(new PieSliceComparator());
return Maps.builder(String.class, Object.class)
.put("colors", pieColors)
.put("slices", slices)
.build();
}
public void translateUnknown(Map<String, Integer> joinAddresses) { public void translateUnknown(Map<String, Integer> joinAddresses) {
Integer unknown = joinAddresses.get(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP); Integer unknown = joinAddresses.get(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP);
if (unknown != null) { if (unknown != null) {
@ -493,33 +464,65 @@ public class GraphJSONCreator {
} }
} }
public Map<String, Object> joinAddressesByDay(ServerUUID serverUUID, long after, long before) { public Map<String, Object> joinAddressesByDay(ServerUUID serverUUID, long after, long before, @Untrusted List<String> addressFilter) {
String[] pieColors = theme.getPieColors(ThemeVal.GRAPH_WORLD_PIE); String[] pieColors = theme.getPieColors(ThemeVal.GRAPH_WORLD_PIE);
List<DateObj<Map<String, Integer>>> joinAddresses = dbSystem.getDatabase().query(JoinAddressQueries.joinAddressesPerDay(serverUUID, config.getTimeZone().getOffset(System.currentTimeMillis()), after, before)); List<DateObj<Map<String, Integer>>> joinAddresses = dbSystem.getDatabase().query(JoinAddressQueries.joinAddressesPerDay(serverUUID, config.getTimeZone().getOffset(System.currentTimeMillis()), after, before, addressFilter));
return mapToJson(pieColors, joinAddresses); return mapToJson(pieColors, joinAddresses);
} }
public Map<String, Object> joinAddressesByDay(long after, long before) { public Map<String, Object> joinAddressesByDay(long after, long before, @Untrusted List<String> addressFilter) {
String[] pieColors = theme.getPieColors(ThemeVal.GRAPH_WORLD_PIE); String[] pieColors = theme.getPieColors(ThemeVal.GRAPH_WORLD_PIE);
List<DateObj<Map<String, Integer>>> joinAddresses = dbSystem.getDatabase().query(JoinAddressQueries.joinAddressesPerDay(config.getTimeZone().getOffset(System.currentTimeMillis()), after, before)); List<DateObj<Map<String, Integer>>> joinAddresses = dbSystem.getDatabase().query(JoinAddressQueries.joinAddressesPerDay(config.getTimeZone().getOffset(System.currentTimeMillis()), after, before, addressFilter));
return mapToJson(pieColors, joinAddresses); return mapToJson(pieColors, joinAddresses);
} }
private static void removeFilteredAddresses(List<JoinAddressCount> addresses, List<String> filteredJoinAddresses) {
if (filteredJoinAddresses.isEmpty() || filteredJoinAddresses.equals(List.of("play.example.com"))) return;
List<JoinAddressCount> addressesToRemove = addresses.stream()
.filter(address -> filteredJoinAddresses.contains(address.getJoinAddress()))
.collect(Collectors.toList());
if (!addressesToRemove.isEmpty()) {
Optional<JoinAddressCount> foundUnknownAddressCount = addresses.stream()
.filter(address -> address.getJoinAddress().equals(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP))
.findFirst();
JoinAddressCount unknownAddressCount;
if (foundUnknownAddressCount.isEmpty()) {
unknownAddressCount = new JoinAddressCount(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP, 0);
addresses.add(unknownAddressCount);
} else {
unknownAddressCount = foundUnknownAddressCount.get();
}
for (JoinAddressCount toRemove : addressesToRemove) {
unknownAddressCount.setCount(unknownAddressCount.getCount() + toRemove.getCount());
addresses.remove(toRemove);
}
}
}
private Map<String, Object> mapToJson(String[] pieColors, List<DateObj<Map<String, Integer>>> joinAddresses) { private Map<String, Object> mapToJson(String[] pieColors, List<DateObj<Map<String, Integer>>> joinAddresses) {
for (DateObj<Map<String, Integer>> addressesByDate : joinAddresses) { for (DateObj<Map<String, Integer>> addressesByDate : joinAddresses) {
translateUnknown(addressesByDate.getValue()); translateUnknown(addressesByDate.getValue());
} }
List<String> filteredJoinAddresses = config.get(DataGatheringSettings.FILTER_JOIN_ADDRESSES);
List<JoinAddressCounts> joinAddressCounts = joinAddresses.stream() List<JoinAddressCounts> joinAddressCounts = joinAddresses.stream()
.map(addressesOnDay -> new JoinAddressCounts( .map(addressesOnDay -> {
addressesOnDay.getDate(), List<JoinAddressCount> addresses = addressesOnDay.getValue().entrySet()
addressesOnDay.getValue().entrySet() .stream()
.stream() .map(JoinAddressCount::new)
.map(JoinAddressCount::new) .sorted()
.sorted() .collect(Collectors.toList());
.collect(Collectors.toList())))
removeFilteredAddresses(addresses, filteredJoinAddresses);
return new JoinAddressCounts(addressesOnDay.getDate(), addresses);
})
.sorted(new DateHolderOldestComparator()) .sorted(new DateHolderOldestComparator())
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -537,7 +540,7 @@ public class GraphJSONCreator {
List<ServerSpecificLineGraph> proxyGraphs = new ArrayList<>(); List<ServerSpecificLineGraph> proxyGraphs = new ArrayList<>();
for (Server proxy : db.query(ServerQueries.fetchProxyServers())) { for (Server proxy : db.query(ServerQueries.fetchProxyServers())) {
ServerUUID proxyUUID = proxy.getUuid(); ServerUUID proxyUUID = proxy.getUuid();
List<Double[]> points = Lists.map( List<Number[]> points = Lists.map(
db.query(TPSQueries.fetchPlayersOnlineOfServer(halfYearAgo, now, proxyUUID)), db.query(TPSQueries.fetchPlayersOnlineOfServer(halfYearAgo, now, proxyUUID)),
point -> Point.fromDateObj(point).toArray() point -> Point.fromDateObj(point).toArray()
); );

View File

@ -21,6 +21,7 @@ import com.djrapitops.plan.delivery.rendering.json.graphs.HighChart;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/** /**
* This is a LineGraph for any set of Points, thus it is Abstract. * This is a LineGraph for any set of Points, thus it is Abstract.
@ -80,6 +81,10 @@ public class LineGraph implements HighChart {
return points; return points;
} }
public List<Number[]> getPointArrays() {
return getPoints().stream().map(Point::toArray).collect(Collectors.toList());
}
private void addMissingPoints(StringBuilder arrayBuilder, Long lastX, long date) { private void addMissingPoints(StringBuilder arrayBuilder, Long lastX, long date) {
long iterate = lastX + gapStrategy.diffToFirstGapPointMs; long iterate = lastX + gapStrategy.diffToFirstGapPointMs;
while (iterate < date) { while (iterate < date) {

View File

@ -75,7 +75,7 @@ public class Point {
"y=" + y + '}'; "y=" + y + '}';
} }
public Double[] toArray() { public Number[] toArray() {
return new Double[]{x, y}; return new Number[]{x, y};
} }
} }

View File

@ -1,38 +0,0 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.delivery.rendering.json.graphs.pie;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class JoinAddressPie extends Pie {
JoinAddressPie(Map<String, Integer> joinAddresses) {
super(turnToSlices(joinAddresses));
}
private static List<PieSlice> turnToSlices(Map<String, Integer> joinAddresses) {
List<PieSlice> slices = new ArrayList<>();
for (Map.Entry<String, Integer> address : joinAddresses.entrySet()) {
String joinAddress = address.getKey();
Integer total = address.getValue();
slices.add(new PieSlice(joinAddress, total));
}
return slices;
}
}

View File

@ -68,10 +68,6 @@ public class PieGraphFactory {
return new ServerPreferencePie(playtimeByServerName); return new ServerPreferencePie(playtimeByServerName);
} }
public Pie joinAddressPie(Map<String, Integer> joinAddresses) {
return new JoinAddressPie(joinAddresses);
}
public WorldPie worldPie(WorldTimes worldTimes) { public WorldPie worldPie(WorldTimes worldTimes) {
WorldAliasSettings worldAliasSettings = config.getWorldAliasSettings(); WorldAliasSettings worldAliasSettings = config.getWorldAliasSettings();
Map<String, Long> playtimePerAlias = worldAliasSettings.getPlaytimePerAlias(worldTimes); Map<String, Long> playtimePerAlias = worldAliasSettings.getPlaytimePerAlias(worldTimes);

View File

@ -40,14 +40,7 @@ public class RateLimitGuard {
.expireAfterWrite(120, TimeUnit.SECONDS) .expireAfterWrite(120, TimeUnit.SECONDS)
.build(); .build();
public boolean shouldPreventRequest(@Untrusted String accessor) { public boolean shouldPreventRequest(@Untrusted String requestPath, @Untrusted String accessor) {
Integer attempts = requests.getIfPresent(accessor);
if (attempts == null) return false;
// Too many attempts, forbid further attempts.
return attempts >= ATTEMPT_LIMIT;
}
public void increaseAttemptCount(@Untrusted String requestPath, @Untrusted String accessor) {
String previous = lastRequestPath.getIfPresent(accessor); String previous = lastRequestPath.getIfPresent(accessor);
if (!Objects.equals(previous, requestPath)) { if (!Objects.equals(previous, requestPath)) {
resetAttemptCount(accessor); resetAttemptCount(accessor);
@ -60,23 +53,23 @@ public class RateLimitGuard {
lastRequestPath.put(accessor, requestPath); lastRequestPath.put(accessor, requestPath);
requests.put(accessor, attempts + 1); requests.put(accessor, attempts + 1);
// Too many attempts, forbid further attempts.
return attempts + 1 >= ATTEMPT_LIMIT;
} }
public void resetAttemptCount(@Untrusted String accessor) { public void resetAttemptCount(@Untrusted String accessor) {
// previous request changed // previous request changed
requests.cleanUp();
requests.invalidate(accessor); requests.invalidate(accessor);
requests.cleanUp();
} }
public static class Disabled extends RateLimitGuard { public static class Disabled extends RateLimitGuard {
@Override @Override
public boolean shouldPreventRequest(String accessor) { public boolean shouldPreventRequest(@Untrusted String requestedPath, String accessor) {
return false; return false;
} }
@Override
public void increaseAttemptCount(String requestPath, String accessor) { /* Disabled */ }
@Override @Override
public void resetAttemptCount(String accessor) { /* Disabled */ } public void resetAttemptCount(String accessor) { /* Disabled */ }
} }

View File

@ -42,7 +42,6 @@ public enum DataID {
GRAPH_ACTIVITY, GRAPH_ACTIVITY,
GRAPH_PING, GRAPH_PING,
GRAPH_SERVER_PIE, GRAPH_SERVER_PIE,
GRAPH_HOSTNAME_PIE,
GRAPH_PUNCHCARD, GRAPH_PUNCHCARD,
SERVER_OVERVIEW, SERVER_OVERVIEW,
ONLINE_OVERVIEW, ONLINE_OVERVIEW,
@ -54,11 +53,26 @@ public enum DataID {
EXTENSION_TABS, EXTENSION_TABS,
EXTENSION_JSON, EXTENSION_JSON,
LIST_SERVERS, LIST_SERVERS,
JOIN_ADDRESSES_BY_DAY, JOIN_ADDRESSES_BY_DAY(false),
PLAYER_RETENTION, PLAYER_RETENTION,
PLAYER_JOIN_ADDRESSES, PLAYER_JOIN_ADDRESSES,
PLAYER_ALLOWLIST_BOUNCES,
; ;
private final boolean cacheable;
DataID() {
this(true);
}
DataID(boolean cacheable) {
this.cacheable = cacheable;
}
public boolean isCacheable() {
return cacheable;
}
public String of(ServerUUID serverUUID) { public String of(ServerUUID serverUUID) {
if (serverUUID == null) return name(); if (serverUUID == null) return name();
return name() + "_" + serverUUID; return name() + "_" + serverUUID;

View File

@ -74,6 +74,10 @@ public interface JSONStorage extends SubSystem {
this.timestamp = timestamp; this.timestamp = timestamp;
} }
public static StoredJSON fromObject(Object json, long timestamp) {
return new StoredJSON(new Gson().toJson(json), timestamp);
}
public String getJson() { public String getJson() {
return json; return json;
} }

View File

@ -72,7 +72,7 @@ public class WebserverLogMessages {
} }
public void warnWebserverDisabledByConfig() { public void warnWebserverDisabledByConfig() {
logger.warn(locale.getString(PluginLang.ENABLE_NOTIFY_WEB_SERVER_DISABLED)); logger.info(locale.getString(PluginLang.ENABLE_NOTIFY_WEB_SERVER_DISABLED));
} }
public void keystoreNotFoundError(InvalidPathException error, String keyStorePath) { public void keystoreNotFoundError(InvalidPathException error, String keyStorePath) {

View File

@ -58,7 +58,6 @@ public class RequestHandler {
public Response getResponse(InternalRequest internalRequest) { public Response getResponse(InternalRequest internalRequest) {
@Untrusted String accessAddress = internalRequest.getAccessAddress(webserverConfiguration); @Untrusted String accessAddress = internalRequest.getAccessAddress(webserverConfiguration);
@Untrusted String requestedPath = internalRequest.getRequestedPath(); @Untrusted String requestedPath = internalRequest.getRequestedPath();
rateLimitGuard.increaseAttemptCount(requestedPath, accessAddress);
boolean blocked = false; boolean blocked = false;
Response response; Response response;
@ -66,7 +65,7 @@ public class RequestHandler {
if (bruteForceGuard.shouldPreventRequest(accessAddress)) { if (bruteForceGuard.shouldPreventRequest(accessAddress)) {
response = responseFactory.failedLoginAttempts403(); response = responseFactory.failedLoginAttempts403();
blocked = true; blocked = true;
} else if (rateLimitGuard.shouldPreventRequest(accessAddress)) { } else if (rateLimitGuard.shouldPreventRequest(requestedPath, accessAddress)) {
response = responseFactory.failedRateLimit403(); response = responseFactory.failedRateLimit403();
blocked = true; blocked = true;
} else if (!webserverConfiguration.getAllowedIpList().isAllowed(accessAddress)) { } else if (!webserverConfiguration.getAllowedIpList().isAllowed(accessAddress)) {

View File

@ -0,0 +1,119 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.delivery.webserver.resolver.json;
import com.djrapitops.plan.delivery.domain.auth.WebPermission;
import com.djrapitops.plan.delivery.formatting.Formatter;
import com.djrapitops.plan.delivery.web.resolver.MimeType;
import com.djrapitops.plan.delivery.web.resolver.Response;
import com.djrapitops.plan.delivery.web.resolver.request.Request;
import com.djrapitops.plan.delivery.web.resolver.request.WebUser;
import com.djrapitops.plan.delivery.webserver.cache.AsyncJSONResolverService;
import com.djrapitops.plan.delivery.webserver.cache.DataID;
import com.djrapitops.plan.delivery.webserver.cache.JSONStorage;
import com.djrapitops.plan.identification.Identifiers;
import com.djrapitops.plan.identification.ServerUUID;
import com.djrapitops.plan.storage.database.DBSystem;
import com.djrapitops.plan.storage.database.Database;
import com.djrapitops.plan.storage.database.queries.objects.AllowlistQueries;
import com.djrapitops.plan.storage.database.queries.objects.SessionQueries;
import com.djrapitops.plan.utilities.dev.Untrusted;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import org.jetbrains.annotations.Nullable;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.Map;
import java.util.Optional;
/**
* Response resolver to get game allowlist bounces.
*
* @author AuroraLS3
*/
@Singleton
@Path("/v1/gameAllowlistBounces")
public class AllowlistJSONResolver extends JSONResolver {
private final DBSystem dbSystem;
private final Identifiers identifiers;
private final AsyncJSONResolverService jsonResolverService;
@Inject
public AllowlistJSONResolver(DBSystem dbSystem, Identifiers identifiers, AsyncJSONResolverService jsonResolverService) {
this.dbSystem = dbSystem;
this.identifiers = identifiers;
this.jsonResolverService = jsonResolverService;
}
@Override
public Formatter<Long> getHttpLastModifiedFormatter() {return jsonResolverService.getHttpLastModifiedFormatter();}
@Override
public boolean canAccess(@Untrusted Request request) {
WebUser user = request.getUser().orElse(new WebUser(""));
return user.hasPermission(WebPermission.PAGE_SERVER_ALLOWLIST_BOUNCE);
}
@GET
@Operation(
description = "Get allowlist bounce data for server",
responses = {
@ApiResponse(responseCode = "200", content = @Content(mediaType = MimeType.JSON)),
@ApiResponse(responseCode = "400", description = "If 'server' parameter is not an existing server")
},
parameters = @Parameter(in = ParameterIn.QUERY, name = "server", description = "Server identifier to get data for (optional)", examples = {
@ExampleObject("Server 1"),
@ExampleObject("1"),
@ExampleObject("1fb39d2a-eb82-4868-b245-1fad17d823b3"),
}),
requestBody = @RequestBody(content = @Content(examples = @ExampleObject()))
)
@Override
public Optional<Response> resolve(@Untrusted Request request) {
return Optional.of(getResponse(request));
}
private Response getResponse(@Untrusted Request request) {
JSONStorage.StoredJSON result = getStoredJSON(request);
return getCachedOrNewResponse(request, result);
}
@Nullable
private JSONStorage.StoredJSON getStoredJSON(Request request) {
Optional<Long> timestamp = Identifiers.getTimestamp(request);
ServerUUID serverUUID = identifiers.getServerUUID(request);
Database database = dbSystem.getDatabase();
return jsonResolverService.resolve(timestamp, DataID.PLAYER_ALLOWLIST_BOUNCES, serverUUID,
theUUID -> Map.of(
"allowlist_bounces", database.query(AllowlistQueries.getBounces(serverUUID)),
"last_seen_by_uuid", database.query(SessionQueries.lastSeen(serverUUID))
)
);
}
}

View File

@ -39,11 +39,16 @@ import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponse;
import jakarta.ws.rs.GET; import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path; import jakarta.ws.rs.Path;
import org.apache.commons.lang3.StringUtils;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.function.Function;
import java.util.function.Supplier;
/** /**
* Resolves /v1/graph JSON requests. * Resolves /v1/graph JSON requests.
@ -117,7 +122,6 @@ public class GraphsJSONResolver extends JSONResolver {
@ExampleObject("aggregatedPing"), @ExampleObject("aggregatedPing"),
@ExampleObject("punchCard"), @ExampleObject("punchCard"),
@ExampleObject("serverPie"), @ExampleObject("serverPie"),
@ExampleObject("joinAddressPie"),
@ExampleObject("joinAddressByDay"), @ExampleObject("joinAddressByDay"),
}), }),
@Parameter(in = ParameterIn.QUERY, name = "server", description = "Server identifier to get data for", examples = { @Parameter(in = ParameterIn.QUERY, name = "server", description = "Server identifier to get data for", examples = {
@ -156,15 +160,22 @@ public class GraphsJSONResolver extends JSONResolver {
JSONStorage.StoredJSON storedJSON; JSONStorage.StoredJSON storedJSON;
if (request.getQuery().get("server").isPresent()) { if (request.getQuery().get("server").isPresent()) {
ServerUUID serverUUID = identifiers.getServerUUID(request); // Can throw BadRequestException ServerUUID serverUUID = identifiers.getServerUUID(request); // Can throw BadRequestException
storedJSON = jsonResolverService.resolve( Function<ServerUUID, Object> generationFunction = theServerUUID -> generateGraphDataJSONOfType(dataID, theServerUUID, request.getQuery());
timestamp, dataID, serverUUID, if (dataID.isCacheable()) {
theServerUUID -> generateGraphDataJSONOfType(dataID, theServerUUID, request.getQuery()) storedJSON = jsonResolverService.resolve(timestamp, dataID, serverUUID, generationFunction);
); } else {
storedJSON = JSONStorage.StoredJSON.fromObject(generationFunction.apply(serverUUID), System.currentTimeMillis());
}
} else { } else {
// Assume network // Assume network
storedJSON = jsonResolverService.resolve( Supplier<Object> generationFunction = () -> generateGraphDataJSONOfType(dataID, request.getQuery());
timestamp, dataID, () -> generateGraphDataJSONOfType(dataID, request.getQuery()) if (dataID.isCacheable()) {
); storedJSON = jsonResolverService.resolve(
timestamp, dataID, generationFunction
);
} else {
storedJSON = JSONStorage.StoredJSON.fromObject(generationFunction.get(), System.currentTimeMillis());
}
} }
return storedJSON; return storedJSON;
} }
@ -197,8 +208,6 @@ public class GraphsJSONResolver extends JSONResolver {
return DataID.GRAPH_PUNCHCARD; return DataID.GRAPH_PUNCHCARD;
case "serverPie": case "serverPie":
return DataID.GRAPH_SERVER_PIE; return DataID.GRAPH_SERVER_PIE;
case "joinAddressPie":
return DataID.GRAPH_HOSTNAME_PIE;
case "joinAddressByDay": case "joinAddressByDay":
return DataID.JOIN_ADDRESSES_BY_DAY; return DataID.JOIN_ADDRESSES_BY_DAY;
default: default:
@ -229,8 +238,6 @@ public class GraphsJSONResolver extends JSONResolver {
return List.of(WebPermission.PAGE_SERVER_PLAYERBASE_GRAPHS); return List.of(WebPermission.PAGE_SERVER_PLAYERBASE_GRAPHS);
case GRAPH_WORLD_MAP: case GRAPH_WORLD_MAP:
return List.of(WebPermission.PAGE_SERVER_GEOLOCATIONS_MAP); return List.of(WebPermission.PAGE_SERVER_GEOLOCATIONS_MAP);
case GRAPH_HOSTNAME_PIE:
return List.of(WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_PIE);
case JOIN_ADDRESSES_BY_DAY: case JOIN_ADDRESSES_BY_DAY:
return List.of(WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_TIME); return List.of(WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_TIME);
default: default:
@ -258,8 +265,6 @@ public class GraphsJSONResolver extends JSONResolver {
return List.of(WebPermission.PAGE_NETWORK_GEOLOCATIONS_MAP); return List.of(WebPermission.PAGE_NETWORK_GEOLOCATIONS_MAP);
case GRAPH_ONLINE_PROXIES: case GRAPH_ONLINE_PROXIES:
return List.of(WebPermission.PAGE_NETWORK_OVERVIEW_GRAPHS_ONLINE); return List.of(WebPermission.PAGE_NETWORK_OVERVIEW_GRAPHS_ONLINE);
case GRAPH_HOSTNAME_PIE:
return List.of(WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_PIE);
case JOIN_ADDRESSES_BY_DAY: case JOIN_ADDRESSES_BY_DAY:
return List.of(WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_TIME); return List.of(WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_TIME);
default: default:
@ -283,8 +288,6 @@ public class GraphsJSONResolver extends JSONResolver {
return graphJSON.serverCalendarJSON(serverUUID); return graphJSON.serverCalendarJSON(serverUUID);
case GRAPH_WORLD_PIE: case GRAPH_WORLD_PIE:
return graphJSON.serverWorldPieJSONAsMap(serverUUID); return graphJSON.serverWorldPieJSONAsMap(serverUUID);
case GRAPH_HOSTNAME_PIE:
return graphJSON.playerHostnamePieJSONAsMap(serverUUID);
case GRAPH_ACTIVITY: case GRAPH_ACTIVITY:
return graphJSON.activityGraphsJSONAsMap(serverUUID); return graphJSON.activityGraphsJSONAsMap(serverUUID);
case GRAPH_WORLD_MAP: case GRAPH_WORLD_MAP:
@ -294,19 +297,24 @@ public class GraphsJSONResolver extends JSONResolver {
case GRAPH_PUNCHCARD: case GRAPH_PUNCHCARD:
return graphJSON.punchCardJSONAsMap(serverUUID); return graphJSON.punchCardJSONAsMap(serverUUID);
case JOIN_ADDRESSES_BY_DAY: case JOIN_ADDRESSES_BY_DAY:
try { return joinAddressGraph(serverUUID, query);
return graphJSON.joinAddressesByDay(serverUUID,
query.get("after").map(Long::parseLong).orElse(0L),
query.get("before").map(Long::parseLong).orElse(System.currentTimeMillis())
);
} catch (@Untrusted NumberFormatException e) {
throw new BadRequestException("'after' or 'before' is not a epoch millisecond (number)");
}
default: default:
throw new BadRequestException("Graph type not supported with server-parameter (" + id.name() + ")"); throw new BadRequestException("Graph type not supported with server-parameter (" + id.name() + ")");
} }
} }
private Map<String, Object> joinAddressGraph(ServerUUID serverUUID, @Untrusted URIQuery query) {
try {
Long after = query.get("after").map(Long::parseLong).orElse(0L);
Long before = query.get("before").map(Long::parseLong).orElse(System.currentTimeMillis());
@Untrusted List<String> addressFilter = query.get("addresses").map(s -> StringUtils.split(s, ','))
.map(Arrays::asList).orElse(List.of());
return graphJSON.joinAddressesByDay(serverUUID, after, before, addressFilter);
} catch (@Untrusted NumberFormatException e) {
throw new BadRequestException("'after' or 'before' is not a epoch millisecond (number)");
}
}
private Object generateGraphDataJSONOfType(DataID id, @Untrusted URIQuery query) { private Object generateGraphDataJSONOfType(DataID id, @Untrusted URIQuery query) {
switch (id) { switch (id) {
case GRAPH_ACTIVITY: case GRAPH_ACTIVITY:
@ -319,23 +327,26 @@ public class GraphsJSONResolver extends JSONResolver {
return graphJSON.networkCalendarJSON(); return graphJSON.networkCalendarJSON();
case GRAPH_SERVER_PIE: case GRAPH_SERVER_PIE:
return graphJSON.serverPreferencePieJSONAsMap(); return graphJSON.serverPreferencePieJSONAsMap();
case GRAPH_HOSTNAME_PIE:
return graphJSON.playerHostnamePieJSONAsMap();
case GRAPH_WORLD_MAP: case GRAPH_WORLD_MAP:
return graphJSON.geolocationGraphsJSONAsMap(); return graphJSON.geolocationGraphsJSONAsMap();
case GRAPH_ONLINE_PROXIES: case GRAPH_ONLINE_PROXIES:
return graphJSON.proxyPlayersOnlineGraphs(); return graphJSON.proxyPlayersOnlineGraphs();
case JOIN_ADDRESSES_BY_DAY: case JOIN_ADDRESSES_BY_DAY:
try { return joinAddressGraph(query);
return graphJSON.joinAddressesByDay(
query.get("after").map(Long::parseLong).orElse(0L),
query.get("before").map(Long::parseLong).orElse(System.currentTimeMillis())
);
} catch (@Untrusted NumberFormatException e) {
throw new BadRequestException("'after' or 'before' is not a epoch millisecond (number)");
}
default: default:
throw new BadRequestException("Graph type not supported without server-parameter (" + id.name() + ")"); throw new BadRequestException("Graph type not supported without server-parameter (" + id.name() + ")");
} }
} }
private Map<String, Object> joinAddressGraph(URIQuery query) {
try {
Long after = query.get("after").map(Long::parseLong).orElse(0L);
Long before = query.get("before").map(Long::parseLong).orElse(System.currentTimeMillis());
@Untrusted List<String> addressFilter = query.get("addresses").map(s -> StringUtils.split(s, ','))
.map(Arrays::asList).orElse(List.of());
return graphJSON.joinAddressesByDay(after, before, addressFilter);
} catch (@Untrusted NumberFormatException e) {
throw new BadRequestException("'after' or 'before' is not a epoch millisecond (number)");
}
}
} }

View File

@ -17,11 +17,13 @@
package com.djrapitops.plan.delivery.webserver.resolver.json; package com.djrapitops.plan.delivery.webserver.resolver.json;
import com.djrapitops.plan.delivery.domain.auth.WebPermission; import com.djrapitops.plan.delivery.domain.auth.WebPermission;
import com.djrapitops.plan.delivery.domain.datatransfer.PlayerJoinAddresses;
import com.djrapitops.plan.delivery.formatting.Formatter; import com.djrapitops.plan.delivery.formatting.Formatter;
import com.djrapitops.plan.delivery.rendering.json.JSONFactory; import com.djrapitops.plan.delivery.rendering.json.JSONFactory;
import com.djrapitops.plan.delivery.web.resolver.MimeType; import com.djrapitops.plan.delivery.web.resolver.MimeType;
import com.djrapitops.plan.delivery.web.resolver.Response; import com.djrapitops.plan.delivery.web.resolver.Response;
import com.djrapitops.plan.delivery.web.resolver.request.Request; import com.djrapitops.plan.delivery.web.resolver.request.Request;
import com.djrapitops.plan.delivery.web.resolver.request.URIQuery;
import com.djrapitops.plan.delivery.web.resolver.request.WebUser; import com.djrapitops.plan.delivery.web.resolver.request.WebUser;
import com.djrapitops.plan.delivery.webserver.cache.AsyncJSONResolverService; import com.djrapitops.plan.delivery.webserver.cache.AsyncJSONResolverService;
import com.djrapitops.plan.delivery.webserver.cache.DataID; import com.djrapitops.plan.delivery.webserver.cache.DataID;
@ -34,6 +36,7 @@ import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn; import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponse;
import jakarta.ws.rs.GET; import jakarta.ws.rs.GET;
@ -42,7 +45,6 @@ import org.jetbrains.annotations.Nullable;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import java.util.Collections;
import java.util.Optional; import java.util.Optional;
/** /**
@ -69,17 +71,27 @@ public class PlayerJoinAddressJSONResolver extends JSONResolver {
@Override @Override
public boolean canAccess(@Untrusted Request request) { public boolean canAccess(@Untrusted Request request) {
WebUser user = request.getUser().orElse(new WebUser("")); WebUser user = request.getUser().orElse(new WebUser(""));
if (request.getQuery().get("server").isPresent()) { @Untrusted URIQuery query = request.getQuery();
return user.hasPermission(WebPermission.PAGE_SERVER_RETENTION); Optional<String> listOnly = query.get("listOnly");
if (query.get("server").isPresent()) {
if (listOnly.isEmpty()) {
return user.hasPermission(WebPermission.PAGE_SERVER_RETENTION);
} else {
return user.hasPermission(WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_TIME);
}
}
if (listOnly.isEmpty()) {
return user.hasPermission(WebPermission.PAGE_NETWORK_RETENTION);
} else {
return user.hasPermission(WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_TIME);
} }
return user.hasPermission(WebPermission.PAGE_NETWORK_RETENTION);
} }
@GET @GET
@Operation( @Operation(
description = "Get join address information of players for server or network", description = "Get join address information of players for server or network",
responses = { responses = {
@ApiResponse(responseCode = "200", content = @Content(mediaType = MimeType.JSON)), @ApiResponse(responseCode = "200", content = @Content(mediaType = MimeType.JSON, schema = @Schema(implementation = PlayerJoinAddresses.class))),
@ApiResponse(responseCode = "400", description = "If 'server' parameter is not an existing server") @ApiResponse(responseCode = "400", description = "If 'server' parameter is not an existing server")
}, },
parameters = @Parameter(in = ParameterIn.QUERY, name = "server", description = "Server identifier to get data for (optional)", examples = { parameters = @Parameter(in = ParameterIn.QUERY, name = "server", description = "Server identifier to get data for (optional)", examples = {
@ -105,12 +117,12 @@ public class PlayerJoinAddressJSONResolver extends JSONResolver {
if (request.getQuery().get("server").isPresent()) { if (request.getQuery().get("server").isPresent()) {
ServerUUID serverUUID = identifiers.getServerUUID(request); ServerUUID serverUUID = identifiers.getServerUUID(request);
return jsonResolverService.resolve(timestamp, DataID.PLAYER_JOIN_ADDRESSES, serverUUID, return jsonResolverService.resolve(timestamp, DataID.PLAYER_JOIN_ADDRESSES, serverUUID,
theUUID -> Collections.singletonMap("join_address_by_player", jsonFactory.playerJoinAddresses(theUUID)) serverUUID1 -> jsonFactory.playerJoinAddresses(serverUUID1, request.getQuery().get("listOnly").isEmpty())
); );
} }
// Assume network // Assume network
return jsonResolverService.resolve(timestamp, DataID.PLAYER_JOIN_ADDRESSES, return jsonResolverService.resolve(timestamp, DataID.PLAYER_JOIN_ADDRESSES,
() -> Collections.singletonMap("join_address_by_player", jsonFactory.playerJoinAddresses()) () -> jsonFactory.playerJoinAddresses(request.getQuery().get("listOnly").isEmpty())
); );
} }
} }

View File

@ -90,6 +90,7 @@ public class RootJSONResolver {
RetentionJSONResolver retentionJSONResolver, RetentionJSONResolver retentionJSONResolver,
PlayerJoinAddressJSONResolver playerJoinAddressJSONResolver, PlayerJoinAddressJSONResolver playerJoinAddressJSONResolver,
PluginHistoryJSONResolver pluginHistoryJSONResolver, PluginHistoryJSONResolver pluginHistoryJSONResolver,
AllowlistJSONResolver allowlistJSONResolver,
PreferencesJSONResolver preferencesJSONResolver, PreferencesJSONResolver preferencesJSONResolver,
StorePreferencesJSONResolver storePreferencesJSONResolver, StorePreferencesJSONResolver storePreferencesJSONResolver,
@ -129,7 +130,8 @@ public class RootJSONResolver {
.add("extensionData", extensionJSONResolver) .add("extensionData", extensionJSONResolver)
.add("retention", retentionJSONResolver) .add("retention", retentionJSONResolver)
.add("joinAddresses", playerJoinAddressJSONResolver) .add("joinAddresses", playerJoinAddressJSONResolver)
.add("preferences", preferencesJSONResolver); .add("preferences", preferencesJSONResolver)
.add("gameAllowlistBounces", allowlistJSONResolver);
this.webServer = webServer; this.webServer = webServer;
// These endpoints require authentication to be enabled. // These endpoints require authentication to be enabled.

View File

@ -114,7 +114,7 @@ public class FiltersJSONResolver implements Resolver {
)).build(); )).build();
} }
private List<Double[]> fetchViewGraphPoints() { private List<Number[]> fetchViewGraphPoints() {
List<DateObj<Integer>> data = dbSystem.getDatabase().query(TPSQueries.fetchViewPreviewGraphData(serverInfo.getServerUUID())); List<DateObj<Integer>> data = dbSystem.getDatabase().query(TPSQueries.fetchViewPreviewGraphData(serverInfo.getServerUUID()));
Long earliestStart = dbSystem.getDatabase().query(SessionQueries.earliestSessionStart()); Long earliestStart = dbSystem.getDatabase().query(SessionQueries.earliestSessionStart());
data.add(0, new DateObj<>(earliestStart, 1)); data.add(0, new DateObj<>(earliestStart, 1));
@ -136,9 +136,9 @@ public class FiltersJSONResolver implements Resolver {
class FilterResponseDto { class FilterResponseDto {
final List<FilterDto> filters; final List<FilterDto> filters;
final ViewDto view; final ViewDto view;
final List<Double[]> viewPoints; final List<Number[]> viewPoints;
public FilterResponseDto(Map<String, Filter> filtersByKind, ViewDto view, List<Double[]> viewPoints) { public FilterResponseDto(Map<String, Filter> filtersByKind, ViewDto view, List<Number[]> viewPoints) {
this.viewPoints = viewPoints; this.viewPoints = viewPoints;
this.filters = new ArrayList<>(); this.filters = new ArrayList<>();
for (Map.Entry<String, Filter> entry : filtersByKind.entrySet()) { for (Map.Entry<String, Filter> entry : filtersByKind.entrySet()) {

View File

@ -37,6 +37,8 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Collectors;
/** /**
* Endpoint for getting list of available Plan web permissions. * Endpoint for getting list of available Plan web permissions.
@ -75,7 +77,10 @@ public class WebPermissionJSONResolver implements Resolver {
} }
private Response getResponse() { private Response getResponse() {
List<String> permissions = dbSystem.getDatabase().query(WebUserQueries.fetchAvailablePermissions()); List<String> permissions = dbSystem.getDatabase().query(WebUserQueries.fetchAvailablePermissions())
.stream()
.filter(Predicate.not(WebPermission::isDeprecated))
.collect(Collectors.toList());
WebPermissionList permissionList = new WebPermissionList(permissions); WebPermissionList permissionList = new WebPermissionList(permissions);
return Response.builder() return Response.builder()

View File

@ -30,6 +30,7 @@ import java.util.Optional;
public class DBOpException extends IllegalStateException implements ExceptionWithContext { public class DBOpException extends IllegalStateException implements ExceptionWithContext {
public static final String CONSTRAINT_VIOLATION = "Constraint Violation"; public static final String CONSTRAINT_VIOLATION = "Constraint Violation";
public static final String DUPLICATE_KEY = "Duplicate key";
private final ErrorContext context; private final ErrorContext context;
public DBOpException(String message) { public DBOpException(String message) {
@ -77,7 +78,7 @@ public class DBOpException extends IllegalStateException implements ExceptionWit
case 1022: case 1022:
case 23001: case 23001:
case 23505: case 23505:
context.related("Duplicate key") context.related(DUPLICATE_KEY)
.whatToDo("Report this, duplicate key exists in SQL."); .whatToDo("Report this, duplicate key exists in SQL.");
break; break;
// Constraint violation // Constraint violation
@ -165,4 +166,9 @@ public class DBOpException extends IllegalStateException implements ExceptionWit
&& getCause() != null && getCause() != null
&& getCause().getMessage().contains("user_id"); && getCause().getMessage().contains("user_id");
} }
public boolean isDuplicateKeyViolation() {
return context != null
&& context.getRelated().contains(DBOpException.CONSTRAINT_VIOLATION);
}
} }

View File

@ -1,195 +0,0 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.extension.implementation.storage.transactions.results;
import com.djrapitops.plan.storage.database.DBType;
import com.djrapitops.plan.storage.database.sql.tables.UsersTable;
import com.djrapitops.plan.storage.database.sql.tables.extension.*;
import com.djrapitops.plan.storage.database.transactions.ExecStatement;
import com.djrapitops.plan.storage.database.transactions.Executable;
import com.djrapitops.plan.storage.database.transactions.ThrowawayTransaction;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import static com.djrapitops.plan.storage.database.sql.building.Sql.*;
/**
* Transaction to remove older results that violate an updated condition value.
* <p>
* How it works:
* - Select all fulfilled conditions for all players (conditionName when true and not_conditionName when false)
* - Left join with player value and 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
*
* @author AuroraLS3
* @deprecated Cleanup is now done as part of {@link StorePlayerBooleanResultTransaction}.
*/
@Deprecated(since = "2024-03-02")
public class RemoveUnsatisfiedConditionalPlayerResultsTransaction extends ThrowawayTransaction {
private final String providerTable;
private final String playerValueTable;
private final String playerTableValueTable;
private final String tableTable;
private final String groupTable;
public RemoveUnsatisfiedConditionalPlayerResultsTransaction() {
providerTable = ExtensionProviderTable.TABLE_NAME;
playerValueTable = ExtensionPlayerValueTable.TABLE_NAME;
tableTable = ExtensionTableProviderTable.TABLE_NAME;
groupTable = ExtensionGroupsTable.TABLE_NAME;
playerTableValueTable = ExtensionPlayerTableValueTable.TABLE_NAME;
}
@Override
protected void performOperations() {
String selectSatisfiedConditions = getSatisfiedConditionsSQL();
execute(deleteUnsatisfiedValues(selectSatisfiedConditions));
execute(deleteUnsatisfiedGroupValues(selectSatisfiedConditions));
execute(deleteUnsatisfiedTableValues(selectSatisfiedConditions));
}
private String getSatisfiedConditionsSQL() {
String reversedCondition = dbType == DBType.SQLITE ? "'not_' || " + ExtensionProviderTable.PROVIDED_CONDITION : "CONCAT('not_'," + ExtensionProviderTable.PROVIDED_CONDITION + ')';
String selectSatisfiedPositiveConditions = SELECT +
ExtensionProviderTable.PROVIDED_CONDITION + ',' +
ExtensionProviderTable.PLUGIN_ID + ',' +
"u." + UsersTable.ID + " as user_id" +
FROM + providerTable +
INNER_JOIN + playerValueTable + " on " + providerTable + '.' + ExtensionProviderTable.ID + "=" + ExtensionPlayerValueTable.PROVIDER_ID +
INNER_JOIN + UsersTable.TABLE_NAME + " u on u." + UsersTable.USER_UUID + "=" + playerValueTable + "." + ExtensionPlayerTableValueTable.USER_UUID +
WHERE + ExtensionPlayerValueTable.BOOLEAN_VALUE + "=?" +
AND + ExtensionProviderTable.PROVIDED_CONDITION + IS_NOT_NULL;
String selectSatisfiedNegativeConditions = SELECT +
reversedCondition + " as " + ExtensionProviderTable.PROVIDED_CONDITION + ',' +
ExtensionProviderTable.PLUGIN_ID + ',' +
"u." + UsersTable.ID + " as user_id" +
FROM + providerTable +
INNER_JOIN + playerValueTable + " on " + providerTable + '.' + ExtensionProviderTable.ID + "=" + ExtensionPlayerValueTable.PROVIDER_ID +
INNER_JOIN + UsersTable.TABLE_NAME + " u on u." + UsersTable.USER_UUID + "=" + playerValueTable + "." + ExtensionPlayerTableValueTable.USER_UUID +
WHERE + ExtensionPlayerValueTable.BOOLEAN_VALUE + "=?" +
AND + ExtensionProviderTable.PROVIDED_CONDITION + IS_NOT_NULL;
// Query contents: Set of provided_conditions
return '(' + selectSatisfiedPositiveConditions + " UNION " + selectSatisfiedNegativeConditions + ") q1";
}
private Executable deleteUnsatisfiedValues(String selectSatisfiedConditions) {
// Query contents:
// id | uuid | q1.uuid | condition | q1.provided_condition
// -- | ---- | ------- | --------- | ---------------------
// 1 | ... | ... | A | A Satisfied condition
// 2 | ... | ... | not_B | not_B Satisfied condition
// 3 | ... | ... | NULL | NULL Satisfied condition
// 4 | ... | ... | B | NULL Unsatisfied condition, filtered to these in WHERE clause.
// 5 | ... | ... | not_C | NULL Unsatisfied condition
String selectUnsatisfiedValueIDs = SELECT + playerValueTable + '.' + ExtensionPlayerValueTable.ID +
FROM + providerTable +
INNER_JOIN + playerValueTable + " on " + providerTable + '.' + ExtensionProviderTable.ID + "=" + ExtensionPlayerValueTable.PROVIDER_ID +
INNER_JOIN + UsersTable.TABLE_NAME + " u on u." + UsersTable.USER_UUID + "=" + playerValueTable + "." + ExtensionPlayerTableValueTable.USER_UUID +
LEFT_JOIN + selectSatisfiedConditions + // Left join to preserve values that don't have their condition fulfilled
" on (" + // Join when uuid and plugin_id match and condition for the group provider is satisfied
"u." + UsersTable.ID + "=q1.user_id" +
AND + ExtensionProviderTable.CONDITION + "=q1." + ExtensionProviderTable.PROVIDED_CONDITION +
AND + providerTable + '.' + ExtensionProviderTable.PLUGIN_ID + "=q1." + ExtensionProviderTable.PLUGIN_ID +
')' +
WHERE + "q1." + ExtensionProviderTable.PROVIDED_CONDITION + IS_NULL + // Conditions that were not in the satisfied condition query
AND + ExtensionProviderTable.CONDITION + IS_NOT_NULL; // Ignore values that don't need condition
// Nested query here is required because MySQL limits update statements with nested queries:
// The nested query creates a temporary table that bypasses the same table query-update limit.
// Note: MySQL versions 5.6.7+ might optimize this nested query away leading to an exception.
String sql = DELETE_FROM + playerValueTable +
WHERE + ExtensionPlayerValueTable.ID + " IN (" + SELECT + ExtensionPlayerValueTable.ID + FROM + '(' + selectUnsatisfiedValueIDs + ") as ids)";
return new ExecStatement(sql) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setBoolean(1, true); // Select provided conditions with 'true' value
statement.setBoolean(2, false); // Select negated conditions with 'false' value
}
};
}
private Executable deleteUnsatisfiedTableValues(String selectSatisfiedConditions) {
String selectUnsatisfiedValueIDs = SELECT + ExtensionTableProviderTable.ID +
FROM + tableTable +
LEFT_JOIN + selectSatisfiedConditions + // Left join to preserve values that don't have their condition fulfilled
" on (" + // Join when plugin_id matches and condition for the group provider is satisfied
tableTable + '.' + ExtensionTableProviderTable.CONDITION +
"=q1." + ExtensionProviderTable.PROVIDED_CONDITION +
AND + tableTable + '.' + ExtensionTableProviderTable.PLUGIN_ID +
"=q1." + ExtensionProviderTable.PLUGIN_ID +
')' +
WHERE + "q1." + ExtensionProviderTable.PROVIDED_CONDITION + IS_NULL + // Conditions that were not in the satisfied condition query
AND + ExtensionProviderTable.CONDITION + IS_NOT_NULL; // Ignore values that don't need condition
// Nested query here is required because MySQL limits update statements with nested queries:
// The nested query creates a temporary table that bypasses the same table query-update limit.
// Note: MySQL versions 5.6.7+ might optimize this nested query away leading to an exception.
String deleteValuesSQL = DELETE_FROM + playerTableValueTable +
WHERE + ExtensionPlayerTableValueTable.TABLE_ID + " IN (" + SELECT + ExtensionTableProviderTable.ID + FROM + '(' + selectUnsatisfiedValueIDs + ") as ids)";
return new ExecStatement(deleteValuesSQL) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setBoolean(1, true); // Select provided conditions with 'true' value
statement.setBoolean(2, false); // Select negated conditions with 'false' value
}
};
}
private Executable deleteUnsatisfiedGroupValues(String selectSatisfiedConditions) {
// plan_extensions_player_groups.id is needed for removal of the correct row.
// The id is known if group_id & uuid are known
// -
// Conditions are in plan_extensions_providers
// selectSatisfiedConditions lists 'provided_condition' Strings
String selectUnsatisfiedIDs = SELECT + groupTable + '.' + ID +
FROM + groupTable +
INNER_JOIN + UsersTable.TABLE_NAME + " u on u." + UsersTable.USER_UUID + "=" + groupTable + "." + ExtensionGroupsTable.USER_UUID +
INNER_JOIN + providerTable + " on " + providerTable + '.' + ID + '=' + groupTable + '.' + ExtensionGroupsTable.PROVIDER_ID +
LEFT_JOIN + selectSatisfiedConditions + // Left join to preserve values that don't have their condition fulfilled
" on (" + // Join when uuid and plugin_id match and condition for the group provider is satisfied
"u." + UsersTable.ID + "=q1.user_id" +
AND + ExtensionProviderTable.CONDITION +
"=q1." + ExtensionProviderTable.PROVIDED_CONDITION +
AND + providerTable + '.' + ExtensionProviderTable.PLUGIN_ID +
"=q1." + ExtensionProviderTable.PLUGIN_ID +
')' +
WHERE + "q1." + ExtensionProviderTable.PROVIDED_CONDITION + IS_NULL + // Conditions that were not in the satisfied condition query
AND + ExtensionProviderTable.CONDITION + IS_NOT_NULL; // Ignore values that don't need condition
// Nested query here is required because MySQL limits update statements with nested queries:
// The nested query creates a temporary table that bypasses the same table query-update limit.
// Note: MySQL versions 5.6.7+ might optimize this nested query away leading to an exception.
String deleteValuesSQL = DELETE_FROM + groupTable +
WHERE + ID + " IN (" + SELECT + ID + FROM + '(' + selectUnsatisfiedIDs + ") as ids)";
return new ExecStatement(deleteValuesSQL) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setBoolean(1, true); // Select provided conditions with 'true' value
statement.setBoolean(2, false); // Select negated conditions with 'false' value
}
};
}
}

View File

@ -1,152 +0,0 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.extension.implementation.storage.transactions.results;
import com.djrapitops.plan.storage.database.DBType;
import com.djrapitops.plan.storage.database.sql.tables.extension.ExtensionProviderTable;
import com.djrapitops.plan.storage.database.sql.tables.extension.ExtensionServerTableValueTable;
import com.djrapitops.plan.storage.database.sql.tables.extension.ExtensionServerValueTable;
import com.djrapitops.plan.storage.database.sql.tables.extension.ExtensionTableProviderTable;
import com.djrapitops.plan.storage.database.transactions.ExecStatement;
import com.djrapitops.plan.storage.database.transactions.Executable;
import com.djrapitops.plan.storage.database.transactions.ThrowawayTransaction;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import static com.djrapitops.plan.storage.database.sql.building.Sql.*;
/**
* Transaction to remove older results that violate an updated condition value.
* <p>
* How it works:
* - Select all fulfilled conditions for all servers (conditionName when true and not_conditionName when false)
* - Left join with server value and provider tables when plugin_ids match, and when condition matches a condition in the
* query above. (plugin_ids can be linked to servers)
* - Filter the join query for values where the condition did not match any provided condition in the join (Is null)
* - Delete all server values with IDs that are returned by the left join query after filtering
*
* @author AuroraLS3
* @deprecated Cleanup is now done in {@link StoreServerBooleanResultTransaction}.
*/
@Deprecated(since = "2024-03-02")
public class RemoveUnsatisfiedConditionalServerResultsTransaction extends ThrowawayTransaction {
private final String providerTable;
private final String serverValueTable;
private final String serverTableValueTable;
private final String tableTable;
public RemoveUnsatisfiedConditionalServerResultsTransaction() {
providerTable = ExtensionProviderTable.TABLE_NAME;
serverValueTable = ExtensionServerValueTable.TABLE_NAME;
tableTable = ExtensionTableProviderTable.TABLE_NAME;
serverTableValueTable = ExtensionServerTableValueTable.TABLE_NAME;
}
@Override
protected void performOperations() {
String selectSatisfiedConditions = getSatisfiedConditionsSQL();
execute(deleteUnsatisfiedValues(selectSatisfiedConditions));
execute(deleteUnsatisfiedTableValues(selectSatisfiedConditions));
}
private Executable deleteUnsatisfiedValues(String selectSatisfiedConditions) {
// Query contents:
// id | provider_id | q1.provider_id | condition | q1.provided_condition
// -- | ----------- | -------------- | --------- | ---------------------
// 1 | ... | ... | A | A Satisfied condition
// 2 | ... | ... | not_B | not_B Satisfied condition
// 3 | ... | ... | NULL | NULL Satisfied condition
// 4 | ... | ... | B | NULL Unsatisfied condition, filtered to these in WHERE clause.
// 5 | ... | ... | not_C | NULL Unsatisfied condition
String selectUnsatisfiedValueIDs = SELECT + serverValueTable + '.' + ExtensionServerValueTable.ID +
FROM + providerTable +
INNER_JOIN + serverValueTable + " on " + providerTable + '.' + ExtensionProviderTable.ID + "=" + ExtensionServerValueTable.PROVIDER_ID +
LEFT_JOIN + selectSatisfiedConditions + // Left join to preserve values that don't have their condition fulfilled
" on (" +
ExtensionProviderTable.CONDITION + "=q1." + ExtensionProviderTable.PROVIDED_CONDITION +
AND + providerTable + '.' + ExtensionProviderTable.PLUGIN_ID + "=q1." + ExtensionProviderTable.PLUGIN_ID +
')' +
WHERE + "q1." + ExtensionProviderTable.PROVIDED_CONDITION + IS_NULL + // Conditions that were not in the satisfied condition query
AND + ExtensionProviderTable.CONDITION + IS_NOT_NULL; // Ignore values that don't need condition
// Nested query here is required because MySQL limits update statements with nested queries:
// The nested query creates a temporary table that bypasses the same table query-update limit.
// Note: MySQL versions 5.6.7+ might optimize this nested query away leading to an exception.
String sql = DELETE_FROM + serverValueTable +
WHERE + ExtensionServerValueTable.ID + " IN (" + SELECT + ExtensionServerValueTable.ID + FROM + '(' + selectUnsatisfiedValueIDs + ") as ids)";
return new ExecStatement(sql) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setBoolean(1, true); // Select provided conditions with 'true' value
statement.setBoolean(2, false); // Select negated conditions with 'false' value
}
};
}
private String getSatisfiedConditionsSQL() {
String reversedCondition = dbType == DBType.SQLITE ? "'not_' || " + ExtensionProviderTable.PROVIDED_CONDITION : "CONCAT('not_'," + ExtensionProviderTable.PROVIDED_CONDITION + ')';
String selectSatisfiedPositiveConditions = SELECT +
ExtensionProviderTable.PROVIDED_CONDITION + ',' +
ExtensionProviderTable.PLUGIN_ID +
FROM + providerTable +
INNER_JOIN + serverValueTable + " on " + providerTable + '.' + ExtensionProviderTable.ID + "=" + ExtensionServerValueTable.PROVIDER_ID +
WHERE + ExtensionServerValueTable.BOOLEAN_VALUE + "=?" +
AND + ExtensionProviderTable.PROVIDED_CONDITION + IS_NOT_NULL;
String selectSatisfiedNegativeConditions = SELECT +
reversedCondition + " as " + ExtensionProviderTable.PROVIDED_CONDITION + ',' +
ExtensionProviderTable.PLUGIN_ID +
FROM + providerTable +
INNER_JOIN + serverValueTable + " on " + providerTable + '.' + ExtensionProviderTable.ID + "=" + ExtensionServerValueTable.PROVIDER_ID +
WHERE + ExtensionServerValueTable.BOOLEAN_VALUE + "=?" +
AND + ExtensionProviderTable.PROVIDED_CONDITION + IS_NOT_NULL;
// Query contents: Set of provided_conditions
return '(' + selectSatisfiedPositiveConditions + " UNION " + selectSatisfiedNegativeConditions + ") q1";
}
private Executable deleteUnsatisfiedTableValues(String selectSatisfiedConditions) {
String selectUnsatisfiedValueIDs = SELECT + ExtensionTableProviderTable.ID +
FROM + tableTable +
LEFT_JOIN + selectSatisfiedConditions + // Left join to preserve values that don't have their condition fulfilled
" on (" +
tableTable + '.' + ExtensionTableProviderTable.CONDITION +
"=q1." + ExtensionProviderTable.PROVIDED_CONDITION +
AND + tableTable + '.' + ExtensionTableProviderTable.PLUGIN_ID +
"=q1." + ExtensionProviderTable.PLUGIN_ID +
')' +
WHERE + "q1." + ExtensionProviderTable.PROVIDED_CONDITION + IS_NULL + // Conditions that were not in the satisfied condition query
AND + ExtensionProviderTable.CONDITION + IS_NOT_NULL; // Ignore values that don't need condition
// Nested query here is required because MySQL limits update statements with nested queries:
// The nested query creates a temporary table that bypasses the same table query-update limit.
// Note: MySQL versions 5.6.7+ might optimize this nested query away leading to an exception.
String deleteValuesSQL = DELETE_FROM + serverTableValueTable +
WHERE + ExtensionServerTableValueTable.TABLE_ID + " IN (" + SELECT + ExtensionTableProviderTable.ID + FROM + '(' + selectUnsatisfiedValueIDs + ") as ids)";
return new ExecStatement(deleteValuesSQL) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setBoolean(1, true); // Select provided conditions with 'true' value
statement.setBoolean(2, false); // Select negated conditions with 'false' value
}
};
}
}

View File

@ -152,13 +152,13 @@ public class StorePlayerBooleanResultTransaction extends ThrowawayTransaction {
// Need to select: // Need to select:
// Provider IDs where condition of this provider is met // Provider IDs where condition of this provider is met
@Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " + @Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " +
"FROM plan_extension_providers stored " + "FROM plan_extension_providers indb " +
"JOIN plan_extension_providers unfulfilled ON unfulfilled.condition_name=" + "JOIN plan_extension_providers unfulfilled ON unfulfilled.condition_name=" +
// This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled. // This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled.
(value ? "CONCAT('not_', " : "") + "stored.provided_condition" + (value ? ")" : "") + (value ? Sql.concat(dbType, "'not_'", "indb.provided_condition") : "indb.provided_condition") +
" AND stored.plugin_id=unfulfilled.plugin_id" + " AND indb.plugin_id=unfulfilled.plugin_id" +
" WHERE stored.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID + " WHERE indb.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
" AND stored.provided_condition IS NOT NULL"; " AND indb.provided_condition IS NOT NULL";
return extractIds(selectUnsatisfiedProviderIds); return extractIds(selectUnsatisfiedProviderIds);
} }
@ -178,13 +178,13 @@ public class StorePlayerBooleanResultTransaction extends ThrowawayTransaction {
// Need to select: // Need to select:
// Provider IDs where condition of this provider is met // Provider IDs where condition of this provider is met
@Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " + @Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " +
"FROM plan_extension_providers stored " + "FROM plan_extension_providers indb " +
"JOIN plan_extension_tables unfulfilled ON unfulfilled.condition_name=" + "JOIN plan_extension_tables unfulfilled ON unfulfilled.condition_name=" +
// This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled. // This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled.
(value ? "CONCAT('not_', " : "") + "stored.provided_condition" + (value ? ")" : "") + (value ? Sql.concat(dbType, "'not_'", "indb.provided_condition") : "indb.provided_condition") +
" AND stored.plugin_id=unfulfilled.plugin_id" + " AND indb.plugin_id=unfulfilled.plugin_id" +
" WHERE stored.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID + " WHERE indb.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
" AND stored.provided_condition IS NOT NULL"; " AND indb.provided_condition IS NOT NULL";
return extractIds(selectUnsatisfiedProviderIds); return extractIds(selectUnsatisfiedProviderIds);
} }

View File

@ -131,13 +131,13 @@ public class StoreServerBooleanResultTransaction extends ThrowawayTransaction {
// Need to select: // Need to select:
// Provider IDs where condition of this provider is met // Provider IDs where condition of this provider is met
@Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " + @Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " +
"FROM plan_extension_providers stored " + "FROM plan_extension_providers indb " +
"JOIN plan_extension_providers unfulfilled ON unfulfilled.condition_name=" + "JOIN plan_extension_providers unfulfilled ON unfulfilled.condition_name=" +
// This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled. // This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled.
(value ? "CONCAT('not_', " : "") + "stored.provided_condition" + (value ? ")" : "") + (value ? Sql.concat(dbType, "'not_'", "indb.provided_condition") : "indb.provided_condition") +
" AND stored.plugin_id=unfulfilled.plugin_id" + " AND indb.plugin_id=unfulfilled.plugin_id" +
" WHERE stored.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID + " WHERE indb.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
" AND stored.provided_condition IS NOT NULL"; " AND indb.provided_condition IS NOT NULL";
return extractIds(selectUnsatisfiedProviderIds); return extractIds(selectUnsatisfiedProviderIds);
} }
@ -163,13 +163,13 @@ public class StoreServerBooleanResultTransaction extends ThrowawayTransaction {
// Need to select: // Need to select:
// Provider IDs where condition of this provider is met // Provider IDs where condition of this provider is met
@Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " + @Language("SQL") String selectUnsatisfiedProviderIds = "SELECT unfulfilled.id " +
"FROM plan_extension_providers stored " + "FROM plan_extension_providers indb " +
"JOIN plan_extension_tables unfulfilled ON unfulfilled.condition_name=" + "JOIN plan_extension_tables unfulfilled ON unfulfilled.condition_name=" +
// This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled. // This gives the unfulfilled condition, eg. if value is true not_condition is unfulfilled.
(value ? "CONCAT('not_', " : "") + "stored.provided_condition" + (value ? ")" : "") + (value ? Sql.concat(dbType, "'not_'", "indb.provided_condition") : "indb.provided_condition") +
" AND stored.plugin_id=unfulfilled.plugin_id" + " AND indb.plugin_id=unfulfilled.plugin_id" +
" WHERE stored.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID + " WHERE indb.id=" + ExtensionProviderTable.STATEMENT_SELECT_PROVIDER_ID +
" AND stored.provided_condition IS NOT NULL"; " AND indb.provided_condition IS NOT NULL";
return extractIds(selectUnsatisfiedProviderIds); return extractIds(selectUnsatisfiedProviderIds);
} }

View File

@ -0,0 +1,94 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.gathering;
import com.djrapitops.plan.settings.config.PlanConfig;
import com.djrapitops.plan.settings.config.paths.DataGatheringSettings;
import com.djrapitops.plan.utilities.dev.Untrusted;
import org.apache.commons.lang3.StringUtils;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
/**
* Utility for validating and sanitizing join addresses.
*
* @author AuroraLS3
*/
@Singleton
public class JoinAddressValidator {
private final PlanConfig config;
private List<String> filteredAddresses;
@Inject
public JoinAddressValidator(PlanConfig config) {
/* Dagger injection constructor */
this.config = config;
}
private void prepareFilteredAddresses() {
if (filteredAddresses == null) {
filteredAddresses = config.get(DataGatheringSettings.FILTER_JOIN_ADDRESSES);
if (filteredAddresses == null) filteredAddresses = new ArrayList<>();
}
}
@Untrusted
public String sanitize(@Untrusted String address) {
if (address == null || config.isFalse(DataGatheringSettings.JOIN_ADDRESSES)) return "";
if (!address.isEmpty()) {
// Remove port
if (address.contains(":")) {
address = address.substring(0, address.lastIndexOf(':'));
}
// Remove data added by Bungeecord/Velocity
if (address.contains("\u0000")) {
address = address.substring(0, address.indexOf('\u0000'));
}
// Remove data added by Forge Mod Loader
if (address.contains("fml")) {
address = address.substring(0, address.lastIndexOf("fml"));
}
if (config.isFalse(DataGatheringSettings.PRESERVE_JOIN_ADDRESS_CASE)) {
address = StringUtils.lowerCase(address);
}
prepareFilteredAddresses();
if (filteredAddresses.contains(address)) {
address = "";
}
}
return address;
}
public boolean isValid(@Untrusted String address) {
if (address.isEmpty()) return false;
if (config.isTrue(DataGatheringSettings.PRESERVE_INVALID_JOIN_ADDRESS)) return true;
try {
URI uri = new URI(address);
String path = uri.getPath();
return path != null && path.indexOf('.') != -1;
} catch (URISyntaxException uriSyntaxException) {
return false;
}
}
}

View File

@ -16,6 +16,8 @@
*/ */
package com.djrapitops.plan.gathering.domain; package com.djrapitops.plan.gathering.domain;
import com.djrapitops.plan.utilities.dev.Untrusted;
import java.net.InetAddress; import java.net.InetAddress;
import java.util.Optional; import java.util.Optional;
import java.util.UUID; import java.util.UUID;
@ -24,8 +26,10 @@ public interface PlatformPlayerData {
UUID getUUID(); UUID getUUID();
@Untrusted
String getName(); String getName();
@Untrusted
default Optional<String> getDisplayName() { default Optional<String> getDisplayName() {
return Optional.empty(); return Optional.empty();
} }
@ -38,6 +42,7 @@ public interface PlatformPlayerData {
return Optional.empty(); return Optional.empty();
} }
@Untrusted
default Optional<String> getJoinAddress() { default Optional<String> getJoinAddress() {
return Optional.empty(); return Optional.empty();
} }

View File

@ -64,6 +64,13 @@ public class PlayerJoin {
return time; return time;
} }
/**
* Get address used to join the server.
*
* @return Join address of the player.
* @deprecated {@link com.djrapitops.plan.gathering.JoinAddressValidator} should be used when looking at join address.
*/
@Deprecated(since = "2024-04-27")
public String getJoinAddress() { public String getJoinAddress() {
return player.getJoinAddress().orElse(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP); return player.getJoinAddress().orElse(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP);
} }

View File

@ -22,6 +22,7 @@ import com.djrapitops.plan.delivery.domain.ServerName;
import com.djrapitops.plan.delivery.export.Exporter; import com.djrapitops.plan.delivery.export.Exporter;
import com.djrapitops.plan.extension.CallEvents; import com.djrapitops.plan.extension.CallEvents;
import com.djrapitops.plan.extension.ExtensionSvc; import com.djrapitops.plan.extension.ExtensionSvc;
import com.djrapitops.plan.gathering.JoinAddressValidator;
import com.djrapitops.plan.gathering.cache.NicknameCache; import com.djrapitops.plan.gathering.cache.NicknameCache;
import com.djrapitops.plan.gathering.cache.SessionCache; import com.djrapitops.plan.gathering.cache.SessionCache;
import com.djrapitops.plan.gathering.domain.ActiveSession; import com.djrapitops.plan.gathering.domain.ActiveSession;
@ -38,7 +39,6 @@ import com.djrapitops.plan.storage.database.DBSystem;
import com.djrapitops.plan.storage.database.sql.tables.JoinAddressTable; import com.djrapitops.plan.storage.database.sql.tables.JoinAddressTable;
import com.djrapitops.plan.storage.database.transactions.Transaction; import com.djrapitops.plan.storage.database.transactions.Transaction;
import com.djrapitops.plan.storage.database.transactions.events.*; import com.djrapitops.plan.storage.database.transactions.events.*;
import org.apache.commons.lang3.StringUtils;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
@ -52,6 +52,7 @@ public class PlayerJoinEventConsumer {
private final PlanConfig config; private final PlanConfig config;
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final JoinAddressValidator joinAddressValidator;
private final GeolocationCache geolocationCache; private final GeolocationCache geolocationCache;
private final SessionCache sessionCache; private final SessionCache sessionCache;
private final NicknameCache nicknameCache; private final NicknameCache nicknameCache;
@ -63,7 +64,7 @@ public class PlayerJoinEventConsumer {
public PlayerJoinEventConsumer( public PlayerJoinEventConsumer(
Processing processing, Processing processing,
PlanConfig config, PlanConfig config,
DBSystem dbSystem, DBSystem dbSystem, JoinAddressValidator joinAddressValidator,
GeolocationCache geolocationCache, GeolocationCache geolocationCache,
SessionCache sessionCache, SessionCache sessionCache,
NicknameCache nicknameCache, NicknameCache nicknameCache,
@ -73,6 +74,7 @@ public class PlayerJoinEventConsumer {
this.processing = processing; this.processing = processing;
this.config = config; this.config = config;
this.dbSystem = dbSystem; this.dbSystem = dbSystem;
this.joinAddressValidator = joinAddressValidator;
this.geolocationCache = geolocationCache; this.geolocationCache = geolocationCache;
this.sessionCache = sessionCache; this.sessionCache = sessionCache;
this.nicknameCache = nicknameCache; this.nicknameCache = nicknameCache;
@ -110,7 +112,8 @@ public class PlayerJoinEventConsumer {
private void storeJoinAddress(PlayerJoin join) { private void storeJoinAddress(PlayerJoin join) {
join.getPlayer().getJoinAddress() join.getPlayer().getJoinAddress()
.map(joinAddress -> config.isTrue(DataGatheringSettings.PRESERVE_JOIN_ADDRESS_CASE) ? joinAddress : StringUtils.lowerCase(joinAddress)) .map(joinAddressValidator::sanitize)
.filter(joinAddressValidator::isValid)
.map(StoreJoinAddressTransaction::new) .map(StoreJoinAddressTransaction::new)
.ifPresent(dbSystem.getDatabase()::executeTransaction); .ifPresent(dbSystem.getDatabase()::executeTransaction);
} }
@ -141,7 +144,10 @@ public class PlayerJoinEventConsumer {
private CompletableFuture<?> storeGamePlayer(PlayerJoin join) { private CompletableFuture<?> storeGamePlayer(PlayerJoin join) {
long registerDate = getRegisterDate(join); long registerDate = getRegisterDate(join);
String joinAddress = join.getPlayer().getJoinAddress().orElse(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP); String joinAddress = join.getPlayer().getJoinAddress()
.map(joinAddressValidator::sanitize)
.filter(joinAddressValidator::isValid)
.orElse(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP);
Transaction transaction = new StoreServerPlayerTransaction( Transaction transaction = new StoreServerPlayerTransaction(
join.getPlayerUUID(), registerDate, join.getPlayer().getName(), join.getServerUUID(), joinAddress join.getPlayerUUID(), registerDate, join.getPlayer().getName(), join.getServerUUID(), joinAddress
); );
@ -171,12 +177,16 @@ public class PlayerJoinEventConsumer {
} }
private ActiveSession mapToActiveSession(PlayerJoin join) { private ActiveSession mapToActiveSession(PlayerJoin join) {
String joinAddress = join.getPlayer().getJoinAddress()
.map(joinAddressValidator::sanitize)
.filter(joinAddressValidator::isValid)
.orElse(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP);
ActiveSession session = new ActiveSession(join.getPlayerUUID(), join.getServerUUID(), join.getTime(), ActiveSession session = new ActiveSession(join.getPlayerUUID(), join.getServerUUID(), join.getTime(),
join.getPlayer().getCurrentWorld().orElse(null), join.getPlayer().getCurrentWorld().orElse(null),
join.getPlayer().getCurrentGameMode().orElse(null)); join.getPlayer().getCurrentGameMode().orElse(null));
session.getExtraData().put(PlayerName.class, new PlayerName(join.getPlayer().getName())); session.getExtraData().put(PlayerName.class, new PlayerName(join.getPlayer().getName()));
session.getExtraData().put(ServerName.class, new ServerName(join.getServer().isProxy() ? join.getServer().getName() : "Proxy Server")); session.getExtraData().put(ServerName.class, new ServerName(join.getServer().isProxy() ? join.getServer().getName() : "Proxy Server"));
session.getExtraData().put(JoinAddress.class, new JoinAddress(config.isTrue(DataGatheringSettings.PRESERVE_JOIN_ADDRESS_CASE) ? join.getJoinAddress() : StringUtils.lowerCase(join.getJoinAddress()))); session.getExtraData().put(JoinAddress.class, new JoinAddress(joinAddress));
return session; return session;
} }

View File

@ -26,7 +26,7 @@ import com.maxmind.geoip2.model.CountryResponse;
import com.maxmind.geoip2.record.Country; import com.maxmind.geoip2.record.Country;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.io.IOUtils;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
@ -119,7 +119,7 @@ public class GeoLite2Geolocator implements Geolocator {
private void findAndCopyFromTar(TarArchiveInputStream tarIn, FileOutputStream fos) throws IOException { private void findAndCopyFromTar(TarArchiveInputStream tarIn, FileOutputStream fos) throws IOException {
// Breadth first search // Breadth first search
Queue<TarArchiveEntry> entries = new ArrayDeque<>(); Queue<TarArchiveEntry> entries = new ArrayDeque<>();
entries.add(tarIn.getNextTarEntry()); entries.add(tarIn.getNextEntry());
while (!entries.isEmpty()) { while (!entries.isEmpty()) {
TarArchiveEntry entry = entries.poll(); TarArchiveEntry entry = entries.poll();
if (entry.isDirectory()) { if (entry.isDirectory()) {
@ -132,7 +132,7 @@ public class GeoLite2Geolocator implements Geolocator {
break; // Found it break; // Found it
} }
TarArchiveEntry next = tarIn.getNextTarEntry(); TarArchiveEntry next = tarIn.getNextEntry();
if (next != null) entries.add(next); if (next != null) entries.add(next);
} }
} }

View File

@ -57,7 +57,7 @@ public class InstalledPluginGatheringTask extends TaskSystem.Task {
@Override @Override
public void register(RunnableFactory runnableFactory) { public void register(RunnableFactory runnableFactory) {
runnableFactory.create(this) runnableFactory.create(this)
.runTaskLater(20, TimeUnit.SECONDS); .runTaskLaterAsynchronously(20, TimeUnit.SECONDS);
} }
@Override @Override

View File

@ -27,6 +27,7 @@ import com.djrapitops.plan.gathering.domain.ActiveSession;
import com.djrapitops.plan.gathering.domain.FinishedSession; import com.djrapitops.plan.gathering.domain.FinishedSession;
import com.djrapitops.plan.gathering.domain.GeoInfo; import com.djrapitops.plan.gathering.domain.GeoInfo;
import com.djrapitops.plan.gathering.domain.PlayerKill; import com.djrapitops.plan.gathering.domain.PlayerKill;
import com.djrapitops.plan.gathering.domain.event.JoinAddress;
import com.djrapitops.plan.identification.Server; import com.djrapitops.plan.identification.Server;
import com.djrapitops.plan.identification.ServerInfo; import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.settings.config.PlanConfig; import com.djrapitops.plan.settings.config.PlanConfig;
@ -157,6 +158,14 @@ public class PlayerPlaceHolders implements Placeholders {
.orElse(locale.getString(GenericLang.UNKNOWN)) .orElse(locale.getString(GenericLang.UNKNOWN))
); );
placeholders.register("player_join_address",
player -> SessionsMutator.forContainer(player)
.latestSession()
.flatMap(session -> session.getExtraData(JoinAddress.class))
.map(JoinAddress::getAddress)
.orElse(locale.getString(GenericLang.UNKNOWN))
);
registerPlaytimePlaceholders(placeholders, time); registerPlaytimePlaceholders(placeholders, time);
registerSessionLengethPlaceholders(placeholders, time); registerSessionLengethPlaceholders(placeholders, time);

View File

@ -19,6 +19,7 @@ package com.djrapitops.plan.placeholder;
import com.djrapitops.plan.commands.use.Arguments; import com.djrapitops.plan.commands.use.Arguments;
import com.djrapitops.plan.delivery.formatting.Formatter; import com.djrapitops.plan.delivery.formatting.Formatter;
import com.djrapitops.plan.delivery.formatting.Formatters; import com.djrapitops.plan.delivery.formatting.Formatters;
import com.djrapitops.plan.gathering.ServerUptimeCalculator;
import com.djrapitops.plan.identification.Server; import com.djrapitops.plan.identification.Server;
import com.djrapitops.plan.identification.ServerInfo; import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.identification.ServerUUID; import com.djrapitops.plan.identification.ServerUUID;
@ -58,18 +59,20 @@ public class ServerPlaceHolders implements Placeholders {
private final DBSystem dbSystem; private final DBSystem dbSystem;
private final ServerInfo serverInfo; private final ServerInfo serverInfo;
private final Formatters formatters; private final Formatters formatters;
private final ServerUptimeCalculator serverUptimeCalculator;
@Inject @Inject
public ServerPlaceHolders( public ServerPlaceHolders(
PlanConfig config, PlanConfig config,
DBSystem dbSystem, DBSystem dbSystem,
ServerInfo serverInfo, ServerInfo serverInfo,
Formatters formatters Formatters formatters, ServerUptimeCalculator serverUptimeCalculator
) { ) {
this.config = config; this.config = config;
this.dbSystem = dbSystem; this.dbSystem = dbSystem;
this.serverInfo = serverInfo; this.serverInfo = serverInfo;
this.formatters = formatters; this.formatters = formatters;
this.serverUptimeCalculator = serverUptimeCalculator;
} }
@Override @Override
@ -204,6 +207,11 @@ public class ServerPlaceHolders implements Placeholders {
placeholders.registerStatic("server_name", placeholders.registerStatic("server_name",
() -> serverInfo.getServer().getName()); () -> serverInfo.getServer().getName());
placeholders.registerStatic("server_uptime",
parameters -> serverUptimeCalculator.getServerUptimeMillis(getServerUUID(parameters))
.map(String::valueOf)
.orElse("-"));
placeholders.registerStatic("server_uuid", placeholders.registerStatic("server_uuid",
serverInfo::getServerUUID); serverInfo::getServerUUID);

View File

@ -200,6 +200,14 @@ public class ConfigNode {
return key; return key;
} }
private String getEnvironmentVariableKey() {
String deepKey = parent != null ? parent.getKey(true) + "." + key : "";
if (deepKey.startsWith(".")) {
deepKey = deepKey.substring(1);
}
return "PLAN_" + StringUtils.replaceChars(StringUtils.upperCase(deepKey), '.', '_');
}
public void sort() { public void sort() {
Collections.sort(nodeOrder); Collections.sort(nodeOrder);
} }
@ -255,32 +263,51 @@ public class ConfigNode {
this.comment = comment; this.comment = comment;
} }
private String getEnvironmentVariable() {
String key = getEnvironmentVariableKey();
String variable = System.getenv(key);
Map<String, String> env = System.getenv();
return variable;
}
public List<String> getStringList() { public List<String> getStringList() {
String environmentVariable = getEnvironmentVariable();
if (environmentVariable != null) return new ConfigValueParser.StringListParser().compose(environmentVariable);
return value == null ? Collections.emptyList() return value == null ? Collections.emptyList()
: new ConfigValueParser.StringListParser().compose(value); : new ConfigValueParser.StringListParser().compose(value);
} }
public Integer getInteger() { public Integer getInteger() {
String environmentVariable = getEnvironmentVariable();
if (environmentVariable != null) return new ConfigValueParser.IntegerParser().compose(environmentVariable);
return value == null ? null return value == null ? null
: new ConfigValueParser.IntegerParser().compose(value); : new ConfigValueParser.IntegerParser().compose(value);
} }
public Long getLong() { public Long getLong() {
String environmentVariable = getEnvironmentVariable();
if (environmentVariable != null) return new ConfigValueParser.LongParser().compose(environmentVariable);
return value == null ? null return value == null ? null
: new ConfigValueParser.LongParser().compose(value); : new ConfigValueParser.LongParser().compose(value);
} }
public String getString() { public String getString() {
String environmentVariable = getEnvironmentVariable();
if (environmentVariable != null) return new ConfigValueParser.StringParser().compose(environmentVariable);
return value == null ? null return value == null ? null
: new ConfigValueParser.StringParser().compose(value); : new ConfigValueParser.StringParser().compose(value);
} }
public Double getDouble() { public Double getDouble() {
String environmentVariable = getEnvironmentVariable();
if (environmentVariable != null) return new ConfigValueParser.DoubleParser().compose(environmentVariable);
return value == null ? null return value == null ? null
: new ConfigValueParser.DoubleParser().compose(value); : new ConfigValueParser.DoubleParser().compose(value);
} }
public boolean getBoolean() { public boolean getBoolean() {
String environmentVariable = getEnvironmentVariable();
if (environmentVariable != null) return new ConfigValueParser.BooleanParser().compose(environmentVariable);
return new ConfigValueParser.BooleanParser().compose(value); return new ConfigValueParser.BooleanParser().compose(value);
} }

View File

@ -39,6 +39,8 @@ public interface ConfigValueParser<T> {
return new BooleanParser(); return new BooleanParser();
} else if (Long.class.isAssignableFrom(type)) { } else if (Long.class.isAssignableFrom(type)) {
return new LongParser(); return new LongParser();
} else if (Double.class.isAssignableFrom(type)) {
return new DoubleParser();
} else if (Integer.class.isAssignableFrom(type)) { } else if (Integer.class.isAssignableFrom(type)) {
return new IntegerParser(); return new IntegerParser();
} }

View File

@ -177,6 +177,9 @@ public class ConfigUpdater {
new ConfigChange.Removed("Plugin.Use_Legacy_Frontend"), new ConfigChange.Removed("Plugin.Use_Legacy_Frontend"),
new ConfigChange.Removed("Customized_files.Enable_web_dev_mode"), new ConfigChange.Removed("Customized_files.Enable_web_dev_mode"),
new ConfigChange.Removed("Customized_files.Plan"), new ConfigChange.Removed("Customized_files.Plan"),
new ConfigChange.Moved("Data_gathering.Preserve_join_address_case", "Data_gathering.Join_addresses.Preserve_case"),
new ConfigChange.Moved("Data_gathering.Preserve_invalid_join_addresses", "Data_gathering.Join_addresses.Preserve_invalid"),
}; };
} }

View File

@ -18,8 +18,11 @@ package com.djrapitops.plan.settings.config.paths;
import com.djrapitops.plan.settings.config.paths.key.BooleanSetting; import com.djrapitops.plan.settings.config.paths.key.BooleanSetting;
import com.djrapitops.plan.settings.config.paths.key.Setting; import com.djrapitops.plan.settings.config.paths.key.Setting;
import com.djrapitops.plan.settings.config.paths.key.StringListSetting;
import com.djrapitops.plan.settings.config.paths.key.StringSetting; import com.djrapitops.plan.settings.config.paths.key.StringSetting;
import java.util.List;
/** /**
* {@link Setting} values that are in "Data_gathering" section. * {@link Setting} values that are in "Data_gathering" section.
* *
@ -34,7 +37,10 @@ public class DataGatheringSettings {
public static final Setting<Boolean> DISK_SPACE = new BooleanSetting("Data_gathering.Disk_space"); public static final Setting<Boolean> DISK_SPACE = new BooleanSetting("Data_gathering.Disk_space");
public static final Setting<Boolean> LOG_UNKNOWN_COMMANDS = new BooleanSetting("Data_gathering.Commands.Log_unknown"); public static final Setting<Boolean> LOG_UNKNOWN_COMMANDS = new BooleanSetting("Data_gathering.Commands.Log_unknown");
public static final Setting<Boolean> COMBINE_COMMAND_ALIASES = new BooleanSetting("Data_gathering.Commands.Log_aliases_as_main_command"); public static final Setting<Boolean> COMBINE_COMMAND_ALIASES = new BooleanSetting("Data_gathering.Commands.Log_aliases_as_main_command");
public static final Setting<Boolean> PRESERVE_JOIN_ADDRESS_CASE = new BooleanSetting("Data_gathering.Preserve_join_address_case"); public static final Setting<Boolean> JOIN_ADDRESSES = new BooleanSetting("Data_gathering.Join_addresses.Enabled");
public static final Setting<Boolean> PRESERVE_JOIN_ADDRESS_CASE = new BooleanSetting("Data_gathering.Join_addresses.Preserve_case");
public static final Setting<Boolean> PRESERVE_INVALID_JOIN_ADDRESS = new BooleanSetting("Data_gathering.Join_addresses.Preserve_invalid");
public static final Setting<List<String>> FILTER_JOIN_ADDRESSES = new StringListSetting("Data_gathering.Join_addresses.Filter_out_from_data");
private DataGatheringSettings() { private DataGatheringSettings() {
/* static variable class */ /* static variable class */

View File

@ -30,7 +30,7 @@ public enum LangCode {
CS("\u010de\u0161tina", "Shadowhackercz, QuakyCZ, MrFriggo & WolverStones"), CS("\u010de\u0161tina", "Shadowhackercz, QuakyCZ, MrFriggo & WolverStones"),
DE("Deutsch", "Eyremba, fuzzlemann, Morsmorse, hallo1142 & DubHacker"), DE("Deutsch", "Eyremba, fuzzlemann, Morsmorse, hallo1142 & DubHacker"),
FI("suomi", "AuroraLS3, KasperiP"), FI("suomi", "AuroraLS3, KasperiP"),
FR("français", "CyanTech, Aurelien & Nogapra"), FR("français", "CyanTech, Aurelien, Nogapra & Sniper_TVmc"),
IT("Italiano", "Malachiel & Mastory_Md5"), IT("Italiano", "Malachiel & Mastory_Md5"),
JA("\u65E5\u672C\u8A9E", "yukieji, inductor, lis2a, yu_solt , Jumala9163 & ringoXD"), JA("\u65E5\u672C\u8A9E", "yukieji, inductor, lis2a, yu_solt , Jumala9163 & ringoXD"),
KO("\uD55C\uAD6D\uC5B4", "Guinness_Akihiko"), KO("\uD55C\uAD6D\uC5B4", "Guinness_Akihiko"),

View File

@ -108,7 +108,7 @@ public class LocaleSystem implements SubSystem {
HtmlLang.values(), HtmlLang.values(),
JSLang.values(), JSLang.values(),
PluginLang.values(), PluginLang.values(),
WebPermission.values(), WebPermission.nonDeprecatedValues(),
}; };
} }

View File

@ -219,6 +219,8 @@ public enum HtmlLang implements Lang {
LABEL_TITLE_SERVER_CALENDAR("html.label.serverCalendar", "Server Calendar"), LABEL_TITLE_SERVER_CALENDAR("html.label.serverCalendar", "Server Calendar"),
LABEL_TITLE_NETWORK_CALENDAR("html.label.networkCalendar", "Network Calendar"), LABEL_TITLE_NETWORK_CALENDAR("html.label.networkCalendar", "Network Calendar"),
LABEL_LABEL_JOIN_ADDRESS("html.label.joinAddress", "Join Address"), LABEL_LABEL_JOIN_ADDRESS("html.label.joinAddress", "Join Address"),
LABEL_ADD_JOIN_ADDRESS_GROUP("html.label.addJoinAddressGroup", "Add address group"),
LABEL_ADDRESS_GROUP("html.label.addressGroup", "Address group {{n}}"),
LABEL_LABEL_SESSION_MEDIAN("html.label.medianSessionLength", "Median Session Length"), LABEL_LABEL_SESSION_MEDIAN("html.label.medianSessionLength", "Median Session Length"),
LABEL_LABEL_KDR("html.label.kdr", "KDR"), LABEL_LABEL_KDR("html.label.kdr", "KDR"),
LABEL_TITLE_INSIGHTS("html.label.insights", "Insights"), LABEL_TITLE_INSIGHTS("html.label.insights", "Insights"),
@ -285,6 +287,15 @@ public enum HtmlLang implements Lang {
LABEL_TABLE_SHOW_PER_PAGE("html.label.table.showPerPage", "Show per page"), LABEL_TABLE_SHOW_PER_PAGE("html.label.table.showPerPage", "Show per page"),
LABEL_EXPORT("html.label.export", "Export"), LABEL_EXPORT("html.label.export", "Export"),
LABEL_ALLOWLIST("html.label.allowlist", "Allowlist"),
LABEL_ALLOWLIST_BOUNCES("html.label.allowlistBounces", "Allowlist Bounces"),
LABEL_ATTEMPTS("html.label.attempts", "Attempts"),
LABEL_LAST_KNOWN_ATTEMPT("html.label.lastKnownAttempt", "Last Known Attempt"),
LABEL_PREVIOUS_ATTEMPT("html.label.lastBlocked", "Last Blocked"),
LABEL_LAST_ALLOWED_LOGIN("html.label.lastAllowed", "Last Allowed"),
LABEL_BLOCKED("html.label.blocked", "Blocked"),
LABEL_ALLOWED("html.label.allowed", "Allowed"),
LOGIN_LOGIN("html.login.login", "Login"), LOGIN_LOGIN("html.login.login", "Login"),
LOGIN_LOGOUT("html.login.logout", "Logout"), LOGIN_LOGOUT("html.login.logout", "Logout"),
LOGIN_USERNAME("html.login.username", "Username"), LOGIN_USERNAME("html.login.username", "Username"),
@ -327,6 +338,7 @@ public enum HtmlLang implements Lang {
QUERY_SERVERS_TWO("html.query.label.servers.two", "using data of 2 servers"), QUERY_SERVERS_TWO("html.query.label.servers.two", "using data of 2 servers"),
QUERY_SERVERS_MANY("html.query.label.servers.many", "using data of {number} servers"), QUERY_SERVERS_MANY("html.query.label.servers.many", "using data of {number} servers"),
QUERY_SHOW_FULL_QUERY("html.query.label.showFullQuery", "Show Full Query"), QUERY_SHOW_FULL_QUERY("html.query.label.showFullQuery", "Show Full Query"),
QUERY_EDIT_QUERY("html.query.label.editQuery", "Edit Query"),
HELP_TEST_RESULT("html.label.help.testResult", "Test result"), HELP_TEST_RESULT("html.label.help.testResult", "Test result"),
HELP_TEST_IT_OUT("html.label.help.testPrompt", "Test it out:"), HELP_TEST_IT_OUT("html.label.help.testPrompt", "Test it out:"),

View File

@ -147,6 +147,10 @@ public abstract class SQLDB extends AbstractDatabase {
} }
} }
public static ThreadLocal<StackTraceElement[]> getTransactionOrigin() {
return TRANSACTION_ORIGIN;
}
@Override @Override
public void init() { public void init() {
List<Runnable> unfinishedTransactions = forceCloseTransactionExecutor(); List<Runnable> unfinishedTransactions = forceCloseTransactionExecutor();
@ -187,22 +191,6 @@ public abstract class SQLDB extends AbstractDatabase {
return true; return true;
} }
protected List<Runnable> forceCloseTransactionExecutor() {
if (transactionExecutor == null || transactionExecutor.isShutdown() || transactionExecutor.isTerminated()) {
return Collections.emptyList();
}
try {
List<Runnable> unfinished = transactionExecutor.shutdownNow();
int unfinishedCount = unfinished.size();
if (unfinishedCount > 0) {
logger.warn(unfinishedCount + " unfinished database transactions were not executed.");
}
return unfinished;
} finally {
logger.info(locale.getString(PluginLang.DISABLED_WAITING_TRANSACTIONS_COMPLETE));
}
}
Patch[] patches() { Patch[] patches() {
return new Patch[]{ return new Patch[]{
new Version10Patch(), new Version10Patch(),
@ -313,6 +301,22 @@ public abstract class SQLDB extends AbstractDatabase {
*/ */
public abstract void setupDataSource(); public abstract void setupDataSource();
protected List<Runnable> forceCloseTransactionExecutor() {
if (transactionExecutor == null || transactionExecutor.isShutdown() || transactionExecutor.isTerminated()) {
return Collections.emptyList();
}
try {
List<Runnable> unfinished = transactionExecutor.shutdownNow();
int unfinishedCount = unfinished.size();
if (unfinishedCount > 0) {
logger.warn(unfinishedCount + " unfinished database transactions were not executed.");
}
return unfinished;
} finally {
logger.info(locale.getString(PluginLang.DISABLED_WAITING_TRANSACTIONS_COMPLETE));
}
}
@Override @Override
public void close() { public void close() {
// SQLiteDB Overrides this, so any additions to this should also be reflected there. // SQLiteDB Overrides this, so any additions to this should also be reflected there.
@ -326,13 +330,6 @@ public abstract class SQLDB extends AbstractDatabase {
setState(State.CLOSED); setState(State.CLOSED);
} }
protected void unloadDriverClassloader() {
// Unloading class loader using close() causes issues when reloading.
// It is better to leak this memory than crash the plugin on reload.
driverClassLoader = null;
}
public abstract Connection getConnection() throws SQLException; public abstract Connection getConnection() throws SQLException;
public abstract void returnToPool(Connection connection); public abstract void returnToPool(Connection connection);
@ -346,8 +343,11 @@ public abstract class SQLDB extends AbstractDatabase {
return accessLock.performDatabaseOperation(() -> query.executeQuery(this), transaction); return accessLock.performDatabaseOperation(() -> query.executeQuery(this), transaction);
} }
public static ThreadLocal<StackTraceElement[]> getTransactionOrigin() { protected void unloadDriverClassloader() {
return TRANSACTION_ORIGIN; // Unloading class loader using close() causes issues when reloading.
// It is better to leak this memory than crash the plugin on reload.
driverClassLoader = null;
} }
@Override @Override

View File

@ -0,0 +1,63 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.storage.database.queries.objects;
import com.djrapitops.plan.delivery.domain.datatransfer.AllowlistBounce;
import com.djrapitops.plan.identification.ServerUUID;
import com.djrapitops.plan.storage.database.queries.Query;
import com.djrapitops.plan.storage.database.sql.tables.AllowlistBounceTable;
import com.djrapitops.plan.storage.database.sql.tables.ServerTable;
import org.intellij.lang.annotations.Language;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.UUID;
import static com.djrapitops.plan.storage.database.sql.building.Sql.*;
/**
* Query against {@link AllowlistBounceTable}.
*
* @author AuroraLS3
*/
public class AllowlistQueries {
private AllowlistQueries() {
/* Static method class */
}
public static Query<List<AllowlistBounce>> getBounces(ServerUUID serverUUID) {
@Language("SQL") String sql = SELECT +
AllowlistBounceTable.UUID + ',' +
AllowlistBounceTable.USER_NAME + ',' +
AllowlistBounceTable.TIMES + ',' +
AllowlistBounceTable.LAST_BOUNCE +
FROM + AllowlistBounceTable.TABLE_NAME +
WHERE + AllowlistBounceTable.SERVER_ID + "=" + ServerTable.SELECT_SERVER_ID;
return db -> db.queryList(sql, AllowlistQueries::extract, serverUUID);
}
private static AllowlistBounce extract(ResultSet set) throws SQLException {
return new AllowlistBounce(
UUID.fromString(set.getString(AllowlistBounceTable.UUID)),
set.getString(AllowlistBounceTable.USER_NAME),
set.getInt(AllowlistBounceTable.TIMES),
set.getLong(AllowlistBounceTable.LAST_BOUNCE)
);
}
}

View File

@ -28,6 +28,8 @@ import com.djrapitops.plan.storage.database.sql.tables.ServerTable;
import com.djrapitops.plan.storage.database.sql.tables.SessionsTable; import com.djrapitops.plan.storage.database.sql.tables.SessionsTable;
import com.djrapitops.plan.storage.database.sql.tables.UsersTable; import com.djrapitops.plan.storage.database.sql.tables.UsersTable;
import com.djrapitops.plan.utilities.dev.Untrusted; import com.djrapitops.plan.utilities.dev.Untrusted;
import org.apache.commons.text.TextStringBuilder;
import org.jetbrains.annotations.VisibleForTesting;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -43,6 +45,7 @@ public class JoinAddressQueries {
/* Static method class */ /* Static method class */
} }
@VisibleForTesting
public static Query<Map<String, Integer>> latestJoinAddresses() { public static Query<Map<String, Integer>> latestJoinAddresses() {
String selectLatestJoinAddresses = SELECT + String selectLatestJoinAddresses = SELECT +
"COUNT(1) as total," + "COUNT(1) as total," +
@ -66,6 +69,7 @@ public class JoinAddressQueries {
joinAddresses.put(UUID.fromString(set.getString(UsersTable.USER_UUID)), set.getString(JoinAddressTable.JOIN_ADDRESS)); joinAddresses.put(UUID.fromString(set.getString(UsersTable.USER_UUID)), set.getString(JoinAddressTable.JOIN_ADDRESS));
} }
@VisibleForTesting
public static Query<Map<String, Integer>> latestJoinAddresses(ServerUUID serverUUID) { public static Query<Map<String, Integer>> latestJoinAddresses(ServerUUID serverUUID) {
String selectLatestSessionStarts = SELECT + SessionsTable.USER_ID + ",MAX(" + SessionsTable.SESSION_START + ") as max_start" + String selectLatestSessionStarts = SELECT + SessionsTable.USER_ID + ",MAX(" + SessionsTable.SESSION_START + ") as max_start" +
FROM + SessionsTable.TABLE_NAME + " max_s" + FROM + SessionsTable.TABLE_NAME + " max_s" +
@ -141,6 +145,28 @@ public class JoinAddressQueries {
}; };
} }
public static QueryStatement<List<String>> allJoinAddresses(ServerUUID serverUUID) {
String sql = SELECT + DISTINCT + JoinAddressTable.JOIN_ADDRESS +
FROM + JoinAddressTable.TABLE_NAME + " j" +
INNER_JOIN + SessionsTable.TABLE_NAME + " s ON s." + SessionsTable.JOIN_ADDRESS_ID + "=j." + JoinAddressTable.ID +
WHERE + SessionsTable.SERVER_ID + "=" + ServerTable.SELECT_SERVER_ID +
ORDER_BY + JoinAddressTable.JOIN_ADDRESS + " ASC";
return new QueryStatement<>(sql, 100) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setString(1, serverUUID.toString());
}
@Override
public List<String> processResults(ResultSet set) throws SQLException {
List<String> joinAddresses = new ArrayList<>();
while (set.next()) joinAddresses.add(set.getString(JoinAddressTable.JOIN_ADDRESS));
return joinAddresses;
}
};
}
public static Query<List<String>> uniqueJoinAddresses() { public static Query<List<String>> uniqueJoinAddresses() {
return db -> { return db -> {
List<String> addresses = db.query(allJoinAddresses()); List<String> addresses = db.query(allJoinAddresses());
@ -151,6 +177,16 @@ public class JoinAddressQueries {
}; };
} }
public static Query<List<String>> uniqueJoinAddresses(ServerUUID serverUUID) {
return db -> {
List<String> addresses = db.query(allJoinAddresses(serverUUID));
if (!addresses.contains(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP)) {
addresses.add(JoinAddressTable.DEFAULT_VALUE_FOR_LOOKUP);
}
return addresses;
};
}
public static Query<Set<Integer>> userIdsOfPlayersWithJoinAddresses(@Untrusted List<String> joinAddresses) { public static Query<Set<Integer>> userIdsOfPlayersWithJoinAddresses(@Untrusted List<String> joinAddresses) {
String sql = SELECT + DISTINCT + SessionsTable.USER_ID + String sql = SELECT + DISTINCT + SessionsTable.USER_ID +
FROM + JoinAddressTable.TABLE_NAME + " j" + FROM + JoinAddressTable.TABLE_NAME + " j" +
@ -162,21 +198,27 @@ public class JoinAddressQueries {
return db -> db.querySet(sql, RowExtractors.getInt(SessionsTable.USER_ID), joinAddresses.toArray()); return db -> db.querySet(sql, RowExtractors.getInt(SessionsTable.USER_ID), joinAddresses.toArray());
} }
public static Query<List<DateObj<Map<String, Integer>>>> joinAddressesPerDay(ServerUUID serverUUID, long timezoneOffset, long after, long before) { public static Query<List<DateObj<Map<String, Integer>>>> joinAddressesPerDay(ServerUUID serverUUID, long timezoneOffset, long after, long before, @Untrusted List<String> addressFilter) {
return db -> { return db -> {
Sql sql = db.getSql(); Sql sql = db.getSql();
List<Integer> ids = db.query(joinAddressIds(addressFilter));
if (ids != null && ids.isEmpty()) return List.of();
String selectAddresses = SELECT + String selectAddresses = SELECT +
sql.dateToEpochSecond(sql.dateToDayStamp(sql.epochSecondToDate('(' + SessionsTable.SESSION_START + "+?)/1000"))) + sql.dateToEpochSecond(sql.dateToDayStamp(sql.epochSecondToDate('(' + SessionsTable.SESSION_START + "+?)/1000"))) +
"*1000 as date," + "*1000 as date," +
JoinAddressTable.JOIN_ADDRESS + JoinAddressTable.JOIN_ADDRESS + ',' +
SessionsTable.USER_ID +
", COUNT(1) as count" + ", COUNT(1) as count" +
FROM + SessionsTable.TABLE_NAME + " s" + FROM + SessionsTable.TABLE_NAME + " s" +
LEFT_JOIN + JoinAddressTable.TABLE_NAME + " j on s." + SessionsTable.JOIN_ADDRESS_ID + "=j." + JoinAddressTable.ID + LEFT_JOIN + JoinAddressTable.TABLE_NAME + " j on s." + SessionsTable.JOIN_ADDRESS_ID + "=j." + JoinAddressTable.ID +
WHERE + SessionsTable.SERVER_ID + "=" + ServerTable.SELECT_SERVER_ID + WHERE + SessionsTable.SERVER_ID + "=" + ServerTable.SELECT_SERVER_ID +
AND + SessionsTable.SESSION_START + ">?" + AND + SessionsTable.SESSION_START + ">?" +
AND + SessionsTable.SESSION_START + "<=?" + AND + SessionsTable.SESSION_START + "<=?" +
GROUP_BY + "date,j." + JoinAddressTable.JOIN_ADDRESS; (ids == null ? "" : AND + "j." + JoinAddressTable.ID +
" IN (" + new TextStringBuilder().appendWithSeparators(ids, ",").build() + ")") +
GROUP_BY + "date,j." + JoinAddressTable.JOIN_ADDRESS + ',' + SessionsTable.USER_ID;
return db.query(new QueryStatement<>(selectAddresses, 1000) { return db.query(new QueryStatement<>(selectAddresses, 1000) {
@Override @Override
@ -193,9 +235,9 @@ public class JoinAddressQueries {
while (set.next()) { while (set.next()) {
long date = set.getLong("date"); long date = set.getLong("date");
String joinAddress = set.getString(JoinAddressTable.JOIN_ADDRESS); String joinAddress = set.getString(JoinAddressTable.JOIN_ADDRESS);
int count = set.getInt("count");
Map<String, Integer> joinAddresses = addressesByDate.computeIfAbsent(date, k -> new TreeMap<>()); Map<String, Integer> joinAddresses = addressesByDate.computeIfAbsent(date, k -> new TreeMap<>());
joinAddresses.put(joinAddress, count); // We ignore the count and get the number of players instead of sessions
joinAddresses.compute(joinAddress, (key, oldValue) -> oldValue != null ? oldValue + 1 : 1);
} }
return addressesByDate.entrySet() return addressesByDate.entrySet()
@ -206,20 +248,37 @@ public class JoinAddressQueries {
}; };
} }
public static Query<List<DateObj<Map<String, Integer>>>> joinAddressesPerDay(long timezoneOffset, long after, long before) { public static Query<List<Integer>> joinAddressIds(@Untrusted List<String> addresses) {
return db -> {
if (addresses.isEmpty()) return null;
String selectJoinAddressIds = SELECT + JoinAddressTable.ID +
FROM + JoinAddressTable.TABLE_NAME +
WHERE + JoinAddressTable.JOIN_ADDRESS + " IN (" + Sql.nParameters(addresses.size()) + ")";
return db.queryList(selectJoinAddressIds, set -> set.getInt(JoinAddressTable.ID), addresses);
};
}
public static Query<List<DateObj<Map<String, Integer>>>> joinAddressesPerDay(long timezoneOffset, long after, long before, @Untrusted List<String> addressFilter) {
return db -> { return db -> {
Sql sql = db.getSql(); Sql sql = db.getSql();
List<Integer> ids = db.query(joinAddressIds(addressFilter));
if (ids != null && ids.isEmpty()) return List.of();
String selectAddresses = SELECT + String selectAddresses = SELECT +
sql.dateToEpochSecond(sql.dateToDayStamp(sql.epochSecondToDate('(' + SessionsTable.SESSION_START + "+?)/1000"))) + sql.dateToEpochSecond(sql.dateToDayStamp(sql.epochSecondToDate('(' + SessionsTable.SESSION_START + "+?)/1000"))) +
"*1000 as date," + "*1000 as date," +
JoinAddressTable.JOIN_ADDRESS + JoinAddressTable.JOIN_ADDRESS + ',' +
SessionsTable.USER_ID +
", COUNT(1) as count" + ", COUNT(1) as count" +
FROM + SessionsTable.TABLE_NAME + " s" + FROM + SessionsTable.TABLE_NAME + " s" +
LEFT_JOIN + JoinAddressTable.TABLE_NAME + " j on s." + SessionsTable.JOIN_ADDRESS_ID + "=j." + JoinAddressTable.ID + LEFT_JOIN + JoinAddressTable.TABLE_NAME + " j on s." + SessionsTable.JOIN_ADDRESS_ID + "=j." + JoinAddressTable.ID +
WHERE + SessionsTable.SESSION_START + ">?" + WHERE + SessionsTable.SESSION_START + ">?" +
AND + SessionsTable.SESSION_START + "<=?" + AND + SessionsTable.SESSION_START + "<=?" +
GROUP_BY + "date,j." + JoinAddressTable.JOIN_ADDRESS; (ids == null ? "" : AND + "j." + JoinAddressTable.ID +
" IN (" + new TextStringBuilder().appendWithSeparators(ids, ",").build() + ")") +
GROUP_BY + "date,j." + JoinAddressTable.JOIN_ADDRESS + ',' + SessionsTable.USER_ID;
return db.query(new QueryStatement<>(selectAddresses, 1000) { return db.query(new QueryStatement<>(selectAddresses, 1000) {
@Override @Override
@ -235,9 +294,9 @@ public class JoinAddressQueries {
while (set.next()) { while (set.next()) {
long date = set.getLong("date"); long date = set.getLong("date");
String joinAddress = set.getString(JoinAddressTable.JOIN_ADDRESS); String joinAddress = set.getString(JoinAddressTable.JOIN_ADDRESS);
int count = set.getInt("count");
Map<String, Integer> joinAddresses = addressesByDate.computeIfAbsent(date, k -> new TreeMap<>()); Map<String, Integer> joinAddresses = addressesByDate.computeIfAbsent(date, k -> new TreeMap<>());
joinAddresses.put(joinAddress, count); // We ignore the count and get the number of players instead of sessions
joinAddresses.compute(joinAddress, (key, oldValue) -> oldValue != null ? oldValue + 1 : 1);
} }
return addressesByDate.entrySet() return addressesByDate.entrySet()

View File

@ -1014,4 +1014,16 @@ public class SessionQueries {
} }
}; };
} }
public static Query<Map<UUID, Long>> lastSeen(ServerUUID serverUUID) {
String sql = SELECT + UsersTable.USER_UUID + ", MAX(" + SessionsTable.SESSION_END + ") as last_seen" +
FROM + SessionsTable.TABLE_NAME + " s" +
INNER_JOIN + UsersTable.TABLE_NAME + " u ON u." + UsersTable.ID + "=s." + SessionsTable.USER_ID +
WHERE + SessionsTable.SERVER_ID + "=" + ServerTable.SELECT_SERVER_ID +
GROUP_BY + UsersTable.USER_UUID;
return db -> db.queryMap(sql, (set, to) -> to.put(
UUID.fromString(set.getString(UsersTable.USER_UUID)),
set.getLong("last_seen")
), serverUUID);
}
} }

View File

@ -16,6 +16,7 @@
*/ */
package com.djrapitops.plan.storage.database.sql.building; package com.djrapitops.plan.storage.database.sql.building;
import com.djrapitops.plan.storage.database.DBType;
import org.apache.commons.text.TextStringBuilder; import org.apache.commons.text.TextStringBuilder;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
@ -96,6 +97,15 @@ public abstract class Sql {
} }
} }
public static String concat(DBType dbType, String one, String two) {
if (dbType == DBType.MYSQL) {
return "CONCAT(" + one + ',' + two + ")";
} else if (dbType == DBType.SQLITE) {
return one + " || " + two;
}
return one + two;
}
public abstract String epochSecondToDate(String sql); public abstract String epochSecondToDate(String sql);
public abstract String dateToEpochSecond(String sql); public abstract String dateToEpochSecond(String sql);
@ -108,6 +118,8 @@ public abstract class Sql {
public abstract String dateToHour(String sql); public abstract String dateToHour(String sql);
public abstract String insertOrIgnore();
// https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html // https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html
public static class MySQL extends Sql { public static class MySQL extends Sql {
@ -140,6 +152,11 @@ public abstract class Sql {
public String dateToHour(String sql) { public String dateToHour(String sql) {
return "HOUR(" + sql + ") % 24"; return "HOUR(" + sql + ") % 24";
} }
@Override
public String insertOrIgnore() {
return "INSERT IGNORE INTO ";
}
} }
// https://sqlite.org/lang_datefunc.html // https://sqlite.org/lang_datefunc.html
@ -174,5 +191,10 @@ public abstract class Sql {
public String dateToHour(String sql) { public String dateToHour(String sql) {
return "strftime('%H'," + sql + ')'; return "strftime('%H'," + sql + ')';
} }
@Override
public String insertOrIgnore() {
return "INSERT OR IGNORE INTO ";
}
} }
} }

View File

@ -0,0 +1,70 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.storage.database.sql.tables;
import com.djrapitops.plan.storage.database.DBType;
import com.djrapitops.plan.storage.database.sql.building.CreateTableBuilder;
import com.djrapitops.plan.storage.database.sql.building.Sql;
import org.intellij.lang.annotations.Language;
/**
* Represents plan_allowlist_bounce table.
*
* @author AuroraLS3
*/
public class AllowlistBounceTable {
public static final String TABLE_NAME = "plan_allowlist_bounce";
public static final String ID = "id";
public static final String UUID = "uuid";
public static final String USER_NAME = "name";
public static final String SERVER_ID = "server_id";
public static final String TIMES = "times";
public static final String LAST_BOUNCE = "last_bounce";
@Language("SQL")
public static final String INSERT_STATEMENT = "INSERT INTO " + TABLE_NAME + " (" +
UUID + ',' +
USER_NAME + ',' +
SERVER_ID + ',' +
TIMES + ',' +
LAST_BOUNCE +
") VALUES (?,?," + ServerTable.SELECT_SERVER_ID + ",?,?)";
@Language("SQL")
public static final String INCREMENT_TIMES_STATEMENT = "UPDATE " + TABLE_NAME +
" SET " + TIMES + "=" + TIMES + "+1, " + LAST_BOUNCE + "=?" +
" WHERE " + UUID + "=?" +
" AND " + SERVER_ID + "=" + ServerTable.SELECT_SERVER_ID;
private AllowlistBounceTable() {
/* Static information class */
}
public static String createTableSQL(DBType dbType) {
return CreateTableBuilder.create(TABLE_NAME, dbType)
.column(ID, Sql.INT).primaryKey()
.column(UUID, Sql.varchar(36)).notNull().unique()
.column(USER_NAME, Sql.varchar(36)).notNull()
.column(SERVER_ID, Sql.INT).notNull()
.column(TIMES, Sql.INT).notNull().defaultValue("0")
.column(LAST_BOUNCE, Sql.LONG).notNull()
.foreignKey(SERVER_ID, ServerTable.TABLE_NAME, ServerTable.ID)
.toString();
}
}

View File

@ -24,6 +24,7 @@ import com.djrapitops.plan.storage.database.sql.building.Insert;
import com.djrapitops.plan.storage.database.sql.building.Sql; import com.djrapitops.plan.storage.database.sql.building.Sql;
import com.djrapitops.plan.storage.database.sql.building.Update; import com.djrapitops.plan.storage.database.sql.building.Update;
import org.apache.commons.text.TextStringBuilder; import org.apache.commons.text.TextStringBuilder;
import org.intellij.lang.annotations.Language;
import java.util.Collection; import java.util.Collection;
@ -61,6 +62,7 @@ public class ServerTable {
.where(SERVER_UUID + "=?") .where(SERVER_UUID + "=?")
.toString(); .toString();
@Language("SQL")
public static final String SELECT_SERVER_ID = public static final String SELECT_SERVER_ID =
'(' + SELECT + TABLE_NAME + '.' + ID + '(' + SELECT + TABLE_NAME + '.' + ID +
FROM + TABLE_NAME + FROM + TABLE_NAME +

View File

@ -41,6 +41,10 @@ public class WebPermissionTable {
/* Static information class */ /* Static information class */
} }
public static String safeInsertSQL(DBType dbType) {
return dbType.getSql().insertOrIgnore() + TABLE_NAME + " (" + PERMISSION + ") VALUES (?)";
}
public static String createTableSQL(DBType dbType) { public static String createTableSQL(DBType dbType) {
return CreateTableBuilder.create(TABLE_NAME, dbType) return CreateTableBuilder.create(TABLE_NAME, dbType)
.column(ID, Sql.INT).primaryKey() .column(ID, Sql.INT).primaryKey()

View File

@ -43,6 +43,7 @@ public class RemoveEverythingTransaction extends Patch {
clearTable(WorldTimesTable.TABLE_NAME); clearTable(WorldTimesTable.TABLE_NAME);
clearTable(SessionsTable.TABLE_NAME); clearTable(SessionsTable.TABLE_NAME);
clearTable(JoinAddressTable.TABLE_NAME); clearTable(JoinAddressTable.TABLE_NAME);
clearTable(AllowlistBounceTable.TABLE_NAME);
clearTable(WorldTable.TABLE_NAME); clearTable(WorldTable.TABLE_NAME);
clearTable(PingTable.TABLE_NAME); clearTable(PingTable.TABLE_NAME);
clearTable(UserInfoTable.TABLE_NAME); clearTable(UserInfoTable.TABLE_NAME);

View File

@ -0,0 +1,43 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.storage.database.transactions.commands;
import com.djrapitops.plan.storage.database.sql.tables.webuser.SecurityTable;
import com.djrapitops.plan.storage.database.sql.tables.webuser.WebGroupTable;
import com.djrapitops.plan.storage.database.sql.tables.webuser.WebGroupToPermissionTable;
import com.djrapitops.plan.storage.database.sql.tables.webuser.WebUserPreferencesTable;
import com.djrapitops.plan.storage.database.transactions.Transaction;
/**
* Transaction that removes all web groups from the database.
*
* @author AuroraLS3
*/
public class RemoveWebGroupsTransaction extends Transaction {
@Override
protected void performOperations() {
clearTable(WebUserPreferencesTable.TABLE_NAME);
clearTable(SecurityTable.TABLE_NAME);
clearTable(WebGroupToPermissionTable.TABLE_NAME);
clearTable(WebGroupTable.TABLE_NAME);
}
private void clearTable(String tableName) {
execute("DELETE FROM " + tableName);
}
}

View File

@ -0,0 +1,72 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.storage.database.transactions.events;
import com.djrapitops.plan.identification.ServerUUID;
import com.djrapitops.plan.storage.database.sql.tables.AllowlistBounceTable;
import com.djrapitops.plan.storage.database.transactions.ExecStatement;
import com.djrapitops.plan.storage.database.transactions.Transaction;
import com.djrapitops.plan.utilities.dev.Untrusted;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.UUID;
/**
* Stores a bounced allowlist login.
*
* @author AuroraLS3
*/
public class StoreAllowlistBounceTransaction extends Transaction {
private final UUID playerUUID;
@Untrusted
private final String playerName;
private final ServerUUID serverUUID;
private final long time;
public StoreAllowlistBounceTransaction(UUID playerUUID, @Untrusted String playerName, ServerUUID serverUUID, long time) {
this.playerUUID = playerUUID;
this.playerName = playerName;
this.serverUUID = serverUUID;
this.time = time;
}
@Override
protected void performOperations() {
boolean updated = execute(new ExecStatement(AllowlistBounceTable.INCREMENT_TIMES_STATEMENT) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setLong(1, time);
statement.setString(2, playerUUID.toString());
statement.setString(3, serverUUID.toString());
}
});
if (!updated) {
execute(new ExecStatement(AllowlistBounceTable.INSERT_STATEMENT) {
@Override
public void prepare(PreparedStatement statement) throws SQLException {
statement.setString(1, playerUUID.toString());
statement.setString(2, playerName);
statement.setString(3, serverUUID.toString());
statement.setInt(4, 1);
statement.setLong(5, time);
}
});
}
}
}

View File

@ -57,7 +57,7 @@ public class StoreRequestTransaction extends ThrowawayTransaction {
@Override @Override
public void prepare(PreparedStatement statement) throws SQLException { public void prepare(PreparedStatement statement) throws SQLException {
statement.setLong(1, timestamp); statement.setLong(1, timestamp);
statement.setString(2, accessAddress); statement.setString(2, StringUtils.truncate(accessAddress, 45));
statement.setString(3, method); statement.setString(3, method);
statement.setString(4, url); statement.setString(4, url);
statement.setInt(5, responseCode); statement.setInt(5, responseCode);

View File

@ -59,6 +59,7 @@ public class CreateTablesTransaction extends OperationCriticalTransaction {
executeOther(new SecurityTableIdPatch()); executeOther(new SecurityTableIdPatch());
execute(WebUserPreferencesTable.createTableSQL(dbType)); execute(WebUserPreferencesTable.createTableSQL(dbType));
execute(PluginVersionTable.createTableSQL(dbType)); execute(PluginVersionTable.createTableSQL(dbType));
execute(AllowlistBounceTable.createTableSQL(dbType));
// DataExtension tables // DataExtension tables
execute(ExtensionIconTable.createTableSQL(dbType)); execute(ExtensionIconTable.createTableSQL(dbType));

View File

@ -51,6 +51,8 @@ public class CorrectWrongCharacterEncodingPatch extends Patch {
if (dbType != DBType.MYSQL) return true; if (dbType != DBType.MYSQL) return true;
correctionSqlQueries = query(getBadTableCorrectionQueries()); correctionSqlQueries = query(getBadTableCorrectionQueries());
// Fix for MariaDB mysql.user table being a view
correctionSqlQueries.removeIf(sql -> sql.startsWith("ALTER TABLE `user`"));
return correctionSqlQueries.isEmpty(); return correctionSqlQueries.isEmpty();
} }

View File

@ -17,7 +17,7 @@
package com.djrapitops.plan.storage.database.transactions.patches; package com.djrapitops.plan.storage.database.transactions.patches;
import com.djrapitops.plan.exceptions.database.DBOpException; import com.djrapitops.plan.exceptions.database.DBOpException;
import com.djrapitops.plan.storage.database.DBType; import com.djrapitops.plan.storage.database.sql.building.Sql;
import com.djrapitops.plan.storage.database.sql.tables.webuser.SecurityTable; import com.djrapitops.plan.storage.database.sql.tables.webuser.SecurityTable;
import com.djrapitops.plan.storage.database.sql.tables.webuser.WebGroupTable; import com.djrapitops.plan.storage.database.sql.tables.webuser.WebGroupTable;
@ -71,7 +71,7 @@ public class SecurityTableGroupPatch extends Patch {
SecurityTable.USERNAME + ',' + SecurityTable.USERNAME + ',' +
SecurityTable.LINKED_TO + ',' + SecurityTable.LINKED_TO + ',' +
SecurityTable.SALT_PASSWORD_HASH + ',' + SecurityTable.SALT_PASSWORD_HASH + ',' +
"(" + SELECT + WebGroupTable.ID + FROM + WebGroupTable.TABLE_NAME + WHERE + WebGroupTable.NAME + "=" + (dbType == DBType.SQLITE ? "'legacy_level_' || permission_level" : "CONCAT('legacy_level_', permission_level)") + ")" + "(" + SELECT + WebGroupTable.ID + FROM + WebGroupTable.TABLE_NAME + WHERE + WebGroupTable.NAME + "=" + Sql.concat(dbType, "'legacy_level_'", "permission_level") + ")" +
FROM + tempTableName FROM + tempTableName
); );

View File

@ -39,7 +39,7 @@ public class UpdateWebPermissionsPatch extends Patch {
@Override @Override
public boolean hasBeenApplied() { public boolean hasBeenApplied() {
List<String> defaultPermissions = Arrays.stream(WebPermission.values()) List<String> defaultPermissions = Arrays.stream(WebPermission.nonDeprecatedValues())
.map(WebPermission::getPermission) .map(WebPermission::getPermission)
.collect(Collectors.toList()); .collect(Collectors.toList());
List<String> storedPermissions = query(WebUserQueries.fetchAvailablePermissions()); List<String> storedPermissions = query(WebUserQueries.fetchAvailablePermissions());
@ -55,7 +55,11 @@ public class UpdateWebPermissionsPatch extends Patch {
@Override @Override
protected void applyPatch() { protected void applyPatch() {
execute(new ExecBatchStatement(WebPermissionTable.INSERT_STATEMENT) { storeMissing();
}
private void storeMissing() {
execute(new ExecBatchStatement(WebPermissionTable.safeInsertSQL(dbType)) {
@Override @Override
public void prepare(PreparedStatement statement) throws SQLException { public void prepare(PreparedStatement statement) throws SQLException {
for (String permission : missingPermissions) { for (String permission : missingPermissions) {

View File

@ -50,7 +50,7 @@ public class StoreMissingWebPermissionsTransaction extends Transaction {
missingPermissions.add(permission); missingPermissions.add(permission);
} }
} }
execute(new ExecBatchStatement(WebPermissionTable.INSERT_STATEMENT) { execute(new ExecBatchStatement(WebPermissionTable.safeInsertSQL(dbType)) {
@Override @Override
public void prepare(PreparedStatement statement) throws SQLException { public void prepare(PreparedStatement statement) throws SQLException {
for (String permission : missingPermissions) { for (String permission : missingPermissions) {

View File

@ -16,7 +16,7 @@
*/ */
package com.djrapitops.plan.storage.file; package com.djrapitops.plan.storage.file;
import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.io.IOUtils;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;

View File

@ -110,8 +110,6 @@ public class DBCleanTask extends TaskSystem.Task {
config.get(TimeSettings.DELETE_PING_DATA_AFTER) config.get(TimeSettings.DELETE_PING_DATA_AFTER)
)); ));
database.executeTransaction(new RemoveDuplicateUserInfoTransaction()); database.executeTransaction(new RemoveDuplicateUserInfoTransaction());
// database.executeTransaction(new RemoveUnsatisfiedConditionalPlayerResultsTransaction());
// database.executeTransaction(new RemoveUnsatisfiedConditionalServerResultsTransaction());
int removed = cleanOldPlayers(database); int removed = cleanOldPlayers(database);
if (removed > 0) { if (removed > 0) {
logger.info(locale.getString(PluginLang.DB_NOTIFY_CLEAN, removed)); logger.info(locale.getString(PluginLang.DB_NOTIFY_CLEAN, removed));

View File

@ -114,8 +114,14 @@ Data_gathering:
Geolocation_Download_URL: "https://geodb.playeranalytics.net/GeoLite2-Country.mmdb" Geolocation_Download_URL: "https://geodb.playeranalytics.net/GeoLite2-Country.mmdb"
Ping: true Ping: true
Disk_space: true Disk_space: true
# Does not affect already gathered data Join_addresses:
Preserve_join_address_case: false Enabled: true
# Does not affect already gathered data
Preserve_case: false
Preserve_invalid: false
# Replaces these join addresses with unknown
Filter_out_from_data:
- "play.example.com"
# ----------------------------------------------------- # -----------------------------------------------------
# Supported time units: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS # Supported time units: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS
# ----------------------------------------------------- # -----------------------------------------------------

View File

@ -118,8 +118,14 @@ Data_gathering:
Commands: Commands:
Log_unknown: false Log_unknown: false
Log_aliases_as_main_command: true Log_aliases_as_main_command: true
# Does not affect already gathered data Join_addresses:
Preserve_join_address_case: false Enabled: true
# Does not affect already gathered data
Preserve_case: false
Preserve_invalid: false
# Replaces these join addresses with unknown
Filter_out_from_data:
- "play.example.com"
# ----------------------------------------------------- # -----------------------------------------------------
# Supported time units: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS # Supported time units: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS
# ----------------------------------------------------- # -----------------------------------------------------

View File

@ -290,13 +290,19 @@ html:
active: "活跃" active: "活跃"
activePlaytime: "活跃时间" activePlaytime: "活跃时间"
activityIndex: "活跃指数" activityIndex: "活跃指数"
addJoinAddressGroup: "添加地址组"
addressGroup: "地址组 {{n}}"
afk: "挂机" afk: "挂机"
afkTime: "挂机时间" afkTime: "挂机时间"
all: "全部" all: "全部"
allTime: "所有时间" allTime: "所有时间"
allowed: "允许"
allowlist: "白名单"
allowlistBounces: "白名单退回"
alphabetical: "按字母顺序" alphabetical: "按字母顺序"
apply: "应用" apply: "应用"
asNumbers: "数据" asNumbers: "数据"
attempts: "尝试"
average: "平均" average: "平均"
averageActivePlaytime: "平均活跃时间" averageActivePlaytime: "平均活跃时间"
averageAfkTime: "平均挂机时间" averageAfkTime: "平均挂机时间"
@ -317,6 +323,7 @@ html:
banned: "已被封禁" banned: "已被封禁"
bestPeak: "历史最高峰值" bestPeak: "历史最高峰值"
bestPing: "最低延迟" bestPing: "最低延迟"
blocked: "阻止"
calendar: " 日历" calendar: " 日历"
comparing7days: "对比 7 天的情况" comparing7days: "对比 7 天的情况"
connectionInfo: "连接信息" connectionInfo: "连接信息"
@ -430,7 +437,10 @@ html:
last24hours: "过去 24 小时" last24hours: "过去 24 小时"
last30days: "过去 30 天" last30days: "过去 30 天"
last7days: "过去 7 天" last7days: "过去 7 天"
lastAllowed: "最后允许"
lastBlocked: "最后阻止"
lastConnected: "最后连接时间" lastConnected: "最后连接时间"
lastKnownAttempt: "最后一次已知的尝试"
lastPeak: "上次在线峰值" lastPeak: "上次在线峰值"
lastSeen: "最后在线时间" lastSeen: "最后在线时间"
latestJoinAddresses: "上一次加入地址" latestJoinAddresses: "上一次加入地址"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "查看按国家划分的Ping表" page_network_geolocations_ping_per_country: "查看按国家划分的Ping表"
page_network_join_addresses: "查看加入地址 - 选项卡" page_network_join_addresses: "查看加入地址 - 选项卡"
page_network_join_addresses_graphs: "查看加入地址图表" page_network_join_addresses_graphs: "查看加入地址图表"
page_network_join_addresses_graphs_pie: "查看最新加入地址图表"
page_network_join_addresses_graphs_time: "查看加入地址随时间变化的图表" page_network_join_addresses_graphs_time: "查看加入地址随时间变化的图表"
page_network_overview: "查看网络总览 - 选项卡" page_network_overview: "查看网络总览 - 选项卡"
page_network_overview_graphs: "查看网络总览图表" page_network_overview_graphs: "查看网络总览图表"
@ -686,12 +695,12 @@ html:
page_player_sessions: "查看玩家会话 - 选项卡" page_player_sessions: "查看玩家会话 - 选项卡"
page_player_versus: "查看PvP和PvE - 选项卡" page_player_versus: "查看PvP和PvE - 选项卡"
page_server: "查看所有服务器页面" page_server: "查看所有服务器页面"
page_server_allowlist_bounce: "查看游戏白名单退回列表"
page_server_geolocations: "查看服务器地理位置 - 选项卡" page_server_geolocations: "查看服务器地理位置 - 选项卡"
page_server_geolocations_map: "查看服务器地理位置地图" page_server_geolocations_map: "查看服务器地理位置地图"
page_server_geolocations_ping_per_country: "查看按国家划分的延迟表" page_server_geolocations_ping_per_country: "查看按国家划分的延迟表"
page_server_join_addresses: "查看服务器加入地址 - 选项卡" page_server_join_addresses: "查看服务器加入地址 - 选项卡"
page_server_join_addresses_graphs: "查看服务器加入地址图表" page_server_join_addresses_graphs: "查看服务器加入地址图表"
page_server_join_addresses_graphs_pie: "查看最新加入地址图表"
page_server_join_addresses_graphs_time: "查看服务器加入地址随时间变化的图表" page_server_join_addresses_graphs_time: "查看服务器加入地址随时间变化的图表"
page_server_online_activity: "查看在线活动 - 选项卡" page_server_online_activity: "查看在线活动 - 选项卡"
page_server_online_activity_graphs: "查看在线活动图表" page_server_online_activity_graphs: "查看在线活动图表"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`是`" are: "`是`"
label: label:
editQuery: "修改查询"
from: ">从 </label>" from: ">从 </label>"
makeAnother: "进行另一个查询" makeAnother: "进行另一个查询"
servers: servers:
@ -897,7 +907,7 @@ plugin:
no: "否" no: "否"
today: "'今天'" today: "'今天'"
unavailable: "不可用" unavailable: "不可用"
unknown: "位置" unknown: "未知"
yes: "是" yes: "是"
yesterday: "'昨天'" yesterday: "'昨天'"
localeReloaded: "自定义 locale.yml 已被修改,因此已重新加载并且现在正在使用。" localeReloaded: "自定义 locale.yml 已被修改,因此已重新加载并且现在正在使用。"

View File

@ -290,13 +290,19 @@ html:
active: "Aktivní" active: "Aktivní"
activePlaytime: "Aktivní herní čas" activePlaytime: "Aktivní herní čas"
activityIndex: "Index aktivity" activityIndex: "Index aktivity"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "AFK čas" afkTime: "AFK čas"
all: "Vše" all: "Vše"
allTime: "Celkově" allTime: "Celkově"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Abecední řazení" alphabetical: "Abecední řazení"
apply: "Apply" apply: "Apply"
asNumbers: "statistiky" asNumbers: "statistiky"
attempts: "Attempts"
average: "Průměrná délka prvního připojení" average: "Průměrná délka prvního připojení"
averageActivePlaytime: "Průměrná herní aktivita" averageActivePlaytime: "Průměrná herní aktivita"
averageAfkTime: "Průměrný AFK čas" averageAfkTime: "Průměrný AFK čas"
@ -317,6 +323,7 @@ html:
banned: "Zabanován" banned: "Zabanován"
bestPeak: "Nejvíce hráčů" bestPeak: "Nejvíce hráčů"
bestPing: "Nejlepší ping" bestPing: "Nejlepší ping"
blocked: "Blocked"
calendar: " Kalendář" calendar: " Kalendář"
comparing7days: "Srovnání posledních 7 dní" comparing7days: "Srovnání posledních 7 dní"
connectionInfo: "Informace o připojení" connectionInfo: "Informace o připojení"
@ -430,7 +437,10 @@ html:
last24hours: "Posledních 24 hodin" last24hours: "Posledních 24 hodin"
last30days: "Posledních 30 dní" last30days: "Posledních 30 dní"
last7days: "Posledních 7 dní" last7days: "Posledních 7 dní"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Poslední připojení" lastConnected: "Poslední připojení"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Naposledy nejvíce hráčů" lastPeak: "Naposledy nejvíce hráčů"
lastSeen: "Naposledy viděn" lastSeen: "Naposledy viděn"
latestJoinAddresses: "Poslední adresy pro připojení" latestJoinAddresses: "Poslední adresy pro připojení"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "` jsou`" are: "` jsou`"
label: label:
editQuery: "Edit Query"
from: ">od</label>" from: ">od</label>"
makeAnother: "Vytvořit další dotaz" makeAnother: "Vytvořit další dotaz"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Aktiv" active: "Aktiv"
activePlaytime: "Aktive Spielzeit" activePlaytime: "Aktive Spielzeit"
activityIndex: "Aktivitätsindex" activityIndex: "Aktivitätsindex"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "AFK Zeit" afkTime: "AFK Zeit"
all: "Gesamt" all: "Gesamt"
allTime: "Gesamte zeit" allTime: "Gesamte zeit"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "als Zahlen" asNumbers: "als Zahlen"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "Durchschnittliche aktive Spielzeit" averageActivePlaytime: "Durchschnittliche aktive Spielzeit"
averageAfkTime: "Durchschnittliche AFK Zeit" averageAfkTime: "Durchschnittliche AFK Zeit"
@ -317,6 +323,7 @@ html:
banned: "Gebannt" banned: "Gebannt"
bestPeak: "Rekord" bestPeak: "Rekord"
bestPing: "Bester Ping" bestPing: "Bester Ping"
blocked: "Blocked"
calendar: " Kalender" calendar: " Kalender"
comparing7days: "Vergleiche 7 Tage" comparing7days: "Vergleiche 7 Tage"
connectionInfo: "Verbindungsinformationen" connectionInfo: "Verbindungsinformationen"
@ -430,7 +437,10 @@ html:
last24hours: "Letzte 24 Stunden" last24hours: "Letzte 24 Stunden"
last30days: "Letzte 30 Tage" last30days: "Letzte 30 Tage"
last7days: "Letzte 7 Tage" last7days: "Letzte 7 Tage"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Letzte Verbindung" lastConnected: "Letzte Verbindung"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Letzter Höchststand" lastPeak: "Letzter Höchststand"
lastSeen: "Zuletzt gesehen" lastSeen: "Zuletzt gesehen"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`are`" are: "`are`"
label: label:
editQuery: "Edit Query"
from: ">from</label>" from: ">from</label>"
makeAnother: "Make another query" makeAnother: "Make another query"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Active" active: "Active"
activePlaytime: "Active Playtime" activePlaytime: "Active Playtime"
activityIndex: "Activity Index" activityIndex: "Activity Index"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "AFK Time" afkTime: "AFK Time"
all: "All" all: "All"
allTime: "All Time" allTime: "All Time"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "as Numbers" asNumbers: "as Numbers"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "Average Active Playtime" averageActivePlaytime: "Average Active Playtime"
averageAfkTime: "Average AFK Time" averageAfkTime: "Average AFK Time"
@ -317,6 +323,7 @@ html:
banned: "Banned" banned: "Banned"
bestPeak: "All Time Peak" bestPeak: "All Time Peak"
bestPing: "Best Ping" bestPing: "Best Ping"
blocked: "Blocked"
calendar: " Calendar" calendar: " Calendar"
comparing7days: "Comparing 7 days" comparing7days: "Comparing 7 days"
connectionInfo: "Connection Information" connectionInfo: "Connection Information"
@ -430,7 +437,10 @@ html:
last24hours: "Last 24 hours" last24hours: "Last 24 hours"
last30days: "Last 30 days" last30days: "Last 30 days"
last7days: "Last 7 days" last7days: "Last 7 days"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Last Connected" lastConnected: "Last Connected"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Last Peak" lastPeak: "Last Peak"
lastSeen: "Last Seen" lastSeen: "Last Seen"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`are`" are: "`are`"
label: label:
editQuery: "Edit Query"
from: ">from</label>" from: ">from</label>"
makeAnother: "Make another query" makeAnother: "Make another query"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Activo" active: "Activo"
activePlaytime: "Tiempo de juego activo" activePlaytime: "Tiempo de juego activo"
activityIndex: "Índice de actividad" activityIndex: "Índice de actividad"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "Tiempo AFK" afkTime: "Tiempo AFK"
all: "Todo" all: "Todo"
allTime: "Todo el tiempo" allTime: "Todo el tiempo"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "como números" asNumbers: "como números"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "Tiempo de juego activo promedio" averageActivePlaytime: "Tiempo de juego activo promedio"
averageAfkTime: "Tiempo AFK promedio" averageAfkTime: "Tiempo AFK promedio"
@ -317,6 +323,7 @@ html:
banned: "Baneado" banned: "Baneado"
bestPeak: "Mejor pico" bestPeak: "Mejor pico"
bestPing: "Mejor Ping" bestPing: "Mejor Ping"
blocked: "Blocked"
calendar: " Calendario" calendar: " Calendario"
comparing7days: "Comparando 7 dias" comparing7days: "Comparando 7 dias"
connectionInfo: "Información de conexión" connectionInfo: "Información de conexión"
@ -430,7 +437,10 @@ html:
last24hours: "Últimas 24 horas" last24hours: "Últimas 24 horas"
last30days: "Últimos 30 dias" last30days: "Últimos 30 dias"
last7days: "Últimos 7 días" last7days: "Últimos 7 días"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Última vez conectado" lastConnected: "Última vez conectado"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Último pico" lastPeak: "Último pico"
lastSeen: "Última vez visto" lastSeen: "Última vez visto"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`are`" are: "`are`"
label: label:
editQuery: "Edit Query"
from: ">de</label>" from: ">de</label>"
makeAnother: "Realiza otra consulta" makeAnother: "Realiza otra consulta"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Aktiivinen" active: "Aktiivinen"
activePlaytime: "Aktiivinen peliaika" activePlaytime: "Aktiivinen peliaika"
activityIndex: "Aktiivisuus Indeksi" activityIndex: "Aktiivisuus Indeksi"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "Aika AFK:ina" afkTime: "Aika AFK:ina"
all: "Kaikki" all: "Kaikki"
allTime: "Kaikkien aikojen" allTime: "Kaikkien aikojen"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Aakkosjärjestys" alphabetical: "Aakkosjärjestys"
apply: "Käytä" apply: "Käytä"
asNumbers: "Numeroina" asNumbers: "Numeroina"
attempts: "Attempts"
average: "Keskimäräinen" average: "Keskimäräinen"
averageActivePlaytime: "Keskimäräinen Aktiivinen peliaika" averageActivePlaytime: "Keskimäräinen Aktiivinen peliaika"
averageAfkTime: "Keskimäräinen AFK aika" averageAfkTime: "Keskimäräinen AFK aika"
@ -317,6 +323,7 @@ html:
banned: "Pannassa" banned: "Pannassa"
bestPeak: "Paras Huippu" bestPeak: "Paras Huippu"
bestPing: "Paras Vasteaika" bestPing: "Paras Vasteaika"
blocked: "Blocked"
calendar: " Kalenteri" calendar: " Kalenteri"
comparing7days: "Verrataan 7 päivää" comparing7days: "Verrataan 7 päivää"
connectionInfo: "Yhteyksien tiedot" connectionInfo: "Yhteyksien tiedot"
@ -430,7 +437,10 @@ html:
last24hours: "Viimeiset 24 tuntia" last24hours: "Viimeiset 24 tuntia"
last30days: "Viimeiset 30 päivää" last30days: "Viimeiset 30 päivää"
last7days: "Viimeiset 7 päivää" last7days: "Viimeiset 7 päivää"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Viimeisin yhteys" lastConnected: "Viimeisin yhteys"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Viimeisin huippu" lastPeak: "Viimeisin huippu"
lastSeen: "Nähty Viimeksi" lastSeen: "Nähty Viimeksi"
latestJoinAddresses: "Viimeisimmät Liittymisosoitteet" latestJoinAddresses: "Viimeisimmät Liittymisosoitteet"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "Näkee Viive per Maa -taulun" page_network_geolocations_ping_per_country: "Näkee Viive per Maa -taulun"
page_network_join_addresses: "Näkee Liittymäosoitteet osion" page_network_join_addresses: "Näkee Liittymäosoitteet osion"
page_network_join_addresses_graphs: "Näkee Liittymisosoite kaaviot" page_network_join_addresses_graphs: "Näkee Liittymisosoite kaaviot"
page_network_join_addresses_graphs_pie: "Näkee kaavion Viimeisimmistä liittymisosoitteista"
page_network_join_addresses_graphs_time: "Näkee kaavion Liittymisosoitteista ajan yli" page_network_join_addresses_graphs_time: "Näkee kaavion Liittymisosoitteista ajan yli"
page_network_overview: "Näkee Verkoston katsaus osion" page_network_overview: "Näkee Verkoston katsaus osion"
page_network_overview_graphs: "Näkee Verkoston katsaus kaaviot" page_network_overview_graphs: "Näkee Verkoston katsaus kaaviot"
@ -686,12 +695,12 @@ html:
page_player_sessions: "Näkee Pelaajan Istunnot osion" page_player_sessions: "Näkee Pelaajan Istunnot osion"
page_player_versus: "Näkee PvP & PvE osion" page_player_versus: "Näkee PvP & PvE osion"
page_server: "Näkee koko palvelin sivun" page_server: "Näkee koko palvelin sivun"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "Näkee Geolokaatio osion" page_server_geolocations: "Näkee Geolokaatio osion"
page_server_geolocations_map: "Näkee Geolokaatio kartan" page_server_geolocations_map: "Näkee Geolokaatio kartan"
page_server_geolocations_ping_per_country: "Näkee Viive per Maa -taulun" page_server_geolocations_ping_per_country: "Näkee Viive per Maa -taulun"
page_server_join_addresses: "Näkee Liittymäosoitteet osion" page_server_join_addresses: "Näkee Liittymäosoitteet osion"
page_server_join_addresses_graphs: "Näkee Liittymisosoite kaaviot" page_server_join_addresses_graphs: "Näkee Liittymisosoite kaaviot"
page_server_join_addresses_graphs_pie: "Näkee kaavion Viimeisimmistä liittymisosoitteista"
page_server_join_addresses_graphs_time: "Näkee kaavion Liittymisosoitteista ajan yli" page_server_join_addresses_graphs_time: "Näkee kaavion Liittymisosoitteista ajan yli"
page_server_online_activity: "Näkee Online Aktiivisuus osion" page_server_online_activity: "Näkee Online Aktiivisuus osion"
page_server_online_activity_graphs: "Näkee Online Aktiivisuus kaaviot" page_server_online_activity_graphs: "Näkee Online Aktiivisuus kaaviot"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`ovat`" are: "`ovat`"
label: label:
editQuery: "Edit Query"
from: ">tästä</label>" from: ">tästä</label>"
makeAnother: "Tee toinen kysely" makeAnother: "Tee toinen kysely"
servers: servers:

View File

@ -24,8 +24,8 @@ command:
description: "Nom de la fonctionnalité à désactiver : ${0}" description: "Nom de la fonctionnalité à désactiver : ${0}"
name: "fonctionnalité" name: "fonctionnalité"
group: group:
description: "Web Permission Group, case sensitive." description: "Groupe de permissions Web, sensible à la casse."
name: "group" name: "groupe"
importKind: "type d'importation" importKind: "type d'importation"
nameOrUUID: nameOrUUID:
description: "Nom ou UUID d'un joueur" description: "Nom ou UUID d'un joueur"
@ -67,16 +67,16 @@ command:
failSameServer: "Impossible de marquer ce serveur comme désinstallé (vous y êtes)." failSameServer: "Impossible de marquer ce serveur comme désinstallé (vous y êtes)."
hotswap: "§eN'oubliez pas de passer à la nouvelle base de données (/plan db hotswap ${0}) & de recharger Plan." hotswap: "§eN'oubliez pas de passer à la nouvelle base de données (/plan db hotswap ${0}) & de recharger Plan."
importers: "Importateurs :" importers: "Importateurs :"
preparing: "Preparing.." preparing: "Préparation..."
progress: "${0} / ${1} traité(s).." progress: "${0} / ${1} traité(s)."
start: "> §2Traitement des données..." start: "> §2Traitement des données..."
success: "> §aSuccès !" success: "> §aSuccès !"
playerRemoval: "Suppression des données de ${0} depuis ${1}.." playerRemoval: "Suppression des données de ${0} depuis ${1}."
removal: "Suppression des données de Plan depuis ${0}.." removal: "Suppression des données de Plan depuis ${0}."
serverUninstalled: "§aSi le serveur est toujours installé, il se définira automatiquement comme dans la base de données." serverUninstalled: "§aSi le serveur est toujours installé, il se définira automatiquement comme dans la base de données."
unregister: "Désenregistrement de '${0}'.." unregister: "Désenregistrement de '${0}'."
warnDbNotOpen: "§eLa base de données est : ${0} - Cela pourrait prendre plus de temps que prévu..." warnDbNotOpen: "§eLa base de données est : ${0} - Cela pourrait prendre plus de temps que prévu."
write: "Écriture à ${0}.." write: "Écriture à ${0}."
fail: fail:
emptyString: "La chaîne de recherche ne peut pas être vide" emptyString: "La chaîne de recherche ne peut pas être vide"
invalidArguments: "Accepte les éléments suivants comme ${0} : ${1}" invalidArguments: "Accepte les éléments suivants comme ${0} : ${1}"
@ -172,7 +172,7 @@ command:
description: "Déconnecter les autres utilisateurs du panel" description: "Déconnecter les autres utilisateurs du panel"
inDepth: "Donnez un nom d'utilisateur à déconnecter du panel, donnez * comme argument pour déconnecter tout le monde." inDepth: "Donnez un nom d'utilisateur à déconnecter du panel, donnez * comme argument pour déconnecter tout le monde."
migrateToOnlineUuids: migrateToOnlineUuids:
description: "Migrate offline uuid data to online uuids" description: "Migrer les données des uuid hors ligne vers les uuids en ligne"
network: network:
description: "Visualiser la page du réseau" description: "Visualiser la page du réseau"
inDepth: "Obtient un lien vers la page /network, uniquement sur les réseaux." inDepth: "Obtient un lien vers la page /network, uniquement sur les réseaux."
@ -189,7 +189,7 @@ command:
description: "Recharger Plan" description: "Recharger Plan"
inDepth: "Désactive et active le plugin pour recharger tout changement dans la configuration." inDepth: "Désactive et active le plugin pour recharger tout changement dans la configuration."
removejoinaddresses: removejoinaddresses:
description: "Remove join addresses of a specified server" description: "Supprimer les adresses de connexion d'un serveur spécifié"
search: search:
description: "Rechercher un joueur" description: "Rechercher un joueur"
inDepth: "Liste tous les noms de joueurs correspondant à une partie donnée d'un nom." inDepth: "Liste tous les noms de joueurs correspondant à une partie donnée d'un nom."
@ -200,8 +200,8 @@ command:
description: "Obtenir la liste des serveurs dans la base de données" description: "Obtenir la liste des serveurs dans la base de données"
inDepth: "Liste les ids, noms et uuids des serveurs de la base de données." inDepth: "Liste les ids, noms et uuids des serveurs de la base de données."
setgroup: setgroup:
description: "Change users web permission group." description: "Changer le groupe de permissions des utilisateur du site web."
inDepth: "Allows you to change a users web permission group to an existing web group. Use /plan groups for list of available groups." inDepth: "Permet de changer un groupe de permissions web d'un utilisateur par un groupe web existant. Utilisez /plan groups pour obtenir la liste des groupes disponibles."
unregister: unregister:
description: "Désenregistrer un utilisateur du site de Plan" description: "Désenregistrer un utilisateur du site de Plan"
inDepth: "Utilisez sans argument pour désenregistrer un utilisateur lié à un joueur, ou avec un nom d'utilisateur pour désenregistrer un autre utilisateur." inDepth: "Utilisez sans argument pour désenregistrer un utilisateur lié à un joueur, ou avec un nom d'utilisateur pour désenregistrer un autre utilisateur."
@ -248,17 +248,17 @@ html:
unique: "Unique :" unique: "Unique :"
description: description:
newPlayerRetention: "Cette valeur est une prédiction basée sur les joueurs précédents." newPlayerRetention: "Cette valeur est une prédiction basée sur les joueurs précédents."
noData24h: "Server has not sent data for over 24 hours." noData24h: "Le serveur n'a pas envoyé de données depuis plus de 24 heures."
noData30d: "Server has not sent data for over 30 days." noData30d: "Le serveur n'a pas envoyé de données depuis plus de 30 jours."
noData7d: "Server has not sent data for over 7 days." noData7d: "Le serveur n'a pas envoyé de données depuis plus de 7 jours."
noGameServers: "Certaines données nécessitent l'installation de Plan sur les serveurs de jeu." noGameServers: "Certaines données nécessitent l'installation de Plan sur les serveurs de jeu."
noGeolocations: "La collecte de la géolocalisation doit être activée dans la configuration (Accepter l'EULA de GeoLite2)." noGeolocations: "La collecte de la géolocalisation doit être activée dans la configuration (Accepter l'EULA de GeoLite2)."
noServerOnlinActivity: "Aucun serveur pour afficher l'activité en ligne." noServerOnlinActivity: "Aucun serveur pour afficher l'activité en ligne."
noServers: "Il n'y a pas de serveur dans la base de données." noServers: "Il n'y a pas de serveur dans la base de données."
noServersLong: 'Il semblerait que Plan ne soit installé sur aucun des serveurs de jeu ou qu'il ne soit pas connecté à la même base de données. Voir <a href="https://github.com/plan-player-analytics/Plan/wiki">wiki</a> pour un tutoriel sur la mise en place d'un Réseau.' noServersLong: 'Il semblerait que Plan ne soit installé sur aucun des serveurs de jeu ou qu''il ne soit pas connecté à la même base de données. Voir <a href="https://github.com/plan-player-analytics/Plan/wiki">wiki</a> pour un tutoriel sur la mise en place d''un Réseau.'
noSpongeChunks: "Chunks indisponibles sur Sponge" noSpongeChunks: "Chunks indisponibles sur Sponge"
noUptimeCalculation: "Server is offline, or has never restarted with Plan installed." noUptimeCalculation: "Le serveur est hors ligne ou n'a jamais redémarré avec Plan installé."
performanceNoGameServers: "TPS, Entity or Chunk data is not gathered from proxy servers since they don't have game tick loop." performanceNoGameServers: "Les données TPS, Entité ou Chunk ne sont pas collectées à partir des serveurs proxy car ils n'ont pas de boucle de tick de jeu."
predictedNewPlayerRetention: "Cette valeur est une prédiction basée sur les anciennes données du joueur." predictedNewPlayerRetention: "Cette valeur est une prédiction basée sur les anciennes données du joueur."
error: error:
401Unauthorized: "Non autorisé." 401Unauthorized: "Non autorisé."
@ -275,165 +275,175 @@ html:
groupNotFound: "Web Permission Group does not exist" groupNotFound: "Web Permission Group does not exist"
loginFailed: "L'utilisateur et le mot de passe ne correspondent pas" loginFailed: "L'utilisateur et le mot de passe ne correspondent pas"
noCookie: "Cookie de l'utilisateur non présent" noCookie: "Cookie de l'utilisateur non présent"
noPermissionGroup: "Registration failed, player did not have any 'plan.webgroup.{name}' permission" noPermissionGroup: "L'enregistrement a échoué, le joueur n'avait pas la permission 'plan.webgroup.{name}'"
registrationFailed: "Enregistrement échoué, veuillez réessayer (Le code expire au bout de 15 minutes)" registrationFailed: "Enregistrement échoué, veuillez réessayer (Le code expire au bout de 15 minutes)"
userNotFound: "Cet utilisateur n'existe pas" userNotFound: "Cet utilisateur n'existe pas"
authFailed: "Authentification échouée." authFailed: "Authentification échouée."
authFailedTips: "- Assurez-vous d'avoir enregistré un utilisateur avec :<b>'/plan register'.</b><br>- Vérifiez que le nom d'utilisateur et le mot de passe soient corrects.<br>- Le nom d'utilisateur et le mot de passe sont sensibles au format majuscule/minuscule.<br><br>Si vous avez oublié votre mot de passe, demandez à un membre du staff de supprimer votre ancien utilisateur puis de vous réinscrire." authFailedTips: "- Assurez-vous d'avoir enregistré un utilisateur avec :<b>'/plan register'.</b><br>- Vérifiez que le nom d'utilisateur et le mot de passe soient corrects.<br>- Le nom d'utilisateur et le mot de passe sont sensibles au format majuscule/minuscule.<br><br>Si vous avez oublié votre mot de passe, demandez à un membre du staff de supprimer votre ancien utilisateur puis de vous réinscrire."
noServersOnline: "Aucun serveur en ligne pour exécuter la demande." noServersOnline: "Aucun serveur en ligne pour exécuter la demande."
playerNotSeen: "Cet utilisateur ne s'est jamais connecté sur ce serveur." playerNotSeen: "Cet utilisateur ne s'est jamais connecté sur ce serveur."
serverNotExported: "Server doesn't exist, its data might not have been exported yet." serverNotExported: "Le serveur n'existe pas, ses données n'ont peut-être pas encore été exportées."
serverNotSeen: "Server doesn't exist" serverNotSeen: "Le serveur n'existe pas"
generic: generic:
none: "Vide" none: "Vide"
label: label:
active: "Actif" active: "Actif"
activePlaytime: "Temps Actif" activePlaytime: "Temps Actif"
activityIndex: "Indice d'Activité" activityIndex: "Indice d'Activité"
addJoinAddressGroup: "Ajouter un groupe d'adresses"
addressGroup: "Groupe d'adresses {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "Temps AFK" afkTime: "Temps AFK"
all: "Tout" all: "Tout"
allTime: "Tout le Temps" allTime: "Tout le Temps"
alphabetical: "Alphabetical" allowed: "Autorisé"
apply: "Apply" allowlist: "Liste d'autorisés"
allowlistBounces: "Rebonds de la liste d'autorisés"
alphabetical: "Alphabétique"
apply: "Appliquer"
asNumbers: "en Chiffres" asNumbers: "en Chiffres"
average: "Average first session length" attempts: "Tentatives"
average: "Durée moyenne de la première session"
averageActivePlaytime: "Temps Actif moyen" averageActivePlaytime: "Temps Actif moyen"
averageAfkTime: "Temps AFK moyen" averageAfkTime: "Temps AFK moyen"
averageChunks: "Quantité moyenne de Chunks" averageChunks: "Quantité moyenne de Chunks"
averageCpuUsage: "Average CPU Usage" averageCpuUsage: "Utilisation moyenne du CPU"
averageEntities: "Quantité moyenne d'Entités" averageEntities: "Quantité moyenne d'Entités"
averageKdr: "Ratio - Kills / Morts - moyen" averageKdr: "Ratio - Kills / Morts - moyen"
averageMobKdr: "Ratio - Kills / Morts - de Mobs moyen" averageMobKdr: "Ratio - Kills / Morts - de Mobs moyen"
averagePing: "Latence moyenne" averagePing: "Latence moyenne"
averagePlayers: "Average Players" averagePlayers: "Moyenne des joueurs"
averagePlaytime: "Temps de Jeu moyen" averagePlaytime: "Temps de Jeu moyen"
averageRamUsage: "Average RAM Usage" averageRamUsage: "Utilisation moyenne de la RAM"
averageServerDowntime: "Average Downtime / Server" averageServerDowntime: "Temps d'arrêt moyen par serveur"
averageSessionLength: "Durée moyenne d'une Session" averageSessionLength: "Durée moyenne d'une Session"
averageSessions: "Quantité moyenne de Sessions" averageSessions: "Quantité moyenne de Sessions"
averageTps: "TPS moyen" averageTps: "TPS moyen"
averageTps7days: "Average TPS (7 days)" averageTps7days: "TPS moyen (7 days)"
banned: "Banni(e)" banned: "Banni(e)"
bestPeak: "Pic maximal de Joueurs en Ligne" bestPeak: "Pic maximal de Joueurs en Ligne"
bestPing: "Meilleure Latence" bestPing: "Meilleure Latence"
blocked: "Bloqué"
calendar: " Calendrier" calendar: " Calendrier"
comparing7days: "Comparaison des 7 derniers Jours" comparing7days: "Comparaison des 7 derniers Jours"
connectionInfo: "Renseignements sur la Connexion" connectionInfo: "Renseignements sur la Connexion"
country: "Pays" country: "Pays"
cpu: "CPU" cpu: "CPU"
cpuRam: "CPU & RAM" cpuRam: "CPU & RAM"
cpuUsage: "CPU Usage" cpuUsage: "Utilisation du CPU"
currentPlayerbase: "Base de Joueurs actuelle" currentPlayerbase: "Base de Joueurs actuelle"
currentUptime: "Current Uptime" currentUptime: "Période d'activité actuelle"
currentlyInstalledPlugins: "Currently Installed Plugins" currentlyInstalledPlugins: "Plugins actuellement installés"
dayByDay: "Jour par Jour" dayByDay: "Jour par Jour"
dayOfweek: "Jour de la Semaine" dayOfweek: "Jour de la Semaine"
deadliestWeapon: "1ère Arme de Combat (la plus mortelle)" deadliestWeapon: "1ère Arme de Combat (la plus mortelle)"
deaths: "Morts" deaths: "Morts"
disk: "Espace Disque" disk: "Espace Disque"
diskSpace: "Espace Disque disponible" diskSpace: "Espace Disque disponible"
docs: "Swagger Docs" docs: "Docs Swagger"
downtime: "Temps Hors-Ligne" downtime: "Temps Hors-Ligne"
duringLowTps: "Pendant les pics de TPS bas :" duringLowTps: "Pendant les pics de TPS bas :"
entities: "Entités" entities: "Entités"
errors: "Plan Error Logs" errors: "Journaux d'erreurs de Plan"
export: "Export" export: "Exportation"
exported: "Data export time" exported: "Temps d'exportation des données"
favoriteServer: "Serveur Favori" favoriteServer: "Serveur Favori"
firstSession: "Première session" firstSession: "Première session"
firstSessionLength: firstSessionLength:
average: "Average first session length" average: "Durée moyenne de la première session"
median: "Median first session length" median: "Durée médiane de la première session"
geoProjection: geoProjection:
dropdown: "Select projection" dropdown: "Sélectionner la projection"
equalEarth: "Equal Earth" equalEarth: "Equal Earth"
mercator: "Mercator" mercator: "Mercator"
miller: "Miller" miller: "Miller"
ortographic: "Ortographic" ortographic: "Ortographique"
geolocations: "Géolocalisation" geolocations: "Géolocalisation"
groupPermissions: "Manage Groups" groupPermissions: "Gérer les groupes"
groupUsers: "Manage Group Users" groupUsers: "Gérer les utilisateurs d'un groupe"
help: help:
activityIndexBasis: "Activity index is based on non-AFK playtime in the past 3 weeks (21 days). Each week is considered separately." activityIndexBasis: "L'indice d'activité est basé sur le temps de jeu non-AFK au cours des 3 dernières semaines (21 jours). Chaque semaine est considérée séparément."
activityIndexExample1: "If someone plays as much as threshold every week, they are given activity index ~3." activityIndexExample1: "Si une personne joue autant que le seuil fixé chaque semaine, elle se voit attribuer un indice d'activité de ~3."
activityIndexExample2: "Very active is ~2x the threshold (y ≥ 3.75)." activityIndexExample2: "Très actif est ~2x le seuil (y ≥ 3,75)."
activityIndexExample3: "The index approaches 5 indefinitely." activityIndexExample3: "L'indice se rapproche indéfiniment de 5."
activityIndexVisual: "Here is a visualization of the curve where y = activity index, and x = playtime per week / threshold." activityIndexVisual: "Voici une visualisation de la courbe où y = indice d'activité, et x = temps de jeu par semaine / seuil."
activityIndexWeek: "Week {}" activityIndexWeek: "Semaine {}"
examples: "Examples" examples: "Exemples"
graph: graph:
labels: "You can hide/show a group by clicking on the label at the bottom." labels: "Vous pouvez masquer/afficher un groupe en cliquant sur l'étiquette en bas de page."
title: "Graph" title: "Graphique"
zoom: "You can Zoom in by click + dragging on the graph." zoom: "Vous pouvez zoomer en cliquant sur le graphique et en le faisant glisser."
manage: manage:
groups: groups:
line-1: "This view allows you to modify web group permissions." line-1: "Cette vue vous permet de modifier les autorisations des groupes web."
line-10: "<1>{{permission}}</> permissions determine what parts of the page are visible. These permissions also limit requests to the related data endpoints." line-10: "<1>{{permission}}</> déterminent quelles parties de la page sont visibles. Ces autorisations limitent également les requêtes vers les points d'accès aux données connexes."
line-11: "<1>{{permission1}}</1> permissions are not required for data: <2>{{permission2}}</2> allows request to /v1/network/overview even without <3>{{permission3}}</3>." line-11: "<1>{{permission1}}</1> ne sont pas nécessaires pour les données: <2>{{permission2}}</2> permet de faire une requête à /v1/network/overview même sans <3>{{permission3}}</3>."
line-12: "Saving changes" line-12: "Sauvegarder les modifications"
line-13: "When you add a group or delete a group that action is saved immediately after confirm (no undo)." line-13: "Lorsque vous ajoutez ou supprimez un groupe, l'action est sauvegardée immédiatement après confirmation (pas d'annulation)."
line-14: "When you modify permissions those changes need to be saved by pressing the Save-button" line-14: "Lorsque vous modifiez les autorisations, ces changements doivent être enregistrés en cliquant sur le bouton Enregistrer."
line-15: "Documentation can be found from <1>{{link}}</1>" line-15: "La documentation est disponible à l'adresse suivante <1>{{link}}</1>"
line-2: "User's web group is determined during <1>{{command}}</1> by checking if Player has <2>{{permission}}</2> permission." line-2: "Le groupe web de l'utilisateur est déterminé pendant <1>{{command}}</1> en vérifiant si le joueur a la permission <2>{{permission}}</2>."
line-3: "You can use <1>{{command}}</1> to change permission group after registering." line-3: "Vous pouvez utiliser <1>{{command}}</1> pour changer de groupe d'autorisation après l'enregistrement."
line-4: "<1>{{icon}}</1> If you ever accidentally delete all groups with <2>{{permission}}</2> permission just <3>{{command}}</3>." line-4: "<1>{{icon}}</1> Si vous supprimez accidentellement tous les groupes avec la permission <2>{{permission}}</2> utilisez juste <3>{{command}}</3>."
line-5: "Permission inheritance" line-5: "Héritage de permissions"
line-6: "Permissions follow inheritance model, where higher level permission grants all lower ones, eg. <1>{{permission1}}</1> also gives <2>{{permission2}}</2>, etc." line-6: "Les autorisations suivent le modèle de l'héritage, où l'autorisation de niveau supérieur accorde toutes les autorisations de niveau inférieur, par exemple. <1>{{permission1}}</1> donne également <2>{{permission2}}</2>, etc."
line-7: "Access vs Page -permissions" line-7: "Accès vs. Permissions d'accès aux pages"
line-8: "You need to assign both access and page permissions for users." line-8: "Vous devez attribuer des droits d'accès et des droits de page aux utilisateurs."
line-9: "<1>{{permission1}}</1> permissions allow user make the request to specific address, eg. <2>{{permission2}}</2> allows request to /network." line-9: "<1>{{permission1}}</1> les autorisations permettent à l'utilisateur d'adresser une demande à une adresse spécifique, par exemple. <2>{{permission2}}</2> permet de faire une requête à /network."
playtimeUnit: "hours" playtimeUnit: "heures"
retention: retention:
calculationStep1: "First the data is filtered using '<>' option. Any players with 'registerDate' outside the time range are ignored." calculationStep1: "Les données sont d'abord filtrées à l'aide de l'option '<>'. Tous les joueurs avec 'registerDate' en dehors de l'intervalle de temps sont ignorés."
calculationStep2: "Then it is grouped into groups of players using '<0>' option, eg. With '<1>': All players who registered in January 2023, February 2023, etc" calculationStep2: "Il est ensuite réparti en groupes de joueurs à l'aide de l'option '<0>', par exemple. Avec '<1>': Tous les joueurs qui se sont inscrits en janvier 2023, février 2023, etc."
calculationStep3: "Then the '<0>' and '<1>' options select which visualization to render." calculationStep3: "Les options '<0>' et '<1>' permettent ensuite de sélectionner la visualisation à restituer."
calculationStep4: "'<>' controls how many points the graph has, eg. 'Days' has one point per day." calculationStep4: "'<>' détermine le nombre de points du graphique, par exemple 'Jours' correspond à un point par jour."
calculationStep5: "On each calculated point all players are checked for the condition." calculationStep5: "A chaque point calculé, tous les joueurs sont contrôlés pour la condition."
calculationStep6: "Select X Axis below to see conditions." calculationStep6: "Sélectionnez l'axe X ci-dessous pour voir les conditions."
calculationStepDate: "This visualization shows the different groups of players that are still playing on your server. The visualization uses lastSeen date. If x < lastSeenDate, the player is visible on the graph." calculationStepDate: "Cette visualisation montre les différents groupes de joueurs qui jouent encore sur votre serveur. La visualisation utilise la date lastSeen. Si x < lastSeenDate, le joueur est visible sur le graphique."
calculationStepDeltas: "This visualization is most effective using Player Count as the Y Axis. The visualization shows net gain of players (How many players joined minus players who stopped playing). The visualization uses both registered and lastSeen dates. If registerDate < x < lastSeenDate, the player is visible on the graph." calculationStepDeltas: "Cette visualisation est plus efficace si l'on utilise le nombre de joueurs comme axe des ordonnées. La visualisation montre le gain net de joueurs (combien de joueurs se sont inscrits moins les joueurs qui ont arrêté de jouer). La visualisation utilise les dates d'inscription et de dernière visite. Si registerDate < x < lastSeenDate, le joueur est visible sur le graphique."
calculationStepPlaytime: "This visualization tells how long the gameplay loop keeps players engaged on your server. The visualization uses playtime. If x < playtime, the player is visible on the graph." calculationStepPlaytime: "Cette visualisation indique combien de temps la boucle de gameplay maintient l'attention des joueurs sur votre serveur. La visualisation utilise le temps de jeu. Si x < temps de jeu, le joueur est visible sur le graphique."
calculationStepTime: "This visualization tells how long people keep coming back to play on the server after they join the first time. The visualization uses timeDifference. If x < timeDifference, the player is visible on the graph." calculationStepTime: "Cette visualisation indique combien de temps les gens reviennent jouer sur le serveur après leur première inscription. La visualisation utilise timeDifference. Si x < timeDifference, le joueur est visible sur le graphique."
compareJoinAddress: "Grouping by join address allows measuring advertising campaigns on different sites." compareJoinAddress: "Le regroupement par adresse de jointure permet de mesurer les campagnes publicitaires sur différents sites."
compareMonths: "You can compare different months by changing the '<0>' option to '<1>'" compareMonths: "Vous pouvez comparer plusieurs mois en remplaçant l'option '<0>' par '<1>'"
examples: examples:
adCampaign: "Comparing player gain of different ad campaigns using different Join Addresses (anonymized)" adCampaign: "Comparaison des gains de joueurs de différentes campagnes publicitaires utilisant différentes adresses de jointure (anonymisées)"
deltas: "<> shows net gain of players." deltas: "<> indique le gain net de joueurs."
pattern: "A general pattern emerges when all players start leaving the server at the same time" pattern: "Un schéma général se dessine lorsque tous les joueurs commencent à quitter le serveur en même temps"
plateau: "Comparing player gain of different months. Plateaus suggest there were players Plan doesn't know about. In this example Plan was installed in January 2022." plateau: "Comparaison des gains de joueurs au cours des différents mois. Les plateaux suggèrent qu'il y a des joueurs dont Plan n'a pas connaissance. Dans cet exemple, Plan a été installé en janvier 2022."
playtime: "Playtime tells how long the gameplay loop keeps players engaged on your server." playtime: "Le temps de jeu indique combien de temps la boucle de gameplay maintient l'attention des joueurs sur votre serveur."
stack: "Cumulative player gain can be checked with stacked player count as Y axis" stack: "Le gain cumulatif de joueurs peut être vérifié en utilisant le nombre de joueurs empilés comme axe Y."
howIsItCalculated: "How it is calculated" howIsItCalculated: "Mode de calcul"
howIsItCalculatedData: "The graph is generated from player data:" howIsItCalculatedData: "Le graphique est généré à partir des données des joueurs:"
options: "Select the options to analyze different aspects of Player Retention." options: "Sélectionnez les options pour analyser les différents aspects de la fidélisation des joueurs."
retentionBasis: "New player retention is calculated based on session data. If a registered player has played within latter half of the timespan, they are considered retained." retentionBasis: "La fidélisation des nouveaux joueurs est calculée sur la base des données de session. Si un joueur enregistré a joué dans la seconde moitié de la période, il est considéré comme fidélisé."
testPrompt: "Test it out:" testPrompt: "Testez-le:"
testResult: "Test result" testResult: "Résultat du test"
threshold: "Threshold" threshold: "Seuil"
thresholdUnit: "hours / week" thresholdUnit: "heures / semaine"
tips: "Tips" tips: "Conseils"
usingTheGraph: "Using the Graph" usingTheGraph: "Utilisation du graphique"
hourByHour: "Heure par Heure" hourByHour: "Heure par Heure"
inactive: "Inactif(ve)" inactive: "Inactif(ve)"
indexInactive: "Inactif" indexInactive: "Inactif"
indexRegular: "Régulier" indexRegular: "Régulier"
information: "INFORMATIONS" information: "INFORMATIONS"
insights: "Insights" insights: "Perspectives"
insights30days: "Perspectives sur 30 jours" insights30days: "Perspectives sur 30 jours"
installed: "Installed" installed: "Installé"
irregular: "Irrégulier" irregular: "Irrégulier"
joinAddress: "Join Address" joinAddress: "Adresse de Connexion"
joinAddresses: "Adresses de Connexion" joinAddresses: "Adresses de Connexion"
kdr: "KDR" kdr: "KDR"
killed: "Tué(e)" killed: "Tué(e)"
last24hours: "24 Dernières heures" last24hours: "24 Dernières heures"
last30days: "30 Derniers jours" last30days: "30 Derniers jours"
last7days: "7 Derniers jours" last7days: "7 Derniers jours"
lastConnected: "Dernier Connecté" lastAllowed: "Dernier autorisé"
lastBlocked: "Dernier bloqué"
lastConnected: "Dernier connecté"
lastKnownAttempt: "Dernière tentative connue"
lastPeak: "Dernier pic de Joueurs en Ligne" lastPeak: "Dernier pic de Joueurs en Ligne"
lastSeen: "Dernière Connexion" lastSeen: "Dernière Connexion"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Dernières adresses d'adhésion"
length: " Longueur" length: " Longueur"
links: "LIENS" links: "LIENS"
loadedChunks: "Chunks Chargés" loadedChunks: "Chunks Chargés"
@ -442,53 +452,53 @@ html:
loneNewbieJoins: "Connexions de Débutants Seuls" loneNewbieJoins: "Connexions de Débutants Seuls"
longestSession: "Session la plus Longue" longestSession: "Session la plus Longue"
lowTpsSpikes: "Pics de TPS bas" lowTpsSpikes: "Pics de TPS bas"
lowTpsSpikes7days: "Low TPS Spikes (7 days)" lowTpsSpikes7days: "Pics de TPS bas (7 jours)"
manage: "Manage" manage: "Gérer"
managePage: managePage:
addGroup: addGroup:
header: "Add group" header: "Ajouter un groupe"
invalidName: "Group name can be 100 characters maximum." invalidName: "Le nom du groupe peut comporter 100 caractères au maximum."
name: "Name of the group" name: "Nom du groupe"
alert: alert:
groupAddFail: "Failed to add group: {{error}}" groupAddFail: "Échec de l'ajout d'un groupe: {{error}}"
groupAddSuccess: "Added group '{{groupName}}'" groupAddSuccess: "Groupe ajouté '{{groupName}}'"
groupDeleteFail: "Failed to delete group: {{error}}" groupDeleteFail: "Échec de la suppression du groupe: {{error}}"
groupDeleteSuccess: "Deleted group '{{groupName}}'" groupDeleteSuccess: "Groupe supprimé '{{groupName}}'"
saveFail: "Failed to save changes: {{error}}" saveFail: "Échec de l'enregistrement des modifications: {{error}}"
saveSuccess: "Changes saved successfully!" saveSuccess: "Les modifications ont été enregistrées avec succès!"
changes: changes:
discard: "Discard Changes" discard: "Rejeter les modifications"
save: "Save" save: "Sauvegarder"
unsaved: "Unsaved changes" unsaved: "Modifications non sauvegardées"
deleteGroup: deleteGroup:
confirm: "Confirm & Delete {{groupName}}" confirm: "Confirmer et supprimer {{groupName}}"
confirmDescription: "This will move all users of '{{groupName}}' to group '{{moveTo}}'. There is no undo!" confirmDescription: "Cette action déplacera tous les utilisateurs de '{{nomdugroupe}}' vers le groupe '{{moveTo}}'. Il n'y a pas d'annulation possible !"
header: "Delete '{{groupName}}'" header: "Supprimer '{{groupName}}'"
moveToSelect: "Move remaining users to group" moveToSelect: "Déplacer les utilisateurs restants vers le groupe"
groupHeader: "Manage Group Permissions" groupHeader: "Gérer les permissions du groupe"
groupPermissions: "Permissions of {{groupName}}" groupPermissions: "Permissions de {{groupName}}"
maxFreeDisk: "Espace Disque MAX disponible" maxFreeDisk: "Espace Disque MAX disponible"
medianSessionLength: "Median Session Length" medianSessionLength: "Durée médiane de la session"
minFreeDisk: "Espace Disque MIN disponible" minFreeDisk: "Espace Disque MIN disponible"
mobDeaths: "Morts causées par un Mob" mobDeaths: "Morts causées par un Mob"
mobKdr: "Ratio - Kills / Morts de Mobs -" mobKdr: "Ratio - Kills / Morts de Mobs -"
mobKills: "Kills de Mobs" mobKills: "Mobs Tués"
modified: "Modified" modified: "Modifié"
mostActiveGamemode: "Mode de Jeu le plus utilisé" mostActiveGamemode: "Mode de Jeu le plus utilisé"
mostPlayedWorld: "Monde le plus Fréquenté" mostPlayedWorld: "Monde le plus Fréquenté"
name: "Nom" name: "Nom"
network: "Réseau" network: "Réseau"
networkAsNumbers: "Réseau en Chiffres" networkAsNumbers: "Réseau en Chiffres"
networkCalendar: "Network Calendar" networkCalendar: "Calendrier du réseau"
networkOnlineActivity: "Activité en Ligne du Réseau" networkOnlineActivity: "Activité en Ligne du Réseau"
networkOverview: "Aperçu du Réseau" networkOverview: "Aperçu du Réseau"
networkPage: "Page du Réseau" networkPage: "Page du Réseau"
new: "Nouveau(elle)" new: "Nouveau(elle)"
newPlayerRetention: "Rétention des nouveaux Joueurs" newPlayerRetention: "Rétention des nouveaux Joueurs"
newPlayers: "Nouveaux Joueurs" newPlayers: "Nouveaux Joueurs"
newPlayers7days: "New Players (7 days)" newPlayers7days: "Nouveaux joueurs (7 jours)"
nickname: "Surnom" nickname: "Surnom"
noDataToDisplay: "No Data to Display" noDataToDisplay: "Pas de données à afficher"
now: "Maintenant" now: "Maintenant"
onlineActivity: "Activité en ligne" onlineActivity: "Activité en ligne"
onlineActivityAsNumbers: "Activité en ligne en Chiffres" onlineActivityAsNumbers: "Activité en ligne en Chiffres"
@ -504,23 +514,23 @@ html:
player: "Joueur" player: "Joueur"
playerDeaths: "Décès causés par le Joueur" playerDeaths: "Décès causés par le Joueur"
playerKills: "Kills de Joueurs" playerKills: "Kills de Joueurs"
playerKillsVictimIndicator: "Player was killed within 24h of first time they were seen (Time since registered: <>)." playerKillsVictimIndicator: "Le joueur a été tué dans les 24 heures suivant sa première apparition (Temps écoulé depuis l'enregistrement : <>)."
playerList: "Liste des Joueurs" playerList: "Liste des Joueurs"
playerOverview: "Aperçu des Joueurs" playerOverview: "Aperçu des Joueurs"
playerPage: "Page du Joueur" playerPage: "Page du Joueur"
playerRetention: "Player Retention" playerRetention: "Fidélisation des joueurs"
playerbase: "Base de Joueurs" playerbase: "Base de Joueurs"
playerbaseDevelopment: "Évolution de la base de Joueurs" playerbaseDevelopment: "Évolution de la base de Joueurs"
playerbaseOverview: "Playerbase Overview" playerbaseOverview: "Aperçu de la base de joueurs"
players: "Joueurs" players: "Joueurs"
playersOnline: "Joueurs en Ligne" playersOnline: "Joueurs en Ligne"
playersOnlineNow: "Players Online (Now)" playersOnlineNow: "Joueurs en ligne (maintenant)"
playersOnlineOverview: "Aperçu de l'Activité en Ligne" playersOnlineOverview: "Aperçu de l'Activité en Ligne"
playtime: "Temps de Jeu" playtime: "Temps de Jeu"
pluginHistory: "Plugin History" pluginHistory: "Historique des plugins"
pluginVersionHistory: "Plugin Version History" pluginVersionHistory: "Historique de la version du plugin"
plugins: "Plugins" plugins: "Plugins"
pluginsOverview: "Plugins Overview" pluginsOverview: "Aperçu des plugins"
punchcard: "Carte Perforée" punchcard: "Carte Perforée"
punchcard30days: "Carte perforée sur 30 jours" punchcard30days: "Carte perforée sur 30 jours"
pvpPve: "PvP & PvE" pvpPve: "PvP & PvE"
@ -539,19 +549,19 @@ html:
regularPlayers: "Joueurs Réguliers" regularPlayers: "Joueurs Réguliers"
relativeJoinActivity: "Activité de Connexion relative" relativeJoinActivity: "Activité de Connexion relative"
retention: retention:
groupByNone: "No grouping" groupByNone: "Pas de regroupement"
groupByTime: "Group registered by" groupByTime: "Groupe enregistré par"
inAnytime: "any time" inAnytime: "à tout moment"
inLast180d: "in the last 6 months" inLast180d: "au cours des 6 derniers mois"
inLast30d: "in the last 30 days" inLast30d: "au cours des 30 derniers jours"
inLast365d: "in the last 12 months" inLast365d: "au cours des 12 derniers mois"
inLast730d: "in the last 24 months" inLast730d: "au cours des 24 derniers mois"
inLast7d: "in the last 7 days" inLast7d: "au cours des 7 derniers jours"
inLast90d: "in the last 3 months" inLast90d: "au cours des 3 derniers mois"
playersRegisteredInTime: "Players who registered" playersRegisteredInTime: "Joueurs inscrits"
retainedPlayersPercentage: "Retained Players %" retainedPlayersPercentage: "Joueurs retenus %"
timeSinceRegistered: "Time since register date" timeSinceRegistered: "Temps écoulé depuis la date d'enregistrement"
timeStep: "Time step" timeStep: "Pas de temps"
secondDeadliestWeapon: "2ᵉ Arme de Combat" secondDeadliestWeapon: "2ᵉ Arme de Combat"
seenNicknames: "Surnoms vus" seenNicknames: "Surnoms vus"
server: "Serveur" server: "Serveur"
@ -574,26 +584,26 @@ html:
sessionMedian: "Session Médiane" sessionMedian: "Session Médiane"
sessionStart: "Début de la Session" sessionStart: "Début de la Session"
sessions: "Sessions" sessions: "Sessions"
sortBy: "Sort By" sortBy: "Trier par"
stacked: "Stacked" stacked: "Empilés"
table: table:
showNofM: "Showing {{n}} of {{m}} entries" showNofM: "Afficher {{n}} de {{m}} entrées"
showPerPage: "Show per page" showPerPage: "Afficher par page"
visibleColumns: "Visible columns" visibleColumns: "Colonnes visibles"
themeSelect: "Sélection du Thème" themeSelect: "Sélection du Thème"
thirdDeadliestWeapon: "3ᵉ Arme de Combat" thirdDeadliestWeapon: "3ᵉ Arme de Combat"
thirtyDays: "30 jours" thirtyDays: "30 jours"
thirtyDaysAgo: "Il y a 30 jours" thirtyDaysAgo: "Il y a 30 jours"
time: time:
date: "Date" date: "Date"
day: "Day" day: "Jour"
days: "Days" days: "Jours"
hours: "Hours" hours: "Heures"
month: "Month" month: "Mois"
months: "Months" months: "Mois"
week: "Week" week: "Semaine"
weeks: "Weeks" weeks: "Seamines"
year: "Year" year: "Année"
timesKicked: "Nombre d'Éjections" timesKicked: "Nombre d'Éjections"
toMainPage: "Retour à la page principale" toMainPage: "Retour à la page principale"
total: "Total" total: "Total"
@ -602,17 +612,17 @@ html:
totalPlayers: "Joueurs Totaux" totalPlayers: "Joueurs Totaux"
totalPlayersOld: "Joueurs Totaux" totalPlayersOld: "Joueurs Totaux"
totalPlaytime: "Temps de Jeu Total" totalPlaytime: "Temps de Jeu Total"
totalServerDowntime: "Total Server Downtime" totalServerDowntime: "Temps d'arrêt total du serveur"
tps: "TPS" tps: "TPS"
trend: "Tendances" trend: "Tendances"
trends30days: "Tendances sur 30 Jours" trends30days: "Tendances sur 30 Jours"
uninstalled: "Uninstalled" uninstalled: "Désinstallé"
uniquePlayers: "Joueurs Uniques" uniquePlayers: "Joueurs Uniques"
uniquePlayers7days: "Unique Players (7 days)" uniquePlayers7days: "Joueurs uniques (7 jours)"
unit: unit:
percentage: "Percentage" percentage: "Pourcentage"
playerCount: "Player Count" playerCount: "Nombre de joueurs"
users: "Manage Users" users: "Gérer les utilisateurs"
version: "Version" version: "Version"
veryActive: "Très Actif" veryActive: "Très Actif"
weekComparison: "Comparaison Hebdomadaire" weekComparison: "Comparaison Hebdomadaire"
@ -637,89 +647,88 @@ html:
manage: manage:
permission: permission:
description: description:
access: "Controls access to pages" access: "Contrôle de l'accès aux pages"
access_docs: "Allows accessing /docs page" access_docs: "Permet d'accéder à la page /docs"
access_errors: "Allows accessing /errors page" access_errors: "Permet d'accéder à la page /erreurs"
access_network: "Allows accessing /network page" access_network: "Permet d'accéder à la page /réseau"
access_player: "Allows accessing any /player pages" access_player: "Permet d'accéder à toutes les pages /player"
access_player_self: "Allows accessing own /player page" access_player_self: "Permet d'accéder à sa propre page /joueur"
access_players: "Allows accessing /players page" access_players: "Permet d'accéder à la page /joueurs"
access_query: "Allows accessing /query and Query results pages" access_query: "Permet d'accéder aux pages /query et Query results"
access_raw_player_data: "Allows accessing /player/{uuid}/raw json data. Follows 'access.player' permissions." access_raw_player_data: "Permet d'accéder aux données json brutes de /player/{uuid}. Suit les permissions 'access.player'."
access_server: "Allows accessing all /server pages" access_server: "Permet d'accéder à toutes les pages /server"
manage_groups: "Allows modifying group permissions & Access to /manage/groups page" manage_groups: "Permet de modifier les permissions des groupes et d'accéder à la page /manage/groups"
manage_users: "Allows modifying what users belong to what group" manage_users: "Permet de modifier quels utilisateurs appartiennent à quel groupe"
page: "Controls what is visible on pages" page: "Contrôle ce qui est visible sur les pages"
page_network: "See all of network page" page_network: "Voir toute la page du réseau"
page_network_geolocations: "See Geolocations tab" page_network_geolocations: "Voir l'onglet Géolocalisations"
page_network_geolocations_map: "See Geolocations Map" page_network_geolocations_map: "Voir la carte des géolocalisations"
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "Voir le tableau Ping par pays"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "Voir les adresses de jointure -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "Voir les graphiques des adresses de connexion"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph" page_network_join_addresses_graphs_time: "Voir le graphique des adresses de connexion dans le temps"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_overview: "Voir Aperçu du réseau -tab"
page_network_overview: "See Network Overview -tab" page_network_overview_graphs: "Voir les graphiques de l'aperçu du réseau"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs_calendar: "Voir le calendrier du réseau"
page_network_overview_graphs_calendar: "See Network calendar" page_network_overview_graphs_day_by_day: "Voir le graphique jour par jour"
page_network_overview_graphs_day_by_day: "See Day by Day graph" page_network_overview_graphs_hour_by_hour: "Voir le graphique heure par heure"
page_network_overview_graphs_hour_by_hour: "See Hour by Hour graph" page_network_overview_graphs_online: "Voir le graphique des joueurs en ligne"
page_network_overview_graphs_online: "See Players Online graph" page_network_overview_numbers: "Voir les numéros de l'aperçu du réseau"
page_network_overview_numbers: "See Network Overview numbers" page_network_performance: "Voir l'onglet Performances du réseau"
page_network_performance: "See network Performance tab" page_network_playerbase: "Voir l'onglet Aperçu de la base de joueurs"
page_network_playerbase: "See Playerbase Overview -tab" page_network_playerbase_graphs: "Voir les graphiques de la base de joueurs"
page_network_playerbase_graphs: "See Playerbase Overview graphs" page_network_playerbase_overview: "Voir les chiffres de l'aperçu de la base de joueurs"
page_network_playerbase_overview: "See Playerbase Overview numbers" page_network_players: "Voir la liste des lecteurs -tab"
page_network_players: "See Player list -tab" page_network_plugin_history: "Voir l'historique des plugins sur le réseau"
page_network_plugin_history: "See Plugin History across the network" page_network_plugins: "Voir l'onglet Plugins de Proxy"
page_network_plugins: "See Plugins tab of Proxy" page_network_retention: "Voir l'onglet Rétention des joueurs"
page_network_retention: "See Player Retention -tab" page_network_server_list: "Voir la liste des serveurs"
page_network_server_list: "See list of servers" page_network_sessions: "Voir l'onglet Sessions"
page_network_sessions: "See Sessions tab" page_network_sessions_list: "Voir la liste des sessions"
page_network_sessions_list: "See list of sessions" page_network_sessions_overview: "Voir les perspectives de la session"
page_network_sessions_overview: "See Session insights" page_network_sessions_server_pie: "Voir le graphique à secteurs du serveur"
page_network_sessions_server_pie: "See Server Pie graph" page_network_sessions_world_pie: "Voir le graphique de la carte du monde"
page_network_sessions_world_pie: "See World Pie graph" page_player: "Voir toute la page du joueur"
page_player: "See all of player page" page_player_overview: "Voir l'aperçu des joueurs -tab"
page_player_overview: "See Player Overview -tab" page_player_plugins: "Voir les plugins -tabs"
page_player_plugins: "See Plugins -tabs" page_player_servers: "Voir les serveurs -tab"
page_player_servers: "See Servers -tab" page_player_sessions: "Voir les sessions des joueurs -tab"
page_player_sessions: "See Player Sessions -tab" page_player_versus: "Voir PvP & PvE -tab"
page_player_versus: "See PvP & PvE -tab" page_server: "Voir toute la page du serveur"
page_server: "See all of server page" page_server_allowlist_bounce: "Voir la liste des rebonds de Game allowlist"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "Voir l'onglet Géolocalisations"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "Voir la carte des géolocalisations"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "Voir le tableau Ping par pays"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "Voir les adresses de jointure -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "Voir les graphiques des adresses de connexion"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph" page_server_join_addresses_graphs_time: "Voir le graphique des adresses de connexion dans le temps"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_online_activity: "Voir l'activité en ligne -tab"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity_graphs: "Voir les graphiques de l'activité en ligne"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs_calendar: "Voir Calendrier des serveurs"
page_server_online_activity_graphs_calendar: "See Server calendar" page_server_online_activity_graphs_day_by_day: "Voir le graphique jour par jour"
page_server_online_activity_graphs_day_by_day: "See Day by Day graph" page_server_online_activity_graphs_hour_by_hour: "Voir le graphique heure par heure"
page_server_online_activity_graphs_hour_by_hour: "See Hour by Hour graph" page_server_online_activity_graphs_punchcard: "Voir graphique Punchcard"
page_server_online_activity_graphs_punchcard: "See Punchcard graph" page_server_online_activity_overview: "Voir les numéros d'activité en ligne"
page_server_online_activity_overview: "See Online Activity numbers" page_server_overview: "Voir l'aperçu du serveur -tab"
page_server_overview: "See Server Overview -tab" page_server_overview_numbers: "Voir les numéros de la vue d'ensemble du serveur"
page_server_overview_numbers: "See Server Overview numbers" page_server_overview_players_online_graph: "Voir le graphique des joueurs en ligne"
page_server_overview_players_online_graph: "See Players Online graph" page_server_performance: "Voir l'onglet Performance"
page_server_performance: "See Performance tab" page_server_performance_graphs: "Voir les graphiques de performance"
page_server_performance_graphs: "See Performance graphs" page_server_performance_overview: "Voir les chiffres de performance"
page_server_performance_overview: "See Performance numbers" page_server_player_versus: "Voir PvP & PvE -tab"
page_server_player_versus: "See PvP & PvE -tab" page_server_player_versus_kill_list: "Voir Liste des joueurs tués ou morts"
page_server_player_versus_kill_list: "See Player kill and death lists" page_server_player_versus_overview: "Voir les chiffres de PvP & PvE"
page_server_player_versus_overview: "See PvP & PvE numbers" page_server_playerbase: "Voir l'aperçu de la base de joueurs -tab"
page_server_playerbase: "See Playerbase Overview -tab" page_server_playerbase_graphs: "Voir les graphiques de la base de joueurs"
page_server_playerbase_graphs: "See Playerbase Overview graphs" page_server_playerbase_overview: "Voir les chiffres de l'aperçu de la base de joueurs"
page_server_playerbase_overview: "See Playerbase Overview numbers" page_server_players: "Voir la liste des joueurs -tab"
page_server_players: "See Player list -tab" page_server_plugin_history: "Voir l'historique du plugin"
page_server_plugin_history: "See Plugin History" page_server_plugins: "Voir les onglets Plugins des serveurs"
page_server_plugins: "See Plugins -tabs of servers" page_server_retention: "Voir l'onglet Rétention des joueurs"
page_server_retention: "See Player Retention -tab" page_server_sessions: "Voir l'onglet Sessions"
page_server_sessions: "See Sessions tab" page_server_sessions_list: "Voir la liste des sessions"
page_server_sessions_list: "See list of sessions" page_server_sessions_overview: "Voir les perspectives de la session"
page_server_sessions_overview: "See Session insights" page_server_sessions_world_pie: "Voir le graphique de la carte du monde"
page_server_sessions_world_pie: "See World Pie graph"
modal: modal:
info: info:
bugs: "Rapport de bugs" bugs: "Rapport de bugs"
@ -750,17 +759,17 @@ html:
name: "Statut de Bannissement" name: "Statut de Bannissement"
banned: "Banni(e)" banned: "Banni(e)"
country: country:
text: "have joined from country" text: "a rejoint à partir du pays"
generic: generic:
allPlayers: "Tous les Joueurs" allPlayers: "Tous les Joueurs"
and: "et" and: "et"
start: "des Joueurs qui" start: "des Joueurs qui"
hasPlayedOnServers: hasPlayedOnServers:
name: "Has played on one of servers" name: "A joué sur l'un des serveurs"
text: "have played on at least one of" text: "A joué sur au moins un de"
hasPluginBooleanValue: hasPluginBooleanValue:
name: "Has plugin boolean value" name: "A la valeur booléenne du plugin"
text: "have Plugin boolean value" text: "avoir une valeur booléenne de plugin"
joinAddress: joinAddress:
text: "ont rejoint avec l'adresse" text: "ont rejoint avec l'adresse"
nonOperators: "Non Opérateur(trice)" nonOperators: "Non Opérateur(trice)"
@ -775,24 +784,25 @@ html:
text: "sont dans le groupe {group} de ${plugin}" text: "sont dans le groupe {group} de ${plugin}"
registeredBetween: registeredBetween:
text: "Enregistrés entre" text: "Enregistrés entre"
skipped: "Skipped" skipped: "Sautée"
title: title:
activityGroup: "Groupe d'Activité actuel" activityGroup: "Groupe d'Activité actuel"
view: " Vue :" view: " Vue :"
filters: filters:
add: "Ajouter un filtre.." add: "Ajouter un filtre."
loading: "Chargement des Filtres.." loading: "Chargement des Filtres."
generic: generic:
are: "`sont`" are: "`sont`"
label: label:
editQuery: "Modifier la requête"
from: ">de</label>" from: ">de</label>"
makeAnother: "Faire une autre Requête" makeAnother: "Faire une autre Requête"
servers: servers:
all: "using data of all servers" all: "en utilisant les données de tous les serveurs"
many: "using data of {number} servers" many: "en utilisant les données de {nombre} serveurs"
single: "using data of 1 server" single: "en utilisant les données d'un serveur"
two: "using data of 2 servers" two: "en utilisant les données de 2 serveurs"
showFullQuery: "Show Full Query" showFullQuery: "Afficher la requête complète"
to: ">à</label>" to: ">à</label>"
view: "Visualiser une vue" view: "Visualiser une vue"
performQuery: "Exécuter la Requête !" performQuery: "Exécuter la Requête !"
@ -812,7 +822,7 @@ html:
completion3: "Utilisez la commande suivante en jeu pour terminer l'enregistrement :" completion3: "Utilisez la commande suivante en jeu pour terminer l'enregistrement :"
completion4: "Ou en utilisant la console :" completion4: "Ou en utilisant la console :"
createNewUser: "Créer un nouvel utilisateur" createNewUser: "Créer un nouvel utilisateur"
disabled: "Registering new users has been disabled in the config." disabled: "L'enregistrement de nouveaux utilisateurs a été désactivé dans la configuration."
error: error:
checkFailed: "La vérification de l'état de l'enregistrement a échoué : " checkFailed: "La vérification de l'état de l'enregistrement a échoué : "
failed: "Enregistrement échoué : " failed: "Enregistrement échoué : "
@ -822,11 +832,11 @@ html:
login: "Vous avez déjà un compte ? Connectez-vous !" login: "Vous avez déjà un compte ? Connectez-vous !"
passwordTip: "Le Mot de Passe devrait comporter plus de 8 caractères, mais il n'y a aucune limite." passwordTip: "Le Mot de Passe devrait comporter plus de 8 caractères, mais il n'y a aucune limite."
register: "Enregistrer" register: "Enregistrer"
success: "Registered a new user successfully! You can now login." success: "Enregistrement réussi d'un nouvel utilisateur ! Vous pouvez maintenant vous connecter."
usernameTip: "Le Nom d'Utilisateur peut comporter jusqu'à 50 caractères." usernameTip: "Le Nom d'Utilisateur peut comporter jusqu'à 50 caractères."
text: text:
click: "Click for more" click: "Cliquez ici pour en savoir plus"
clickAndDrag: "Click and Drag for more" clickAndDrag: "Cliquer et faire glisser pour en savoir plus"
clickToExpand: "Cliquez pour agrandir" clickToExpand: "Cliquez pour agrandir"
comparing15days: "Comparaison des 15 derniers Jours" comparing15days: "Comparaison des 15 derniers Jours"
comparing30daysAgo: "Comparaison des 60 derniers Jours" comparing30daysAgo: "Comparaison des 60 derniers Jours"
@ -857,11 +867,11 @@ plugin:
database: "Traitement des tâches critiques inachevées... (${0})" database: "Traitement des tâches critiques inachevées... (${0})"
disabled: "Plan a été désactivé." disabled: "Plan a été désactivé."
processingComplete: "Traitement complété." processingComplete: "Traitement complété."
savingSessions: "Sauvegarde des sessions inachevées..." savingSessions: "Sauvegarde des sessions inachevées."
savingSessionsTimeout: "Timeout atteint - stockage des sessions non terminées lors du prochain démarrage." savingSessionsTimeout: "Timeout atteint - stockage des sessions non terminées lors du prochain démarrage."
waitingDb: "En attente de la finalisation des requêtes pour éviter que SQLite ne plante la JVM.." waitingDb: "En attente de la finalisation des requêtes pour éviter que SQLite ne plante la JVM."
waitingDbComplete: "Connexion SQLite fermée." waitingDbComplete: "Connexion SQLite fermée."
waitingTransactions: "En attente des transactions non terminées pour éviter la perte de données.." waitingTransactions: "En attente des transactions non terminées pour éviter la perte de données."
waitingTransactionsComplete: "File d'attente des transactions fermée." waitingTransactionsComplete: "File d'attente des transactions fermée."
webserver: "Le serveur Web a été désactivé." webserver: "Le serveur Web a été désactivé."
enable: enable:
@ -878,9 +888,9 @@ plugin:
emptyIP: "L'adresse IP située dans le fichier 'server.properties' est vide et l'option 'Alternative_IP' n'est pas utilisée. Attention, des liens incorrects seront donnés !" emptyIP: "L'adresse IP située dans le fichier 'server.properties' est vide et l'option 'Alternative_IP' n'est pas utilisée. Attention, des liens incorrects seront donnés !"
geoDisabled: "La Géolocalisation n'est pas active. (Data.Geolocations: false)" geoDisabled: "La Géolocalisation n'est pas active. (Data.Geolocations: false)"
geoInternetRequired: "Plan nécessite un accès à Internet lors de sa première utilisation pour télécharger la base de données 'GeoLite2 Geolocation'." geoInternetRequired: "Plan nécessite un accès à Internet lors de sa première utilisation pour télécharger la base de données 'GeoLite2 Geolocation'."
proxyAddress: "Proxy server detected in the database - Proxy Webserver address is '${0}'." proxyAddress: "Serveur proxy détecté dans la base de données - L'adresse du serveur web proxy est '${0}'."
proxyDisabledWebserver: "Disabling Webserver on this server - You can override this behavior by setting '${0}' to false." proxyDisabledWebserver: "Désactivation du serveur web sur ce serveur - Vous pouvez ignorer ce comportement en réglant '${0}' sur false."
settingChange: "Note: Set '${0}' to ${1}" settingChange: "Note : Réglez '${0}' sur ${1}."
storeSessions: "Stockage des sessions ayant été préservées lors de l'arrêt précédent." storeSessions: "Stockage des sessions ayant été préservées lors de l'arrêt précédent."
webserverDisabled: "Le serveur Web n'a pas été initialisé. (WebServer.DisableWebServer: true)" webserverDisabled: "Le serveur Web n'a pas été initialisé. (WebServer.DisableWebServer: true)"
webserver: "Le serveur Web communique à travers le port ${0} ( ${1} )." webserver: "Le serveur Web communique à travers le port ${0} ( ${1} )."
@ -891,16 +901,16 @@ plugin:
dbNotifySQLiteWAL: "Le mode WAL de SQLite n'est pas pris en charge sur cette version du serveur, en utilisant le mode par défaut. Cela peut possiblement affecter les performances." dbNotifySQLiteWAL: "Le mode WAL de SQLite n'est pas pris en charge sur cette version du serveur, en utilisant le mode par défaut. Cela peut possiblement affecter les performances."
dbPatchesAlreadyApplied: "Tous les correctifs pour la base de données ont déjà été appliqués." dbPatchesAlreadyApplied: "Tous les correctifs pour la base de données ont déjà été appliqués."
dbPatchesApplied: "Tous les correctifs pour la base de données ont été appliqués avec succès." dbPatchesApplied: "Tous les correctifs pour la base de données ont été appliqués avec succès."
dbSchemaPatch: "Database: Making sure schema is up to date.." dbSchemaPatch: "Base de données : S'assurer que le schéma est à jour."
loadedServerInfo: "Server identifier loaded: ${0}" loadedServerInfo: "Identifiant de serveur chargé : ${0}"
loadingServerInfo: "Loading server identifying information" loadingServerInfo: "Chargement des informations d'identification du serveur"
no: "Non" no: "Non"
today: "'Aujourd''hui'" today: "Aujourd'hui"
unavailable: "Indisponible" unavailable: "Indisponible"
unknown: "Inconnu" unknown: "Inconnu"
yes: "Oui" yes: "Oui"
yesterday: "'Hier'" yesterday: "'Hier'"
localeReloaded: "Custom locale.yml was modified so it was reloaded and is now in use." localeReloaded: "Le fichier locale.yml personnalisé a été modifié, il a donc été rechargé et est maintenant utilisé."
version: version:
checkFail: "Impossible de vérifier le dernier numéro de la version" checkFail: "Impossible de vérifier le dernier numéro de la version"
checkFailGithub: "Les informations de la version n'ont pas pu être chargées depuis Github/versions.txt" checkFailGithub: "Les informations de la version n'ont pas pu être chargées depuis Github/versions.txt"
@ -917,10 +927,10 @@ plugin:
notify: notify:
authDisabledConfig: "Serveur Web : Authentification d'utilisateur désactivée ! (dans la configuration)" authDisabledConfig: "Serveur Web : Authentification d'utilisateur désactivée ! (dans la configuration)"
authDisabledNoHTTPS: "Serveur Web : Authentification utilisateur désactivée ! (Non sécurisée avec HTTP)" authDisabledNoHTTPS: "Serveur Web : Authentification utilisateur désactivée ! (Non sécurisée avec HTTP)"
certificateExpiresOn: "Webserver: Loaded certificate is valid until ${0}." certificateExpiresOn: "Webserver: Le certificat chargé est valable jusqu'à ${0}."
certificateExpiresPassed: "Webserver: Certificate has expired, consider renewing the certificate." certificateExpiresPassed: "Webserver: Le certificat a expiré, pensez à renouveler le certificat."
certificateExpiresSoon: "Webserver: Certificate expires in ${0}, consider renewing the certificate." certificateExpiresSoon: "Webserver: Le certificat expire dans ${0}, pensez à renouveler le certificat."
certificateNoSuchAlias: "Webserver: Certificate with alias '${0}' was not found inside the keystore file '${1}'." certificateNoSuchAlias: "Webserver: Le certificat avec l'alias '${0}' n'a pas été trouvé dans le fichier keystore '${1}'."
http: "Serveur Web : Aucun certificat -> Utilisation du serveur HTTP pour la visualisation." http: "Serveur Web : Aucun certificat -> Utilisation du serveur HTTP pour la visualisation."
ipWhitelist: "Serveur Web : La liste blanche d'adresses IP n'est pas activée." ipWhitelist: "Serveur Web : La liste blanche d'adresses IP n'est pas activée."
ipWhitelistBlock: "Serveur Web : ${0} n'a pas pu accéder à '${1}'. (pas sur la liste blanche)" ipWhitelistBlock: "Serveur Web : ${0} n'a pas pu accéder à '${1}'. (pas sur la liste blanche)"

View File

@ -290,13 +290,19 @@ html:
active: "Attivo" active: "Attivo"
activePlaytime: "Active Playtime" activePlaytime: "Active Playtime"
activityIndex: "Indice Inattività" activityIndex: "Indice Inattività"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "Tempo AFK" afkTime: "Tempo AFK"
all: "Tutto" all: "Tutto"
allTime: "Tutto il Tempo" allTime: "Tutto il Tempo"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "Statistiche" asNumbers: "Statistiche"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "Average Active Playtime" averageActivePlaytime: "Average Active Playtime"
averageAfkTime: "Average AFK Time" averageAfkTime: "Average AFK Time"
@ -317,6 +323,7 @@ html:
banned: "Bannato" banned: "Bannato"
bestPeak: "Record Migliore" bestPeak: "Record Migliore"
bestPing: "Ping Migliore" bestPing: "Ping Migliore"
blocked: "Blocked"
calendar: " Calendario" calendar: " Calendario"
comparing7days: "Comparazione di 7 giorni" comparing7days: "Comparazione di 7 giorni"
connectionInfo: "Informazioni sulla Connessione" connectionInfo: "Informazioni sulla Connessione"
@ -430,7 +437,10 @@ html:
last24hours: "Ultime 24 ore" last24hours: "Ultime 24 ore"
last30days: "Ultimi 30 giorni" last30days: "Ultimi 30 giorni"
last7days: "Ultimi 7 giorni" last7days: "Ultimi 7 giorni"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Ultima connessione" lastConnected: "Ultima connessione"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Record Settimanale" lastPeak: "Record Settimanale"
lastSeen: "Ultima Visita" lastSeen: "Ultima Visita"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`are`" are: "`are`"
label: label:
editQuery: "Edit Query"
from: ">from</label>" from: ">from</label>"
makeAnother: "Make another query" makeAnother: "Make another query"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "よくログインしている" active: "よくログインしている"
activePlaytime: "アクティブなプレイ時間" activePlaytime: "アクティブなプレイ時間"
activityIndex: "活動指数" activityIndex: "活動指数"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "離席" afk: "離席"
afkTime: "離席時間" afkTime: "離席時間"
all: "全て" all: "全て"
allTime: "全体" allTime: "全体"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "アルファベット順" alphabetical: "アルファベット順"
apply: "適用" apply: "適用"
asNumbers: "の情報" asNumbers: "の情報"
attempts: "Attempts"
average: "平均の初回セッション時間" average: "平均の初回セッション時間"
averageActivePlaytime: "平均アクティブプレイ時間" averageActivePlaytime: "平均アクティブプレイ時間"
averageAfkTime: "平均AFK時間" averageAfkTime: "平均AFK時間"
@ -317,6 +323,7 @@ html:
banned: "BAN履歴" banned: "BAN履歴"
bestPeak: "全体のピークタイム" bestPeak: "全体のピークタイム"
bestPing: "最高Ping値" bestPing: "最高Ping値"
blocked: "Blocked"
calendar: "カレンダー" calendar: "カレンダー"
comparing7days: "直近1週間との比較" comparing7days: "直近1週間との比較"
connectionInfo: "接続情報" connectionInfo: "接続情報"
@ -430,7 +437,10 @@ html:
last24hours: "24時間" last24hours: "24時間"
last30days: "1ヶ月" last30days: "1ヶ月"
last7days: "1週間" last7days: "1週間"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "直近の接続" lastConnected: "直近の接続"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "直近のピークタイム" lastPeak: "直近のピークタイム"
lastSeen: "直近のオンライン" lastSeen: "直近のオンライン"
latestJoinAddresses: "最後に参加したサーバーのアドレス" latestJoinAddresses: "最後に参加したサーバーのアドレス"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "国ごとのPing表を表示" page_network_geolocations_ping_per_country: "国ごとのPing表を表示"
page_network_join_addresses: "参加アドレスタブを表示" page_network_join_addresses: "参加アドレスタブを表示"
page_network_join_addresses_graphs: "参加アドレスのグラフを表示" page_network_join_addresses_graphs: "参加アドレスのグラフを表示"
page_network_join_addresses_graphs_pie: "最後に参加したアドレスのグラフを表示"
page_network_join_addresses_graphs_time: "参加アドレスの経時変化のグラフを表示" page_network_join_addresses_graphs_time: "参加アドレスの経時変化のグラフを表示"
page_network_overview: "ネットワークの概要タブを表示" page_network_overview: "ネットワークの概要タブを表示"
page_network_overview_graphs: "ネットワークの概要グラフを表示" page_network_overview_graphs: "ネットワークの概要グラフを表示"
@ -686,12 +695,12 @@ html:
page_player_sessions: "プレイヤーセッションタブを表示" page_player_sessions: "プレイヤーセッションタブを表示"
page_player_versus: "PvP & PvEタブを表示" page_player_versus: "PvP & PvEタブを表示"
page_server: "全てのサーバーページを表示" page_server: "全てのサーバーページを表示"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "ジオロケーションタブを表示" page_server_geolocations: "ジオロケーションタブを表示"
page_server_geolocations_map: "ジオロケーションマップを表示" page_server_geolocations_map: "ジオロケーションマップを表示"
page_server_geolocations_ping_per_country: "国ごとのPing表を表示" page_server_geolocations_ping_per_country: "国ごとのPing表を表示"
page_server_join_addresses: "参加アドレスタブを表示" page_server_join_addresses: "参加アドレスタブを表示"
page_server_join_addresses_graphs: "参加アドレスグラフを表示" page_server_join_addresses_graphs: "参加アドレスグラフを表示"
page_server_join_addresses_graphs_pie: "最後に参加したアドレスのグラフを表示"
page_server_join_addresses_graphs_time: "参加アドレスの経時変化のグラフを表示" page_server_join_addresses_graphs_time: "参加アドレスの経時変化のグラフを表示"
page_server_online_activity: "オンラインアクティビティタブを表示" page_server_online_activity: "オンラインアクティビティタブを表示"
page_server_online_activity_graphs: "オンラインアクティビティグラフを表示" page_server_online_activity_graphs: "オンラインアクティビティグラフを表示"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`それは`" are: "`それは`"
label: label:
editQuery: "Edit Query"
from: ">から</label>" from: ">から</label>"
makeAnother: "別のクエリを作る" makeAnother: "別のクエリを作る"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "활동적인" active: "활동적인"
activePlaytime: "Active Playtime" activePlaytime: "Active Playtime"
activityIndex: "활동 색인" activityIndex: "활동 색인"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "AFK 시간" afkTime: "AFK 시간"
all: "모두" all: "모두"
allTime: "모든 시간" allTime: "모든 시간"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "숫자로" asNumbers: "숫자로"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "Average Active Playtime" averageActivePlaytime: "Average Active Playtime"
averageAfkTime: "Average AFK Time" averageAfkTime: "Average AFK Time"
@ -317,6 +323,7 @@ html:
banned: "Banned" banned: "Banned"
bestPeak: "최고의 피크" bestPeak: "최고의 피크"
bestPing: "최고 Ping" bestPing: "최고 Ping"
blocked: "Blocked"
calendar: " 달력" calendar: " 달력"
comparing7days: "지난 7일 비교" comparing7days: "지난 7일 비교"
connectionInfo: "연결 정보" connectionInfo: "연결 정보"
@ -430,7 +437,10 @@ html:
last24hours: "지난 24시간" last24hours: "지난 24시간"
last30days: "지난 30일" last30days: "지난 30일"
last7days: "지난 7일" last7days: "지난 7일"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "마지막 연결" lastConnected: "마지막 연결"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "마지막 피크" lastPeak: "마지막 피크"
lastSeen: "마지막으로 본" lastSeen: "마지막으로 본"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`are`" are: "`are`"
label: label:
editQuery: "Edit Query"
from: ">from</label>" from: ">from</label>"
makeAnother: "Make another query" makeAnother: "Make another query"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Actief" active: "Actief"
activePlaytime: "Actieve Speeltijd" activePlaytime: "Actieve Speeltijd"
activityIndex: "Activiteitsindex" activityIndex: "Activiteitsindex"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "AFK Tijd" afkTime: "AFK Tijd"
all: "Alle" all: "Alle"
allTime: "Alle Tijd" allTime: "Alle Tijd"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "als nummers" asNumbers: "als nummers"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "Gemiddelde Actieve Speeltijd" averageActivePlaytime: "Gemiddelde Actieve Speeltijd"
averageAfkTime: "Gemiddelde AFK Tijd" averageAfkTime: "Gemiddelde AFK Tijd"
@ -317,6 +323,7 @@ html:
banned: "Verbannen" banned: "Verbannen"
bestPeak: "Piek aller tijden" bestPeak: "Piek aller tijden"
bestPing: "Beste ping" bestPing: "Beste ping"
blocked: "Blocked"
calendar: " Kalender" calendar: " Kalender"
comparing7days: "7 dagen vergelijken" comparing7days: "7 dagen vergelijken"
connectionInfo: "Verbindingsinformatie" connectionInfo: "Verbindingsinformatie"
@ -430,7 +437,10 @@ html:
last24hours: "Afgelopen 24 uur" last24hours: "Afgelopen 24 uur"
last30days: "Afgelopen 30 dagen" last30days: "Afgelopen 30 dagen"
last7days: "Afgelopen 7 dagen" last7days: "Afgelopen 7 dagen"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Laatst verbonden" lastConnected: "Laatst verbonden"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Laatste piek" lastPeak: "Laatste piek"
lastSeen: "Laatste gezien" lastSeen: "Laatste gezien"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`zijn`" are: "`zijn`"
label: label:
editQuery: "Edit Query"
from: ">van</label>" from: ">van</label>"
makeAnother: "Maak nog een query" makeAnother: "Maak nog een query"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Ativo" active: "Ativo"
activePlaytime: "Active Playtime" activePlaytime: "Active Playtime"
activityIndex: "Índice de Atividade" activityIndex: "Índice de Atividade"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "AFK Time" afkTime: "AFK Time"
all: "Todos" all: "Todos"
allTime: "All Time" allTime: "All Time"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "as Numbers" asNumbers: "as Numbers"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "Average Active Playtime" averageActivePlaytime: "Average Active Playtime"
averageAfkTime: "Average AFK Time" averageAfkTime: "Average AFK Time"
@ -317,6 +323,7 @@ html:
banned: "Banido" banned: "Banido"
bestPeak: "Pico Máximo" bestPeak: "Pico Máximo"
bestPing: "Best Ping" bestPing: "Best Ping"
blocked: "Blocked"
calendar: " Calendário" calendar: " Calendário"
comparing7days: "Comparing 7 days" comparing7days: "Comparing 7 days"
connectionInfo: "Connection Information" connectionInfo: "Connection Information"
@ -430,7 +437,10 @@ html:
last24hours: "Últimas 24 horas" last24hours: "Últimas 24 horas"
last30days: "Últimos 30 dias" last30days: "Últimos 30 dias"
last7days: "Últimos 7 dias" last7days: "Últimos 7 dias"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Última Conexão" lastConnected: "Última Conexão"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Último Pico" lastPeak: "Último Pico"
lastSeen: "Última Vez Visto" lastSeen: "Última Vez Visto"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`are`" are: "`are`"
label: label:
editQuery: "Edit Query"
from: ">from</label>" from: ">from</label>"
makeAnother: "Make another query" makeAnother: "Make another query"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Активный" active: "Активный"
activePlaytime: "Активное время игры" activePlaytime: "Активное время игры"
activityIndex: "Индекс активности" activityIndex: "Индекс активности"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "Время AFK" afkTime: "Время AFK"
all: "Все" all: "Все"
allTime: "Все время" allTime: "Все время"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "В числах" asNumbers: "В числах"
attempts: "Attempts"
average: "Средняя продолжительность первого сеанса" average: "Средняя продолжительность первого сеанса"
averageActivePlaytime: "Среднее время активной игры" averageActivePlaytime: "Среднее время активной игры"
averageAfkTime: "Среднее время AFK" averageAfkTime: "Среднее время AFK"
@ -317,6 +323,7 @@ html:
banned: "Забанен" banned: "Забанен"
bestPeak: "Максимальный Пик" bestPeak: "Максимальный Пик"
bestPing: "Наилучший пинг" bestPing: "Наилучший пинг"
blocked: "Blocked"
calendar: " Календарь" calendar: " Календарь"
comparing7days: "Сравнение 7 дней" comparing7days: "Сравнение 7 дней"
connectionInfo: "Информация о соединении" connectionInfo: "Информация о соединении"
@ -430,7 +437,10 @@ html:
last24hours: "Последние 24 часа" last24hours: "Последние 24 часа"
last30days: "Последние 30 дней" last30days: "Последние 30 дней"
last7days: "Последние 7 дней" last7days: "Последние 7 дней"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Последнее подключение" lastConnected: "Последнее подключение"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Последний Пик" lastPeak: "Последний Пик"
lastSeen: "Последнее посещение" lastSeen: "Последнее посещение"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "``" are: "``"
label: label:
editQuery: "Edit Query"
from: ">с</label>" from: ">с</label>"
makeAnother: "Сделать другой запрос" makeAnother: "Сделать другой запрос"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Aktivite" active: "Aktivite"
activePlaytime: "Aktif Oyun Süresi" activePlaytime: "Aktif Oyun Süresi"
activityIndex: "Aktivite göstergesi" activityIndex: "Aktivite göstergesi"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "AFK Süresi" afkTime: "AFK Süresi"
all: "Tamamı" all: "Tamamı"
allTime: "Tüm zamanlar" allTime: "Tüm zamanlar"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "Alphabetical" alphabetical: "Alphabetical"
apply: "Apply" apply: "Apply"
asNumbers: "Sayılar olarak" asNumbers: "Sayılar olarak"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "Ortalama Aktif Oyun Süresi" averageActivePlaytime: "Ortalama Aktif Oyun Süresi"
averageAfkTime: "Ortalama AFK Süresi" averageAfkTime: "Ortalama AFK Süresi"
@ -317,6 +323,7 @@ html:
banned: "Yasaklanmış" banned: "Yasaklanmış"
bestPeak: "Tüm Zamanların Zirvesi" bestPeak: "Tüm Zamanların Zirvesi"
bestPing: "En iyi Ping" bestPing: "En iyi Ping"
blocked: "Blocked"
calendar: " Takvim" calendar: " Takvim"
comparing7days: "7 gün karşılaştırılıyor" comparing7days: "7 gün karşılaştırılıyor"
connectionInfo: "Bağlantı Bilgisi" connectionInfo: "Bağlantı Bilgisi"
@ -430,7 +437,10 @@ html:
last24hours: "Son 24 saat" last24hours: "Son 24 saat"
last30days: "Son 30 gün" last30days: "Son 30 gün"
last7days: "Son 7 gün" last7days: "Son 7 gün"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Son bağlantı" lastConnected: "Son bağlantı"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Son Zirve" lastPeak: "Son Zirve"
lastSeen: "Son Görülme" lastSeen: "Son Görülme"
latestJoinAddresses: "Latest Join Addresses" latestJoinAddresses: "Latest Join Addresses"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`vardır`" are: "`vardır`"
label: label:
editQuery: "Edit Query"
from: ">dan</label>" from: ">dan</label>"
makeAnother: "Başka bir sorgu yap" makeAnother: "Başka bir sorgu yap"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "Активний" active: "Активний"
activePlaytime: "Активний час гри" activePlaytime: "Активний час гри"
activityIndex: "Індекс активності" activityIndex: "Індекс активності"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "AFK" afk: "AFK"
afkTime: "Час AFK" afkTime: "Час AFK"
all: "Всі" all: "Всі"
allTime: "Весь час" allTime: "Весь час"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "За алфавітом" alphabetical: "За алфавітом"
apply: "Застосувати" apply: "Застосувати"
asNumbers: "В числах" asNumbers: "В числах"
attempts: "Attempts"
average: "Середня тривалість першого сеансу" average: "Середня тривалість першого сеансу"
averageActivePlaytime: "Середній час активної гри" averageActivePlaytime: "Середній час активної гри"
averageAfkTime: "Середній час AFK" averageAfkTime: "Середній час AFK"
@ -317,6 +323,7 @@ html:
banned: "Заблокований" banned: "Заблокований"
bestPeak: "Максимальний Пік" bestPeak: "Максимальний Пік"
bestPing: "Найкращий пінг" bestPing: "Найкращий пінг"
blocked: "Blocked"
calendar: "Календар" calendar: "Календар"
comparing7days: "Порівняння 7 днів" comparing7days: "Порівняння 7 днів"
connectionInfo: "Інформація про з`єднання" connectionInfo: "Інформація про з`єднання"
@ -430,7 +437,10 @@ html:
last24hours: "Останні 24 години" last24hours: "Останні 24 години"
last30days: "Останні 30 днів" last30days: "Останні 30 днів"
last7days: "Останні 7 днів" last7days: "Останні 7 днів"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "Останнє підключення" lastConnected: "Останнє підключення"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "Останній Пік" lastPeak: "Останній Пік"
lastSeen: "Останнє відвідування" lastSeen: "Останнє відвідування"
latestJoinAddresses: "Останні адреси приєднання" latestJoinAddresses: "Останні адреси приєднання"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "``" are: "``"
label: label:
editQuery: "Edit Query"
from: ">з</label>" from: ">з</label>"
makeAnother: "Зробити інший запит" makeAnother: "Зробити інший запит"
servers: servers:

View File

@ -290,13 +290,19 @@ html:
active: "活躍" active: "活躍"
activePlaytime: "活躍時間" activePlaytime: "活躍時間"
activityIndex: "活躍指數" activityIndex: "活躍指數"
addJoinAddressGroup: "Add address group"
addressGroup: "Address group {{n}}"
afk: "掛機" afk: "掛機"
afkTime: "掛機時間" afkTime: "掛機時間"
all: "全部" all: "全部"
allTime: "所有時間" allTime: "所有時間"
allowed: "Allowed"
allowlist: "Allowlist"
allowlistBounces: "Allowlist Bounces"
alphabetical: "按字母順序" alphabetical: "按字母順序"
apply: "確定" apply: "確定"
asNumbers: "統計" asNumbers: "統計"
attempts: "Attempts"
average: "Average first session length" average: "Average first session length"
averageActivePlaytime: "平均活躍時間" averageActivePlaytime: "平均活躍時間"
averageAfkTime: "平均掛機時間" averageAfkTime: "平均掛機時間"
@ -317,6 +323,7 @@ html:
banned: "已被封鎖" banned: "已被封鎖"
bestPeak: "所有時間峰值" bestPeak: "所有時間峰值"
bestPing: "最低延遲" bestPing: "最低延遲"
blocked: "Blocked"
calendar: " 日誌" calendar: " 日誌"
comparing7days: "對比 7 天的情況" comparing7days: "對比 7 天的情況"
connectionInfo: "連接訊息" connectionInfo: "連接訊息"
@ -430,7 +437,10 @@ html:
last24hours: "過去 24 小時" last24hours: "過去 24 小時"
last30days: "過去 30 天" last30days: "過去 30 天"
last7days: "過去 7 天" last7days: "過去 7 天"
lastAllowed: "Last Allowed"
lastBlocked: "Last Blocked"
lastConnected: "最後連接時間" lastConnected: "最後連接時間"
lastKnownAttempt: "Last Known Attempt"
lastPeak: "上次線上峰值" lastPeak: "上次線上峰值"
lastSeen: "最後線上時間" lastSeen: "最後線上時間"
latestJoinAddresses: "最後加入位址" latestJoinAddresses: "最後加入位址"
@ -656,7 +666,6 @@ html:
page_network_geolocations_ping_per_country: "See Ping Per Country table" page_network_geolocations_ping_per_country: "See Ping Per Country table"
page_network_join_addresses: "See Join Addresses -tab" page_network_join_addresses: "See Join Addresses -tab"
page_network_join_addresses_graphs: "See Join Address graphs" page_network_join_addresses_graphs: "See Join Address graphs"
page_network_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_network_join_addresses_graphs_time: "See Join Addresses over time graph" page_network_join_addresses_graphs_time: "See Join Addresses over time graph"
page_network_overview: "See Network Overview -tab" page_network_overview: "See Network Overview -tab"
page_network_overview_graphs: "See Network Overview graphs" page_network_overview_graphs: "See Network Overview graphs"
@ -686,12 +695,12 @@ html:
page_player_sessions: "See Player Sessions -tab" page_player_sessions: "See Player Sessions -tab"
page_player_versus: "See PvP & PvE -tab" page_player_versus: "See PvP & PvE -tab"
page_server: "See all of server page" page_server: "See all of server page"
page_server_allowlist_bounce: "See list of Game allowlist bounces"
page_server_geolocations: "See Geolocations tab" page_server_geolocations: "See Geolocations tab"
page_server_geolocations_map: "See Geolocations Map" page_server_geolocations_map: "See Geolocations Map"
page_server_geolocations_ping_per_country: "See Ping Per Country table" page_server_geolocations_ping_per_country: "See Ping Per Country table"
page_server_join_addresses: "See Join Addresses -tab" page_server_join_addresses: "See Join Addresses -tab"
page_server_join_addresses_graphs: "See Join Address graphs" page_server_join_addresses_graphs: "See Join Address graphs"
page_server_join_addresses_graphs_pie: "See Latest Join Addresses graph"
page_server_join_addresses_graphs_time: "See Join Addresses over time graph" page_server_join_addresses_graphs_time: "See Join Addresses over time graph"
page_server_online_activity: "See Online Activity -tab" page_server_online_activity: "See Online Activity -tab"
page_server_online_activity_graphs: "See Online Activity graphs" page_server_online_activity_graphs: "See Online Activity graphs"
@ -785,6 +794,7 @@ html:
generic: generic:
are: "`是`" are: "`是`"
label: label:
editQuery: "Edit Query"
from: ">從 </label>" from: ">從 </label>"
makeAnother: "進行另一個查詢" makeAnother: "進行另一個查詢"
servers: servers:

View File

@ -3,6 +3,7 @@ author: AuroraLS3
main: com.djrapitops.plan.Plan main: com.djrapitops.plan.Plan
version: @version@ version: @version@
api-version: 1.13 api-version: 1.13
folia-supported: true
softdepend: softdepend:
- AAC - AAC
- ASkyBlock - ASkyBlock

View File

@ -33,7 +33,7 @@ import com.djrapitops.plan.storage.database.transactions.commands.StoreWebUserTr
import com.djrapitops.plan.utilities.PassEncryptUtil; import com.djrapitops.plan.utilities.PassEncryptUtil;
import com.google.gson.Gson; import com.google.gson.Gson;
import extension.FullSystemExtension; import extension.FullSystemExtension;
import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.DisplayName;

View File

@ -0,0 +1,56 @@
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.delivery.domain.auth;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
/**
* Tests for {@link WebPermission}.
*
* @author AuroraLS3
*/
class WebPermissionTest {
@Test
void webPermissionIsFound() {
String permission = "access.player.self";
WebPermission found = WebPermission.findByPermission(permission).orElseThrow(AssertionError::new);
WebPermission expected = WebPermission.ACCESS_PLAYER_SELF;
assertEquals(expected, found);
}
@Test
void webPermissionIsDetectedAsDeprecated() {
String permission = "page.server.join.addresses.graphs.pie";
assertTrue(WebPermission.isDeprecated(permission));
}
@Test
void webPermissionIsDetectedAsNonDeprecated() {
String permission = "access.player.self";
assertFalse(WebPermission.isDeprecated(permission));
}
@Test
void customWebPermissionIsDetectedAsNonDeprecated() {
String permission = "custom.permission";
assertFalse(WebPermission.isDeprecated(permission));
}
}

View File

@ -31,7 +31,7 @@ import com.djrapitops.plan.storage.database.transactions.commands.StoreWebUserTr
import com.djrapitops.plan.storage.database.transactions.events.PlayerRegisterTransaction; import com.djrapitops.plan.storage.database.transactions.events.PlayerRegisterTransaction;
import com.djrapitops.plan.storage.database.transactions.webuser.StoreWebGroupTransaction; import com.djrapitops.plan.storage.database.transactions.webuser.StoreWebGroupTransaction;
import com.djrapitops.plan.utilities.PassEncryptUtil; import com.djrapitops.plan.utilities.PassEncryptUtil;
import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
@ -95,7 +95,6 @@ class AccessControlTest {
Arguments.of("/v1/graph?type=aggregatedPing&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_PERFORMANCE_GRAPHS, 200, 403), Arguments.of("/v1/graph?type=aggregatedPing&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_PERFORMANCE_GRAPHS, 200, 403),
Arguments.of("/v1/graph?type=worldPie&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_SESSIONS_WORLD_PIE, 200, 403), Arguments.of("/v1/graph?type=worldPie&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_SESSIONS_WORLD_PIE, 200, 403),
Arguments.of("/v1/graph?type=activity&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_PLAYERBASE_GRAPHS, 200, 403), Arguments.of("/v1/graph?type=activity&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_PLAYERBASE_GRAPHS, 200, 403),
Arguments.of("/v1/graph?type=joinAddressPie&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_PIE, 200, 403),
Arguments.of("/v1/graph?type=geolocation&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_GEOLOCATIONS_MAP, 200, 403), Arguments.of("/v1/graph?type=geolocation&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_GEOLOCATIONS_MAP, 200, 403),
Arguments.of("/v1/graph?type=uniqueAndNew&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_ONLINE_ACTIVITY_GRAPHS_DAY_BY_DAY, 200, 403), Arguments.of("/v1/graph?type=uniqueAndNew&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_ONLINE_ACTIVITY_GRAPHS_DAY_BY_DAY, 200, 403),
Arguments.of("/v1/graph?type=hourlyUniqueAndNew&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_ONLINE_ACTIVITY_GRAPHS_HOUR_BY_HOUR, 200, 403), Arguments.of("/v1/graph?type=hourlyUniqueAndNew&server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_ONLINE_ACTIVITY_GRAPHS_HOUR_BY_HOUR, 200, 403),
@ -107,7 +106,10 @@ class AccessControlTest {
Arguments.of("/v1/pingTable?server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_GEOLOCATIONS_PING_PER_COUNTRY, 200, 403), Arguments.of("/v1/pingTable?server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_GEOLOCATIONS_PING_PER_COUNTRY, 200, 403),
Arguments.of("/v1/sessions?server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_SESSIONS_LIST, 200, 403), Arguments.of("/v1/sessions?server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_SESSIONS_LIST, 200, 403),
Arguments.of("/v1/retention?server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_RETENTION, 200, 403), Arguments.of("/v1/retention?server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_RETENTION, 200, 403),
Arguments.of("/v1/joinAddresses", WebPermission.PAGE_NETWORK_RETENTION, 200, 403),
Arguments.of("/v1/joinAddresses?listOnly=true", WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_TIME, 200, 403),
Arguments.of("/v1/joinAddresses?server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_RETENTION, 200, 403), Arguments.of("/v1/joinAddresses?server=" + TestConstants.SERVER_UUID_STRING + "", WebPermission.PAGE_SERVER_RETENTION, 200, 403),
Arguments.of("/v1/joinAddresses?server=" + TestConstants.SERVER_UUID_STRING + "&listOnly=true", WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_TIME, 200, 403),
Arguments.of("/network", WebPermission.ACCESS_NETWORK, 302, 403), Arguments.of("/network", WebPermission.ACCESS_NETWORK, 302, 403),
Arguments.of("/v1/network/overview", WebPermission.PAGE_NETWORK_OVERVIEW_NUMBERS, 200, 403), Arguments.of("/v1/network/overview", WebPermission.PAGE_NETWORK_OVERVIEW_NUMBERS, 200, 403),
Arguments.of("/v1/network/servers", WebPermission.PAGE_NETWORK_SERVER_LIST, 200, 403), Arguments.of("/v1/network/servers", WebPermission.PAGE_NETWORK_SERVER_LIST, 200, 403),
@ -119,7 +121,6 @@ class AccessControlTest {
Arguments.of("/v1/graph?type=hourlyUniqueAndNew", WebPermission.PAGE_NETWORK_OVERVIEW_GRAPHS_HOUR_BY_HOUR, 200, 403), Arguments.of("/v1/graph?type=hourlyUniqueAndNew", WebPermission.PAGE_NETWORK_OVERVIEW_GRAPHS_HOUR_BY_HOUR, 200, 403),
Arguments.of("/v1/graph?type=serverCalendar", WebPermission.PAGE_NETWORK_OVERVIEW_GRAPHS_CALENDAR, 200, 403), Arguments.of("/v1/graph?type=serverCalendar", WebPermission.PAGE_NETWORK_OVERVIEW_GRAPHS_CALENDAR, 200, 403),
Arguments.of("/v1/graph?type=serverPie", WebPermission.PAGE_NETWORK_SESSIONS_SERVER_PIE, 200, 403), Arguments.of("/v1/graph?type=serverPie", WebPermission.PAGE_NETWORK_SESSIONS_SERVER_PIE, 200, 403),
Arguments.of("/v1/graph?type=joinAddressPie", WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_PIE, 200, 403),
Arguments.of("/v1/graph?type=activity", WebPermission.PAGE_NETWORK_PLAYERBASE_GRAPHS, 200, 403), Arguments.of("/v1/graph?type=activity", WebPermission.PAGE_NETWORK_PLAYERBASE_GRAPHS, 200, 403),
Arguments.of("/v1/graph?type=geolocation", WebPermission.PAGE_NETWORK_GEOLOCATIONS_MAP, 200, 403), Arguments.of("/v1/graph?type=geolocation", WebPermission.PAGE_NETWORK_GEOLOCATIONS_MAP, 200, 403),
Arguments.of("/v1/network/pingTable", WebPermission.PAGE_NETWORK_GEOLOCATIONS_PING_PER_COUNTRY, 200, 403), Arguments.of("/v1/network/pingTable", WebPermission.PAGE_NETWORK_GEOLOCATIONS_PING_PER_COUNTRY, 200, 403),
@ -163,7 +164,8 @@ class AccessControlTest {
Arguments.of("/v1/preferences", WebPermission.ACCESS, 200, 200), Arguments.of("/v1/preferences", WebPermission.ACCESS, 200, 200),
Arguments.of("/v1/storePreferences", WebPermission.ACCESS, 400, 400), Arguments.of("/v1/storePreferences", WebPermission.ACCESS, 400, 400),
Arguments.of("/v1/pluginHistory?server=" + TestConstants.SERVER_UUID_STRING, WebPermission.PAGE_NETWORK_PLUGIN_HISTORY, 200, 403), Arguments.of("/v1/pluginHistory?server=" + TestConstants.SERVER_UUID_STRING, WebPermission.PAGE_NETWORK_PLUGIN_HISTORY, 200, 403),
Arguments.of("/v1/pluginHistory?server=" + TestConstants.SERVER_UUID_STRING, WebPermission.PAGE_SERVER_PLUGIN_HISTORY, 200, 403) Arguments.of("/v1/pluginHistory?server=" + TestConstants.SERVER_UUID_STRING, WebPermission.PAGE_SERVER_PLUGIN_HISTORY, 200, 403),
Arguments.of("/v1/gameAllowlistBounces?server=" + TestConstants.SERVER_UUID_STRING, WebPermission.PAGE_SERVER_ALLOWLIST_BOUNCE, 200, 403)
); );
} }
@ -201,7 +203,7 @@ class AccessControlTest {
address, address,
TestConstants.VERSION))); TestConstants.VERSION)));
Caller caller = system.getExtensionService().register(new ExtensionsDatabaseTest.PlayerExtension()) Caller caller = system.getApiServices().getExtensionService().register(new ExtensionsDatabaseTest.PlayerExtension())
.orElseThrow(AssertionError::new); .orElseThrow(AssertionError::new);
caller.updatePlayerData(TestConstants.PLAYER_ONE_UUID, TestConstants.PLAYER_ONE_NAME); caller.updatePlayerData(TestConstants.PLAYER_ONE_UUID, TestConstants.PLAYER_ONE_NAME);

View File

@ -30,6 +30,7 @@ import com.djrapitops.plan.settings.config.paths.WebserverSettings;
import com.djrapitops.plan.storage.database.Database; import com.djrapitops.plan.storage.database.Database;
import com.djrapitops.plan.storage.database.queries.objects.ServerQueries; import com.djrapitops.plan.storage.database.queries.objects.ServerQueries;
import com.djrapitops.plan.storage.database.transactions.StoreServerInformationTransaction; import com.djrapitops.plan.storage.database.transactions.StoreServerInformationTransaction;
import com.djrapitops.plan.storage.database.transactions.commands.RemoveWebGroupsTransaction;
import com.djrapitops.plan.storage.database.transactions.commands.StoreWebUserTransaction; import com.djrapitops.plan.storage.database.transactions.commands.StoreWebUserTransaction;
import com.djrapitops.plan.storage.database.transactions.events.StoreServerPlayerTransaction; import com.djrapitops.plan.storage.database.transactions.events.StoreServerPlayerTransaction;
import com.djrapitops.plan.storage.database.transactions.webuser.StoreWebGroupTransaction; import com.djrapitops.plan.storage.database.transactions.webuser.StoreWebGroupTransaction;
@ -94,6 +95,8 @@ class AccessControlVisibilityTest {
@AfterEach @AfterEach
void tearDownTest(WebDriver driver) { void tearDownTest(WebDriver driver) {
String address = "https://localhost:" + TEST_PORT_NUMBER + "/auth/logout";
driver.get(address);
SeleniumExtension.newTab(driver); SeleniumExtension.newTab(driver);
driver.manage().deleteAllCookies(); driver.manage().deleteAllCookies();
} }
@ -136,12 +139,12 @@ class AccessControlVisibilityTest {
Arguments.arguments(WebPermission.PAGE_SERVER_PLAYER_VERSUS_OVERVIEW, "pvp-pve-as-numbers", "pvppve"), Arguments.arguments(WebPermission.PAGE_SERVER_PLAYER_VERSUS_OVERVIEW, "pvp-pve-as-numbers", "pvppve"),
Arguments.arguments(WebPermission.PAGE_SERVER_PLAYER_VERSUS_OVERVIEW, "pvp-pve-insights", "pvppve"), Arguments.arguments(WebPermission.PAGE_SERVER_PLAYER_VERSUS_OVERVIEW, "pvp-pve-insights", "pvppve"),
Arguments.arguments(WebPermission.PAGE_SERVER_PLAYER_VERSUS_KILL_LIST, "pvp-kills-table", "pvppve"), Arguments.arguments(WebPermission.PAGE_SERVER_PLAYER_VERSUS_KILL_LIST, "pvp-kills-table", "pvppve"),
Arguments.arguments(WebPermission.PAGE_SERVER_ALLOWLIST_BOUNCE, "allowlist-bounce-table", "allowlist"),
Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERBASE_OVERVIEW, "playerbase-trends", "playerbase"), Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERBASE_OVERVIEW, "playerbase-trends", "playerbase"),
Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERBASE_OVERVIEW, "playerbase-insights", "playerbase"), Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERBASE_OVERVIEW, "playerbase-insights", "playerbase"),
Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERBASE_GRAPHS, "playerbase-graph", "playerbase"), Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERBASE_GRAPHS, "playerbase-graph", "playerbase"),
Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERBASE_GRAPHS, "playerbase-current", "playerbase"), Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERBASE_GRAPHS, "playerbase-current", "playerbase"),
Arguments.arguments(WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_TIME, "join-address-graph", "join-addresses"), Arguments.arguments(WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_TIME, "server-join-addresses", "join-addresses"),
Arguments.arguments(WebPermission.PAGE_SERVER_JOIN_ADDRESSES_GRAPHS_PIE, "join-address-groups", "join-addresses"),
Arguments.arguments(WebPermission.PAGE_SERVER_RETENTION, "retention-graph", "retention"), Arguments.arguments(WebPermission.PAGE_SERVER_RETENTION, "retention-graph", "retention"),
Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERS, "players-table", "players"), Arguments.arguments(WebPermission.PAGE_SERVER_PLAYERS, "players-table", "players"),
Arguments.arguments(WebPermission.PAGE_SERVER_GEOLOCATIONS_MAP, "geolocations", "geolocations"), Arguments.arguments(WebPermission.PAGE_SERVER_GEOLOCATIONS_MAP, "geolocations", "geolocations"),
@ -171,8 +174,7 @@ class AccessControlVisibilityTest {
Arguments.arguments(WebPermission.PAGE_NETWORK_PLAYERBASE_OVERVIEW, "playerbase-insights", "playerbase"), Arguments.arguments(WebPermission.PAGE_NETWORK_PLAYERBASE_OVERVIEW, "playerbase-insights", "playerbase"),
Arguments.arguments(WebPermission.PAGE_NETWORK_PLAYERBASE_GRAPHS, "playerbase-graph", "playerbase"), Arguments.arguments(WebPermission.PAGE_NETWORK_PLAYERBASE_GRAPHS, "playerbase-graph", "playerbase"),
Arguments.arguments(WebPermission.PAGE_NETWORK_PLAYERBASE_GRAPHS, "playerbase-current", "playerbase"), Arguments.arguments(WebPermission.PAGE_NETWORK_PLAYERBASE_GRAPHS, "playerbase-current", "playerbase"),
Arguments.arguments(WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_TIME, "join-address-graph", "join-addresses"), Arguments.arguments(WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_TIME, "network-join-addresses", "join-addresses"),
Arguments.arguments(WebPermission.PAGE_NETWORK_JOIN_ADDRESSES_GRAPHS_PIE, "join-address-groups", "join-addresses"),
Arguments.arguments(WebPermission.PAGE_NETWORK_RETENTION, "retention-graph", "retention"), Arguments.arguments(WebPermission.PAGE_NETWORK_RETENTION, "retention-graph", "retention"),
Arguments.arguments(WebPermission.PAGE_NETWORK_PLAYERS, "players-table", "players"), Arguments.arguments(WebPermission.PAGE_NETWORK_PLAYERS, "players-table", "players"),
Arguments.arguments(WebPermission.PAGE_NETWORK_GEOLOCATIONS_MAP, "geolocations", "geolocations"), Arguments.arguments(WebPermission.PAGE_NETWORK_GEOLOCATIONS_MAP, "geolocations", "geolocations"),
@ -207,6 +209,8 @@ class AccessControlVisibilityTest {
@ParameterizedTest(name = "Access with visibility {0} can see element #{1} in /{2}") @ParameterizedTest(name = "Access with visibility {0} can see element #{1} in /{2}")
@MethodSource("pageLevelVisibleCases") @MethodSource("pageLevelVisibleCases")
void pageVisible(WebPermission permission, String element, String page, Database database, ServerUUID serverUUID, ChromeDriver driver) throws Exception { void pageVisible(WebPermission permission, String element, String page, Database database, ServerUUID serverUUID, ChromeDriver driver) throws Exception {
// TODO Remove after fixing manage/groups making bazillion calls to /v1/permissions
database.executeTransaction(new RemoveWebGroupsTransaction()).get();
User user = registerUser(database, permission); User user = registerUser(database, permission);
String address = "https://localhost:" + TEST_PORT_NUMBER + "/" + page; String address = "https://localhost:" + TEST_PORT_NUMBER + "/" + page;
@ -286,7 +290,7 @@ class AccessControlVisibilityTest {
driver.get(address); driver.get(address);
login(driver, user); login(driver, user);
SeleniumExtension.waitForElementToBeVisible(By.id("wrapper"), driver); SeleniumExtension.waitForElementToBeVisible(By.className("login-username"), driver);
By id = By.id(element); By id = By.id(element);
assertThrows(NoSuchElementException.class, () -> driver.findElement(id), () -> "Saw element #" + element + " at " + address + " without permission to"); assertThrows(NoSuchElementException.class, () -> driver.findElement(id), () -> "Saw element #" + element + " at " + address + " without permission to");
assertNoLogs(driver, address); assertNoLogs(driver, address);
@ -328,7 +332,7 @@ class AccessControlVisibilityTest {
driver.get(address); driver.get(address);
login(driver, user); login(driver, user);
SeleniumExtension.waitForElementToBeVisible(By.id("wrapper"), driver); SeleniumExtension.waitForElementToBeVisible(By.className("login-username"), driver);
By id = By.id(element); By id = By.id(element);
assertThrows(NoSuchElementException.class, () -> driver.findElement(id), () -> "Saw element #" + element + " at " + address + " without permission to"); assertThrows(NoSuchElementException.class, () -> driver.findElement(id), () -> "Saw element #" + element + " at " + address + " without permission to");
assertNoLogs(driver, address); assertNoLogs(driver, address);
@ -361,7 +365,7 @@ class AccessControlVisibilityTest {
driver.get(address); driver.get(address);
login(driver, user); login(driver, user);
SeleniumExtension.waitForElementToBeVisible(By.id("wrapper"), driver); SeleniumExtension.waitForElementToBeVisible(By.className("login-username"), driver);
By id = By.id(element); By id = By.id(element);
assertThrows(NoSuchElementException.class, () -> driver.findElement(id), () -> "Saw element #" + element + " at " + address + " without permission to"); assertThrows(NoSuchElementException.class, () -> driver.findElement(id), () -> "Saw element #" + element + " at " + address + " without permission to");
assertNoLogs(driver, address); assertNoLogs(driver, address);
@ -407,7 +411,7 @@ class AccessControlVisibilityTest {
driver.get(address); driver.get(address);
login(driver, playerUser); login(driver, playerUser);
SeleniumExtension.waitForElementToBeVisible(By.id("wrapper"), driver); SeleniumExtension.waitForElementToBeVisible(By.className("login-username"), driver);
By id = By.id(element); By id = By.id(element);
assertThrows(NoSuchElementException.class, () -> driver.findElement(id), () -> "Saw element #" + element + " at /player/" + TestConstants.PLAYER_TWO_UUID + " without permission to"); assertThrows(NoSuchElementException.class, () -> driver.findElement(id), () -> "Saw element #" + element + " at /player/" + TestConstants.PLAYER_TWO_UUID + " without permission to");
} }

View File

@ -70,7 +70,7 @@ class HttpAccessControlTest {
ADDRESS, ADDRESS,
TestConstants.VERSION))); TestConstants.VERSION)));
Caller caller = system.getExtensionService().register(new ExtensionsDatabaseTest.PlayerExtension()) Caller caller = system.getApiServices().getExtensionService().register(new ExtensionsDatabaseTest.PlayerExtension())
.orElseThrow(AssertionError::new); .orElseThrow(AssertionError::new);
caller.updatePlayerData(TestConstants.PLAYER_ONE_UUID, TestConstants.PLAYER_ONE_NAME); caller.updatePlayerData(TestConstants.PLAYER_ONE_UUID, TestConstants.PLAYER_ONE_NAME);

Some files were not shown because too many files have changed in this diff Show More