Compare commits

...
533 Commits
Author SHA1 Message Date
Andre601 b140c0aa32 Merge pull request 'Add debug option for log messages' (#194) from feature/add-debug into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/194
2023-12-15 19:55:08 +00:00
Andre601 8f7b293541 Merge branch 'master' into feature/add-debug 2023-12-15 19:50:01 +00:00
Andre601 6f878164c5 Add debug option to getting started guide. 2023-12-13 18:27:17 +00:00
Andre601 a16801ff56 Remove mention of spigot being tested 2023-12-13 18:25:41 +00:00
Andre601 65a89cf762 Merge branch 'master' into feature/add-debug 2023-12-12 22:01:57 +00:00
Andre601 27d4ada179 Merge pull request 'Update maven Docker tag to v3.9.6' (#196) from renovate/maven-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/196
2023-12-12 12:03:23 +00:00
Andre601 574edfb246 Merge branch 'master' into renovate/maven-3.x 2023-12-12 12:03:04 +00:00
Andre601 7b7aad9d4e Merge pull request 'Update dependency mkdocs-material to v9.5.2' (#195) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/195
2023-12-12 12:02:38 +00:00
Andre601's Renovate Bot c5c9ed8109 Update maven Docker tag to v3.9.6 2023-12-12 12:01:19 +00:00
Andre601's Renovate Bot 58fea4090d Update dependency mkdocs-material to v9.5.2 2023-12-12 12:01:11 +00:00
Andre601 cd0aad6ec1 Add debug option for log messages 2023-12-09 20:26:54 +01:00
Andre601 fa45844434 Merge pull request 'Update dependency mkdocs-material to v9.5.1' (#192) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/192
2023-12-08 12:28:41 +00:00
Andre601 c4e2a144b5 Merge pull request 'Update actions/setup-python action to v5' (#193) from renovate/actions-setup-python-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/193
2023-12-08 12:28:31 +00:00
Andre601's Renovate Bot 7fe93c7021 Update actions/setup-python action to v5 2023-12-08 12:01:09 +00:00
Andre601's Renovate Bot 1d413a5c2a Update dependency mkdocs-material to v9.5.1 2023-12-08 12:01:00 +00:00
Andre601 51db52dbdd Merge pull request 'Update dependency com.viaversion:viaversion-api to v4.9.2' (#190) from renovate/com.viaversion-viaversion-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/190
2023-12-07 12:07:24 +00:00
Andre601 4ade528188 Merge pull request 'Update dependency mkdocs-material to v9.5.0' (#191) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/191
2023-12-07 12:07:12 +00:00
Andre601's Renovate Bot 64ba48a7c7 Update dependency mkdocs-material to v9.5.0 2023-12-07 12:02:54 +00:00
Andre601's Renovate Bot ac4edb2b97 Update dependency com.viaversion:viaversion-api to v4.9.2 2023-12-07 12:02:49 +00:00
Andre601 3ea000c98b Merge pull request 'Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.3' (#189) from renovate/org.apache.httpcomponents.client5-httpclient5-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/189
2023-12-06 13:06:15 +00:00
Andre601 746bef13e1 Merge pull request 'Update dependency com.viaversion:viaversion-api to v4.9.1' (#188) from renovate/com.viaversion-viaversion-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/188
2023-12-06 13:06:01 +00:00
Andre601's Renovate Bot 355ab73546 Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.3 2023-12-06 12:01:10 +00:00
Andre601's Renovate Bot 67170c70e0 Update dependency com.viaversion:viaversion-api to v4.9.1 2023-12-06 12:01:07 +00:00
Andre601 f99c2df4e8 Merge pull request 'Update actions/configure-pages action to v4' (#186) from renovate/actions-configure-pages-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/186
2023-12-05 12:12:05 +00:00
Andre601 212ec04fb8 Merge pull request 'Update actions/deploy-pages action to v3' (#187) from renovate/actions-deploy-pages-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/187
2023-12-05 12:11:49 +00:00
Andre601's Renovate Bot 89c6089101 Update actions/deploy-pages action to v3 2023-12-05 12:01:17 +00:00
Andre601's Renovate Bot 87bce39d9a Update actions/configure-pages action to v4 2023-12-05 12:01:12 +00:00
Andre601 18900547a0 Remove leading and trailing whitespaces from server names 2023-12-05 01:46:45 +01:00
Andre601 5df2e05a14 Fix wrong file paths for paper 2023-12-02 14:27:45 +01:00
Andre601 d4e4173cc3 Improve placeholders with world/server args 2023-12-02 13:59:56 +01:00
Andre601 562ad481c5 Bump version to 3.6.0 2023-12-02 12:43:11 +00:00
Andre601 a0ee2a4322 Merge pull request 'Remove Spigot support' (#183) from feature/remove-spigot-support into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/183
2023-12-02 12:42:30 +00:00
Andre601 2c92efdb43 Merge branch 'master' into feature/remove-spigot-support 2023-12-02 12:39:37 +00:00
Andre601 555dc9d6a5 Merge pull request 'Improve docs workflow setup' (#179) from feature/improve-docs-workflow into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/179
2023-12-02 12:39:28 +00:00
Andre601 27742c5e1b .woodpecker/publish_docs.yml aktualisiert 2023-12-02 12:39:16 +00:00
Andre601 280aeb8d2e Merge branch 'master' into feature/improve-docs-workflow 2023-12-02 12:38:49 +00:00
Andre601 92a868f0fa Merge pull request 'Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.2.3' (#185) from renovate/org.apache.httpcomponents.client5-httpclient5-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/185
2023-12-02 12:03:33 +00:00
Andre601 189ac5e09b Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.4.14' (#184) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/184
2023-12-02 12:03:13 +00:00
Andre601's Renovate Bot 833cb81d65 Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.2.3 2023-12-02 12:01:18 +00:00
Andre601's Renovate Bot ab09422da5 Update dependency ch.qos.logback:logback-classic to v1.4.14 2023-12-02 12:01:14 +00:00
Andre601 64cad6dc26 Remove Spigot from readme and docs 2023-12-01 17:00:14 +01:00
Andre601 ce78b493f4 Remove spigot from supported platforms in PlatformInfo 2023-12-01 16:58:43 +01:00
Andre601 c43048ea3f Remove Spigot support 2023-12-01 16:51:33 +01:00
Andre601 6d4d1600ab Add Getting Started page 2023-11-29 15:09:32 +01:00
Andre601 f114e99b9b Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.4.13' (#182) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/182
2023-11-29 12:06:26 +00:00
Andre601's Renovate Bot 3d587bc86d Update dependency ch.qos.logback:logback-classic to v1.4.13 2023-11-29 12:01:18 +00:00
Andre601 bd8c6be7c6 Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.4.12' (#181) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/181
2023-11-28 12:02:35 +00:00
Andre601's Renovate Bot b5d5d508e2 Update dependency ch.qos.logback:logback-classic to v1.4.12 2023-11-28 12:01:02 +00:00
Andre601 3001b65fe8 Merge pull request 'Update dependency mkdocs-material to v9.4.14' (#180) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/180
2023-11-27 12:08:29 +00:00
Andre601's Renovate Bot c82771db59 Update dependency mkdocs-material to v9.4.14 2023-11-27 12:01:59 +00:00
Andre601 9880836c25 Improve docs workflow setup 2023-11-25 00:32:57 +00:00
Andre601 f12ae28722 Add Source redirect for API 2023-11-25 00:19:59 +00:00
Andre601 42b0f0e94f Merge pull request 'Update dependency mkdocs-material to v9.4.12' (#178) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/178
2023-11-24 12:04:02 +00:00
Andre601's Renovate Bot 0a4b872051 Update dependency mkdocs-material to v9.4.12 2023-11-24 12:00:59 +00:00
Andre601 b1322105ed Merge pull request 'Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.2.2' (#177) from renovate/org.apache.httpcomponents.client5-httpclient5-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/177
2023-11-23 12:02:45 +00:00
Andre601 831ca57fbb Merge branch 'master' into renovate/org.apache.httpcomponents.client5-httpclient5-5.x 2023-11-23 12:02:17 +00:00
Andre601 6502639cd3 Merge pull request 'Update dependency mkdocs-material to v9.4.11' (#176) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/176
2023-11-23 12:01:54 +00:00
Andre601's Renovate Bot 5059b80db2 Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.2.2 2023-11-23 12:01:07 +00:00
Andre601's Renovate Bot ecdaf72963 Update dependency mkdocs-material to v9.4.11 2023-11-23 12:00:58 +00:00
Andre601 28e2ca69ed Merge pull request 'Update dependency mkdocs-material to v9.4.10' (#175) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/175
2023-11-19 20:40:20 +00:00
Andre601 9cad78b6e4 Merge branch 'master' into renovate/mkdocs-material-9.x 2023-11-19 21:39:40 +01:00
Andre601 af8654666b Merge pull request 'Update dependency mkdocs-glightbox to v0.3.5' (#174) from renovate/mkdocs-glightbox-0.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/174
2023-11-19 12:20:05 +00:00
Andre601's Renovate Bot 6cd474b35d Update dependency mkdocs-material to v9.4.10 2023-11-19 12:01:07 +00:00
Andre601's Renovate Bot 3802ab556c Update dependency mkdocs-glightbox to v0.3.5 2023-11-19 12:01:02 +00:00
Andre601 3a520eeaf0 Merge pull request 'Update dependency mkdocs-material to v9.4.9' (#173) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/173
2023-11-17 12:15:02 +00:00
Andre601's Renovate Bot 204f43c112 Update dependency mkdocs-material to v9.4.9 2023-11-17 12:00:45 +00:00
Andre601 fc8ed8e49e Merge pull request 'Update dependency mkdocs-material to v9.4.8' (#172) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/172
2023-11-06 12:02:13 +00:00
Andre601's Renovate Bot 56082c308b Update dependency mkdocs-material to v9.4.8 2023-11-06 12:01:06 +00:00
Andre601 205e563095 Fix wrong placeholder names. 2023-11-05 13:59:46 +00:00
Andre601 5b01940c60 Merge pull request 'Update dependency me.clip:placeholderapi to v2.11.5' (#171) from renovate/me.clip-placeholderapi-2.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/171
2023-10-29 12:05:36 +00:00
Andre601's Renovate Bot cbb087e3d1 Update dependency me.clip:placeholderapi to v2.11.5 2023-10-29 12:01:15 +00:00
Andre601 524b926244 Merge pull request 'Update dependency mkdocs-material to v9.4.7' (#170) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/170
2023-10-28 12:01:09 +00:00
Andre601's Renovate Bot 4059bbfe93 Update dependency mkdocs-material to v9.4.7 2023-10-28 12:00:43 +00:00
Andre601 9b0b69a4f4 Merge pull request 'Update maven Docker tag to v3.9.5' (#169) from renovate/maven-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/169
2023-10-20 12:02:12 +00:00
Andre601's Renovate Bot 10a82eb951 Update maven Docker tag to v3.9.5 2023-10-20 12:01:07 +00:00
Andre601 690f7dfaf0 Merge pull request 'Update dependency com.squareup.okhttp3:okhttp to v4.12.0' (#168) from renovate/com.squareup.okhttp3-okhttp-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/168
2023-10-17 12:03:39 +00:00
Andre601's Renovate Bot 6a22d20b3a Update dependency com.squareup.okhttp3:okhttp to v4.12.0 2023-10-17 12:00:59 +00:00
Andre601 b1072bb1fa Update HangarVersionUploader for latest API changes 2023-10-16 12:01:12 +02:00
Andre601 d20da91bab Remove Hangar for now 2023-10-16 11:43:54 +02:00
Andre601 17e9692028 Remove unused import 2023-10-16 11:22:37 +02:00
Andre601 45dc8a5fe6 Don't use closeable http client 2023-10-16 11:22:09 +02:00
Andre601 a237ac1ce4 Merge pull request 'Update dependency mkdocs-material to v9.4.6' (#167) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/167
2023-10-15 17:27:18 +00:00
Andre601's Renovate Bot 27e66a16b9 Update dependency mkdocs-material to v9.4.6 2023-10-15 17:01:04 +00:00
Andre601 8f98846bc3 Ignore deprecation state of getUnsafe() 2023-10-15 00:00:57 +02:00
Andre601 bbcab59845 Final change I hope 2023-10-14 23:59:49 +02:00
Andre601 3130e07070 More consistent names 2023-10-14 23:57:05 +02:00
Andre601 7bc61ddf4d Use more matching placeholder names 2023-10-14 23:54:32 +02:00
Andre601 53d15a9011 Bump version 2023-10-14 23:42:16 +02:00
Andre601 8718e4a0ae update PAPI placeholders info 2023-10-11 12:10:04 +00:00
Andre601 06a49956af Merge pull request 'Update dependency com.google.guava:guava to v32.1.3-jre' (#166) from renovate/com.google.guava-guava-32.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/166
2023-10-11 12:04:37 +00:00
Andre601's Renovate Bot 38ec131b69 Update dependency com.google.guava:guava to v32.1.3-jre 2023-10-11 12:00:57 +00:00
Andre601 1bdaa61dd9 Merge pull request 'Update dependency mkdocs-material to v9.4.5' (#165) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/165
2023-10-10 12:02:55 +00:00
Andre601's Renovate Bot 080d5055c4 Update dependency mkdocs-material to v9.4.5 2023-10-10 12:01:23 +00:00
Andre601 423b363964 Use maxPlayers value 2023-10-09 01:33:40 +02:00
Andre601 6b9abfccfc Update PlaceholderAPI placeholders 2023-10-07 12:53:46 +02:00
Andre601 f589a8da35 Update Docs 2023-10-06 23:54:51 +02:00
Andre601 465581306f docs/api/javadocs.md aktualisiert 2023-10-06 20:54:27 +00:00
Andre601 6b2919961b Merge pull request 'Add Javadoc redirect' (#164) from docs/javadoc-link into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/164
2023-10-06 20:52:04 +00:00
Andre601 adb6e797b2 Add Javadoc redirect 2023-10-06 20:51:35 +00:00
Andre601 b410b9438f Merge pull request 'Update dependency mkdocs-material to v9.4.4' (#163) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/163
2023-10-06 12:22:17 +00:00
Andre601's Renovate Bot c1d5b4efa9 Update dependency mkdocs-material to v9.4.4 2023-10-06 12:01:00 +00:00
Andre601 4785dd127e Only allow workflow_dispatch from now on 2023-10-04 14:19:16 +00:00
Andre601 9e8e2f7e74 Add missing id property 2023-10-03 21:49:01 +00:00
Andre601 c14dfe0f3a Merge pull request 'Update dependency com.viaversion:viaversion-api to v4.8.1' (#162) from renovate/com.viaversion-viaversion-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/162
2023-10-03 12:40:03 +00:00
Andre601's Renovate Bot ed92e7002c Update dependency com.viaversion:viaversion-api to v4.8.1 2023-10-03 12:01:05 +00:00
Andre601 8f93d9732c Merge pull request 'Update dependency mkdocs-material to v9.4.3' (#161) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/161
2023-10-02 12:03:50 +00:00
Andre601's Renovate Bot 96f8fa5860 Update dependency mkdocs-material to v9.4.3 2023-10-02 12:00:57 +00:00
Andre601 bfb857bd5c Merge pull request 'Update dependency net.william278:papiproxybridge to v1.4.2' (#160) from renovate/net.william278-papiproxybridge-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/160
2023-09-30 12:04:14 +00:00
Andre601 5fe3b5811c Merge pull request 'Update dependency net.kyori:adventure-platform-bungeecord to v4.3.1' (#159) from renovate/net.kyori-adventure-platform-bungeecord-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/159
2023-09-30 12:03:54 +00:00
Andre601's Renovate Bot 2a7eff0092 Update dependency net.william278:papiproxybridge to v1.4.2 2023-09-30 12:01:23 +00:00
Andre601 1907f5d47e Merge pull request 'Update dependency net.kyori:adventure-platform-bukkit to v4.3.1' (#158) from renovate/net.kyori-adventure-platform-bukkit-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/158
2023-09-29 12:03:12 +00:00
Andre601's Renovate Bot aa92350b52 Update dependency net.kyori:adventure-platform-bungeecord to v4.3.1 2023-09-29 12:01:05 +00:00
Andre601's Renovate Bot 869b9bd3b7 Update dependency net.kyori:adventure-platform-bukkit to v4.3.1 2023-09-29 12:00:56 +00:00
Andre601 fe31dcf0a4 Merge pull request 'Update dependency net.william278:papiproxybridge to v1.4.1' (#156) from renovate/net.william278-papiproxybridge-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/156
2023-09-26 18:39:12 +00:00
Andre601 6b44438f52 Use custom compact admonition boxes 2023-09-26 20:38:22 +02:00
Andre601's Renovate Bot 6b0c654f41 Update dependency net.william278:papiproxybridge to v1.4.1 2023-09-26 12:00:57 +00:00
Andre601 c28ff3a891 Use some JS to insert API version 2023-09-26 13:56:48 +02:00
Andre601 f424b41c3b Header consistency 2023-09-25 15:14:10 +02:00
Andre601 b5f901d8f5 Use Hangar version of PAPI as dependency 2023-09-25 15:04:10 +02:00
Andre601 29d52492fc Merge pull request 'Update dependency mkdocs-material to v9.4.2' (#155) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/155
2023-09-25 12:03:05 +00:00
Andre601's Renovate Bot 2d6af20bdc Update dependency mkdocs-material to v9.4.2 2023-09-25 12:01:00 +00:00
Andre601 59c913ecf8 Merge pull request 'Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.1' (#154) from renovate/org.apache.maven.plugins-maven-shade-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/154
2023-09-24 22:18:35 +00:00
Andre601's Renovate Bot 4a50beb4e0 Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.1 2023-09-24 22:16:36 +00:00
Andre601 c099127272 delete renovate.yml 2023-09-24 21:48:23 +00:00
Andre601 15974b5c54 Merge pull request 'Update dependency me.clip:placeholderapi to v2.11.4' (#153) from renovate/me.clip-placeholderapi-2.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/153
2023-09-24 13:03:36 +00:00
Andre601's Renovate Bot 483afe63c4 Update dependency me.clip:placeholderapi to v2.11.4 2023-09-24 12:00:56 +00:00
Andre601 f0cb458a34 Use snippets for API version display 2023-09-24 03:19:41 +02:00
Andre601 2c547cd6d0 Add changelog newline sanitization to HangarVersionUploader too 2023-09-23 22:35:45 +02:00
Andre601 e7282b4a97 Support all MC 1.19 versions. 2023-09-23 22:27:48 +02:00
Andre601 4fc0ad97fc Revert to normal publish setup 2023-09-23 21:59:12 +02:00
Andre601 3ae02167b9 Lowercase loaders 2023-09-23 21:55:49 +02:00
Andre601 e407b38565 Use proper plugin release to test. 2023-09-23 21:42:06 +02:00
Andre601 c98d52ed46 Make a dryrun-test for VersionUploader 2023-09-23 21:29:06 +02:00
Andre601 266913e4b4 Use response directly from client's execute method 2023-09-23 16:42:21 +02:00
Andre601 a3d4a009a5 Use unique ID for modrinth dependencies 2023-09-23 16:27:17 +02:00
Andre601 18e00d082e Use addLabels and not labels 2023-09-23 12:09:04 +00:00
Andre601 6a3979743b Merge pull request 'Update dependency mkdocs-material to v9.4.1' (#152) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/152
2023-09-23 12:05:45 +00:00
Andre601's Renovate Bot 3a29ad54ca Update dependency mkdocs-material to v9.4.1 2023-09-23 12:01:03 +00:00
Andre601 987c520160 Merge pull request 'Update dependency com.viaversion:viaversion-api to v4.8.0' (#151) from renovate/com.viaversion-viaversion-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/151
2023-09-22 12:06:48 +00:00
Andre601's Renovate Bot 4b6197f6e0 Update dependency com.viaversion:viaversion-api to v4.8.0 2023-09-22 12:00:55 +00:00
Andre601 01611d4130 Add 1.20.2 for ModrinthVersionUploader 2023-09-21 20:59:35 +02:00
Andre601 531aa65fcc Merge pull request 'Bump mkdocs-material to 9.4.0' (#150) from feature/update-mkdocs into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/150
2023-09-21 17:39:22 +00:00
Andre601 fb101c4a14 Use new emoji extension 2023-09-21 17:39:11 +00:00
Andre601 7bd97f5f5a Bump mkdocs-material to 9.4.0 2023-09-21 17:37:28 +00:00
Andre601 52c3edd0ea Use debug log level 2023-09-21 12:15:49 +00:00
Andre601 368e544051 Don't include core-module in codeberg release 2023-09-21 00:52:20 +02:00
Andre601 12b2f5a208 Give non-successful response codes on fails 2023-09-21 00:50:26 +02:00
Andre601 adc88a8640 Increase timeout delay for Release data fetching 2023-09-21 00:43:08 +02:00
Andre601 817db44492 Add null check for codeberg release 2023-09-21 00:40:57 +02:00
Andre601 f74f7dfa6b Use CompletableFuture.join() for VersionUploader 2023-09-21 00:37:12 +02:00
Andre601 e9c8730090 Merge pull request 'Fix docs' (#149) from fix/docs into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/149
2023-09-20 22:32:41 +00:00
Andre601 861ada0396 docs/examples/index.md aktualisiert 2023-09-20 22:32:29 +00:00
Andre601 a2fb9c3d81 Fix docs 2023-09-20 22:31:52 +00:00
Andre601 f747461018 Use the right Env variable... 2023-09-20 23:37:03 +02:00
Andre601 f408146d57 Fix wrong API URL. 2023-09-20 23:34:27 +02:00
Andre601 c684001fcf mkdocs.yml aktualisiert 2023-09-20 21:19:39 +00:00
Andre601 6dc53c8c4f define source and target for modrinth and hangar token 2023-09-20 21:17:24 +00:00
Andre601 64ab958c67 docs/examples/index.md aktualisiert 2023-09-20 20:20:26 +00:00
Andre601 7a66c9a0c9 Merge pull request 'Add maxPlayers options' (#145) from feature/maxplayers-option into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/145
2023-09-20 20:05:44 +00:00
Andre601 0ff658632a Merge branch 'master' into feature/maxplayers-option 2023-09-20 17:41:50 +00:00
Andre601 ee32347bd0 Merge pull request 'Re-make Modrinth and Hangar uploader' (#144) from feature/modrinth-and-hangar-uploader into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/144
2023-09-20 17:41:23 +00:00
Andre601 9e11038e98 Merge branch 'master' into feature/modrinth-and-hangar-uploader 2023-09-20 17:39:15 +00:00
Andre601 008ddbb98a .github/dependabot.yml gelöscht 2023-09-20 17:34:13 +00:00
Andre601 f084c17d76 Merge pull request 'Update api.version to v3.1.0' (#148) from renovate/api.version into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/148
2023-09-20 15:55:20 +00:00
Andre601's Renovate Bot 9dd73aec9d Update api.version to v3.1.0 2023-09-20 15:51:15 +00:00
Andre601 3ebf151f3a Improve renovate configuration 2023-09-20 11:50:28 +00:00
Andre601 872c194a62 Add 'folia-supported: true' to paper-plugin.yml 2023-09-20 11:03:19 +00:00
Andre601 d122603c70 Merge pull request 'Update dependency mkdocs-material to v9.3.2' (#146) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/146
2023-09-20 00:20:40 +00:00
Andre601's Renovate Bot 489fce2031 Update dependency mkdocs-material to v9.3.2 2023-09-20 00:06:48 +00:00
Andre601 1651151f26 Test without RENOVATE_ADD_LABELS for now 2023-09-19 23:49:21 +00:00
Andre601 aa61ea826f renovate.json aktualisiert 2023-09-19 23:48:42 +00:00
Andre601 0877eb4187 Add github token for release notes and gh actions dependencies 2023-09-19 23:43:49 +00:00
Andre601 6e89cdb3cc .woodpecker/test.yml gelöscht 2023-09-19 23:24:07 +00:00
Andre601 1eb0b30356 Improve source facts fetcher 2023-09-19 22:53:51 +02:00
Andre601 417f5dc5d0 Also include image 2023-09-19 21:02:42 +02:00
Andre601 01a73b9ea3 Bump plugin and API version 2023-09-19 20:54:02 +02:00
Andre601 c06788a55c Update API changelog 2023-09-19 20:45:09 +02:00
Andre601 fd924107bc Add maxPlayers option for server list profile 2023-09-19 20:32:05 +02:00
Andre601 dce90b91f0 .woodpecker/publish_assets.yml aktualisiert 2023-09-18 18:22:30 +00:00
Andre601 aa968b7d25 Add gitea release plugin 2023-09-18 16:01:47 +02:00
Andre601 137d089e4a Merge branch 'master' into feature/modrinth-and-hangar-uploader 2023-09-18 13:11:27 +00:00
Andre601 bfa27f92e1 Re-make Modrinth and Hangar uploader 2023-09-18 15:10:24 +02:00
Andre601 b405706b50 Merge pull request 'Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.0' (#143) from renovate/org.apache.maven.plugins-maven-shade-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/143
2023-09-18 00:06:48 +00:00
Andre601's Renovate Bot 89f44d7bec Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.0 2023-09-18 00:04:39 +00:00
Andre601 28e9b6ed96 .woodpecker/test.yml aktualisiert 2023-09-17 20:29:19 +00:00
Andre601 19b3eec401 .woodpecker/test.yml aktualisiert 2023-09-17 20:11:37 +00:00
Andre601 c712b3b715 .woodpecker/test.yml aktualisiert 2023-09-17 20:10:22 +00:00
Andre601 5c379c3b13 .woodpecker/test.yml aktualisiert 2023-09-17 20:09:29 +00:00
Andre601 f6f48708d9 .woodpecker/test.yml aktualisiert 2023-09-17 20:08:51 +00:00
Andre601 83890fa5cb .woodpecker/test.yml aktualisiert 2023-09-17 20:07:55 +00:00
Andre601 d7653a6a6f .woodpecker/test.yml aktualisiert 2023-09-17 20:02:43 +00:00
Andre601 676c4c8f1f .woodpecker/test.yml aktualisiert 2023-09-17 20:00:49 +00:00
Andre601 b66870c942 .woodpecker/test.yml aktualisiert 2023-09-17 19:56:23 +00:00
Andre601 af97a0dac2 Test out JSON creation 2023-09-17 19:56:01 +00:00
Andre601 d43ef090ef Use double quotes 2023-09-17 19:42:36 +00:00
Andre601 e7451ae567 .woodpecker/test.yml aktualisiert 2023-09-17 19:32:57 +00:00
Andre601 cf4f095624 Test user auth 2023-09-17 19:28:12 +00:00
Andre601 9280809ab0 .woodpecker/publish_assets.yml aktualisiert 2023-09-17 19:25:04 +00:00
Andre601 875ae4d43d .woodpecker/test.yml aktualisiert 2023-09-17 19:19:27 +00:00
Andre601 dbd45ac65e .woodpecker/test.yml aktualisiert 2023-09-17 19:14:57 +00:00
Andre601 7c15778ebc test without token 2023-09-17 19:12:24 +00:00
Andre601 2699856a75 .woodpecker/test.yml aktualisiert 2023-09-17 19:11:30 +00:00
Andre601 b49c105620 .woodpecker/test.yml aktualisiert 2023-09-17 18:57:19 +00:00
Andre601 2ffbfeec48 .woodpecker/test.yml aktualisiert 2023-09-17 18:56:50 +00:00
Andre601 bd885e25e2 .woodpecker/test.yml aktualisiert 2023-09-17 18:56:11 +00:00
Andre601 e2c6eb142c Merge pull request 'Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.3.0' (#142) from renovate/org.apache.maven.plugins-maven-jar-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/142
2023-09-17 00:12:53 +00:00
Andre601 db11e42c6d Merge pull request 'Update dependency net.md-5:bungeecord-api to v1.20-R0.1' (#141) from renovate/net.md-5-bungeecord-api-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/141
2023-09-17 00:12:11 +00:00
Andre601's Renovate Bot 36e5829943 Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.3.0 2023-09-17 00:11:49 +00:00
Andre601's Renovate Bot 7bbb2bbfa7 Update dependency net.md-5:bungeecord-api to v1.20-R0.1 2023-09-17 00:11:46 +00:00
Andre601 6acd536f43 Merge pull request 'Update dependency net.kyori:adventure-text-minimessage to v4.14.0' (#140) from renovate/net.kyori-adventure-text-minimessage-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/140
2023-09-16 00:10:40 +00:00
Andre601 64d1440ad2 Merge pull request 'Update dependency net.kyori:adventure-platform-bungeecord to v4.3.0' (#139) from renovate/net.kyori-adventure-platform-bungeecord-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/139
2023-09-16 00:10:08 +00:00
Andre601's Renovate Bot 6f1dd78aa7 Update dependency net.kyori:adventure-text-minimessage to v4.14.0 2023-09-16 00:04:39 +00:00
Andre601's Renovate Bot 4330978816 Update dependency net.kyori:adventure-platform-bungeecord to v4.3.0 2023-09-16 00:04:22 +00:00
Andre601 935603b852 Use VersionUploader for hangar only again 2023-09-15 21:42:35 +02:00
Andre601 9671938a66 .woodpecker/test.yml aktualisiert 2023-09-15 19:16:23 +00:00
Andre601 5cc974eb9c Return of the | . 2023-09-15 19:15:44 +00:00
Andre601 e526cc6750 .woodpecker/test.yml aktualisiert 2023-09-15 19:09:20 +00:00
Andre601 34fea78b01 Check if tag actually is set. 2023-09-15 19:02:26 +00:00
Andre601 072547005c .woodpecker/test.yml aktualisiert 2023-09-15 19:01:39 +00:00
Andre601 cdb5852e8b .woodpecker/test.yml aktualisiert 2023-09-15 18:59:06 +00:00
Andre601 050477c19f .woodpecker/test.yml aktualisiert 2023-09-15 18:58:22 +00:00
Andre601 52b24bb3e9 .woodpecker/test.yml aktualisiert 2023-09-15 18:55:28 +00:00
Andre601 df8a063369 .woodpecker/test.yml aktualisiert 2023-09-15 18:48:48 +00:00
Andre601 3fc4a788b8 Add missing \ 2023-09-15 18:36:28 +00:00
Andre601 15e5108ec7 Try without {} again 2023-09-15 18:35:33 +00:00
Andre601 b8fa694e26 .woodpecker/test.yml aktualisiert 2023-09-15 18:32:19 +00:00
Andre601 f1b55cba79 try without auth 2023-09-15 18:30:11 +00:00
Andre601 e76dd78cd5 Try "${token}" format again 2023-09-15 18:28:42 +00:00
Andre601 09a668493b try this 2023-09-15 18:27:50 +00:00
Andre601 1ef466d2a4 Try single quotes 2023-09-15 18:19:51 +00:00
Andre601 e15ddbf2d4 Try this format? 2023-09-15 18:16:24 +00:00
Andre601 1c0ce073e5 Try "| ." again 2023-09-15 18:14:24 +00:00
Andre601 5964be18ed .woodpecker/test.yml aktualisiert 2023-09-15 18:13:11 +00:00
Andre601 06ad4f106b Try former select syntax 2023-09-15 18:12:05 +00:00
Andre601 adf343468f try --anyauth 2023-09-15 18:10:06 +00:00
Andre601 5a0bb3ce03 Try this structure 2023-09-15 16:14:23 +00:00
Andre601 b3edb2833e Create test for curl setu 2023-09-15 16:12:04 +00:00
Andre601 83c2017544 .woodpecker/publish_assets.yml aktualisiert 2023-09-15 11:46:45 +00:00
Andre601 42ecf8ec2a Create github release creation step 2023-09-15 11:41:28 +00:00
Andre601 fe53c28f77 Re-add release workflow 2023-09-15 11:33:36 +00:00
Andre601 44e8b395f5 .woodpecker/renovate.yml aktualisiert 2023-09-15 00:12:47 +00:00
Andre601 13828897a2 Merge pull request 'Update dependency net.kyori:adventure-api to v4.14.0' (#138) from renovate/net.kyori-adventure-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/138
2023-09-15 00:08:18 +00:00
Andre601 965a9898ca Merge pull request 'Update dependency dev.masecla:Modrinth4J to v2.2.0' (#137) from renovate/dev.masecla-modrinth4j-2.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/137
2023-09-15 00:07:49 +00:00
Andre601's Renovate Bot d3c9d1e7e2 Update dependency net.kyori:adventure-api to v4.14.0 2023-09-15 00:03:11 +00:00
Andre601's Renovate Bot ff3df14a90 Update dependency dev.masecla:Modrinth4J to v2.2.0 2023-09-15 00:03:08 +00:00
Andre601 374f477645 Merge pull request 'Update dependency com.squareup.okhttp3:okhttp to v4.11.0' (#136) from renovate/com.squareup.okhttp3-okhttp-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/136
2023-09-14 00:04:07 +00:00
Andre601 11bcbc7918 Merge branch 'master' into renovate/com.squareup.okhttp3-okhttp-4.x 2023-09-14 00:03:55 +00:00
Andre601 f91f77dba0 Merge pull request 'Update dependency com.comphenix.protocol:ProtocolLib to v5.1.0' (#135) from renovate/com.comphenix.protocol-protocollib-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/135
2023-09-14 00:03:36 +00:00
Andre601's Renovate Bot ac36bc7c6c Update dependency com.squareup.okhttp3:okhttp to v4.11.0 2023-09-14 00:03:14 +00:00
Andre601's Renovate Bot 184aa7cd83 Update dependency com.comphenix.protocol:ProtocolLib to v5.1.0 2023-09-14 00:02:08 +00:00
Andre601 e20a80b410 Merge pull request 'Update dependency org.bstats:bstats-bungeecord to v3.0.2' (#134) from renovate/org.bstats-bstats-bungeecord-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/134
2023-09-13 19:44:52 +00:00
Andre601 43f5cbdcf1 Merge branch 'master' into renovate/org.bstats-bstats-bungeecord-3.x 2023-09-13 19:44:43 +00:00
Andre601 7c8d6067f5 Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.4.11' (#133) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/133
2023-09-13 19:41:51 +00:00
Andre601 5500239146 Merge branch 'master' into renovate/ch.qos.logback-logback-classic-1.x 2023-09-13 19:38:23 +00:00
Andre601 62844f3111 renovate.json aktualisiert 2023-09-13 19:37:24 +00:00
Andre601 37df1c6376 .woodpecker/renovate.yml aktualisiert 2023-09-13 19:25:08 +00:00
Andre601 abe1dea027 Disable dryrun for now 2023-09-13 19:24:47 +00:00
Andre601 66500050fe .woodpecker/renovate.yml aktualisiert 2023-09-13 19:24:06 +00:00
Andre601's Renovate Bot 2bc2f11fb1 Update dependency org.bstats:bstats-bungeecord to v3.0.2 2023-09-13 19:22:01 +00:00
Andre601's Renovate Bot 4b88c78036 Update dependency ch.qos.logback:logback-classic to v1.4.11 2023-09-13 19:21:57 +00:00
Andre601 5a98301b7d Merge pull request 'Configure Renovate' (#132) from renovate/configure into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/132
2023-09-13 19:19:37 +00:00
Andre601's Renovate Bot 2cf7fd4ffc Add renovate.json 2023-09-13 19:16:06 +00:00
Andre601 83349e1c37 Include git author 2023-09-13 19:13:33 +00:00
Andre601 d928991ca5 Add chmod 2023-09-13 18:32:01 +00:00
Andre601 8b3cd0fcee Setup git configuration 2023-09-13 18:31:11 +00:00
Andre601 2afd7483df steps, not pipeline 2023-09-13 18:25:09 +00:00
Andre601 ae108d1bed indent fix 2023-09-13 18:24:40 +00:00
Andre601 37e343e92e Create renovate.yml 2023-09-13 18:24:02 +00:00
Andre601 8b01a12ef9 Add admonition box to inform of moved wiki 2023-09-13 00:29:24 +02:00
Andre601 91ea80fbde Update docs 2023-09-12 22:04:49 +02:00
Andre601 deec676180 Fix wrong platforms for papiproxybridge 2023-09-12 19:57:49 +00:00
Andre601 5fb22a505f typo 2023-09-12 19:07:04 +00:00
Andre601 539a1300d2 Don't use gh-pages branch 2023-09-12 19:00:48 +00:00
Andre601 915fe7b134 .github/workflows/release.yml gelöscht 2023-09-12 18:46:21 +00:00
Andre601 da393a66c1 .github/workflows/pr-comment.yml gelöscht 2023-09-12 18:46:17 +00:00
Andre601 6563b93721 .github/workflows/create-pr-artifact.yml gelöscht 2023-09-12 18:46:11 +00:00
Andre601 c8e51ab82e .woodpecker/push_to_github.yml gelöscht 2023-09-12 18:45:51 +00:00
Andre601 435fbe721d typo 2023-09-12 18:35:05 +00:00
Andre601 3677e90ad1 Try this aproach 2023-09-12 18:33:01 +00:00
Andre601 cd96a87028 Bump mkdocs-material to 9.3.1 2023-09-12 18:29:46 +00:00
Andre601 3b1e5244e4 Try this syntax for jq 2023-09-12 13:57:44 +00:00
Andre601 07a1baff36 Merge pull request 'Create setup for GitHub hosted docs' (#131) from feature/improve-github-hosted-docs into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/131
2023-09-12 12:49:07 +00:00
Andre601 c87f6d5a0d Merge branch 'master' into feature/improve-github-hosted-docs 2023-09-12 12:48:31 +00:00
Andre601 36f6c41059 Fix workflow not having any upstream 2023-09-12 12:48:17 +00:00
Andre601 fa0170fa16 Add env variable to github workflow 2023-09-12 12:47:02 +00:00
Andre601 c66936861f Wrap entire announce block in if check 2023-09-12 12:43:38 +00:00
Andre601 8933c39ce0 Create option for env 2023-09-12 12:42:44 +00:00
Andre601 34865b5bb8 Create setup for GitHub hosted docs 2023-09-12 12:38:31 +00:00
Andre601 271ebed7b6 Setup basic github -> Codeberg mirror 2023-09-12 12:31:56 +00:00
Andre601 08e7eca34f Remove the System.exit at end of Modrinth upload 2023-09-12 00:10:02 +02:00
Andre601 0162bcdaaf Change dependency declaration for Modrinth 2023-09-11 23:47:46 +02:00
Andre601 39e76862d5 Add log message for ModrinthVersionUploader 2023-09-11 23:37:09 +02:00
Andre601 a7aeffa52a Go back to using placeholders 2023-09-11 23:31:20 +02:00
Andre601 9f847ca1db Change okhttp scope to compile 2023-09-11 23:26:14 +02:00
Andre601 6f4a429123 Disable uploadFile for now 2023-09-11 21:23:14 +00:00
Andre601 60db6eb445 Use badouralix/curl-jq 2023-09-11 21:20:20 +00:00
Andre601 5c06fec00a Try this setup... 2023-09-11 21:16:30 +00:00
Andre601 12eb80d4d7 Fetch release info from Codeberg through VersionUploader 2023-09-11 23:14:05 +02:00
Andre601 c371bf323c .woodpecker/publish_assets.yml aktualisiert 2023-09-11 20:23:45 +00:00
Andre601 8dca20c73d Use maven:3.9.4-eclipse-temurin-17 for building the jars 2023-09-11 20:05:10 +00:00
Andre601 aabfb5273e Merge pull request 'Add support for Maintenance plugin' (#130) from feature/add-maintenance-plugin-support into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/130
2023-09-11 19:44:08 +00:00
Andre601 a282382402 Bump version 2023-09-11 21:42:28 +02:00
Andre601 e86733052b Remove commit from file name 2023-09-11 21:41:57 +02:00
Andre601 a112036c2e Add dependency for Maintenance 2023-09-11 21:39:36 +02:00
Andre601 6c07bfb5a3 Move API reference a bit 2023-09-11 17:08:34 +02:00
Andre601 7668a3e881 Merge branch 'master' into feature/add-maintenance-plugin-support 2023-09-11 16:13:39 +02:00
Andre601 f53f2c724d Update dependency list and also use resource filtering for file paths 2023-09-11 15:35:17 +02:00
Andre601 5ea6f9307c Override title to remove record prefix from ProfileEntry 2023-09-11 09:53:57 +00:00
Andre601 8bdaa232ca Use Promis.all([...]) 2023-09-11 00:12:27 +02:00
Andre601 1ad945a1a9 Use a proxy to fetch codeberg stats 2023-09-10 23:23:52 +02:00
Andre601 85d11e7896 Add support for Maintenance plugin 2023-09-10 22:47:07 +02:00
Andre601 bcd940d808 Add stats fetching to docs 2023-09-10 21:47:42 +02:00
Andre601 dd837b96e8 Smaller changes to VersionUploader 2023-09-08 23:04:26 +02:00
Andre601 57295756fc Update URLs 2023-09-07 21:57:58 +00:00
Andre601 9f1307f559 Only trigger on master branch 2023-09-07 21:52:42 +00:00
Andre601 c489764b06 Only trigger on specific paths 2023-09-07 21:52:04 +00:00
Andre601 845b1b2022 Fix list for ProfileEntry.Builder#setFavicon(String) 2023-09-07 21:38:09 +00:00
Andre601 3662a66ec9 Try this x3 2023-09-07 21:15:50 +00:00
Andre601 e1e0083633 Try this x2 2023-09-07 21:13:27 +00:00
Andre601 58e4624cf5 Try this 2023-09-07 21:12:09 +00:00
Andre601 df069ebcdc Create publish_docs.yml 2023-09-07 21:03:53 +00:00
Andre601 82f2c476d8 Add domains file 2023-09-07 20:42:54 +00:00
Andre601 3545cac908 Update main class path 2023-09-07 20:28:36 +00:00
Andre601 cb95b833e6 Some smaller changes 2023-09-07 21:59:13 +02:00
Andre601 e2c1c44537 Merge pull request 'feature/move-to-codeberg' (#129) from feature/move-to-codeberg into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/129
2023-09-07 19:51:57 +00:00
Andre601 aeb0587263 Merge branch 'master' into feature/move-to-codeberg 2023-09-07 19:51:35 +00:00
Andre601 3471876687 Fix up release name and missing PlatformInfo data 2023-09-07 21:50:49 +02:00
Andre601 82d58564ee Change HangarUploader to VersionUploader 2023-09-07 21:45:56 +02:00
Andre601 d3918a487a Don't set var for CI_COMMIT_TAG 2023-09-06 19:46:36 +00:00
Andre601 a25232be6a Use echo 2023-09-06 19:43:21 +00:00
Andre601 bfa05f943a .woodpecker/sync_mirror.yml gelöscht 2023-09-06 19:07:39 +00:00
Andre601 dc40a54999 .woodpecker/create_gh_release.yml gelöscht 2023-09-06 19:07:34 +00:00
Andre601 682621e196 Handle Modrinth and Hangar on Codeberg alone. 2023-09-06 19:05:30 +00:00
Andre601 41fa678591 .woodpecker/publish_assets.yml aktualisiert 2023-09-06 11:09:15 +00:00
Andre601 e7557da944 Bump mkdocs-material to 9.2.8 2023-09-04 22:16:40 +02:00
Andre601 c7c9885e18 Also run sync_mirror on tag event 2023-09-04 18:54:00 +00:00
Andre_601 62c665a598 Merge pull request #131 from Andre601/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-09-04 18:18:55 +02:00
dependabot[bot] 6d687d391d Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 15:50:49 +00:00
Andre_601 2ac6b89368 Merge pull request #130 from Andre601/dependabot/pip/mkdocs-material-9.2.7
Bump mkdocs-material from 9.2.6 to 9.2.7
2023-09-04 17:14:24 +02:00
dependabot[bot] b8d4829e02 Bump mkdocs-material from 9.2.6 to 9.2.7
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.2.6 to 9.2.7.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.2.6...9.2.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 15:08:51 +00:00
Andre601 a9b4355ebf Update wiki link in issue selector 2023-09-04 00:01:58 +02:00
Andre601 b7f3ecdc5d Use macros for reference docs + update issue templates 2023-09-03 23:58:26 +02:00
Andre601 0428280480 Further changes to API docs generation 2023-09-02 19:15:30 +02:00
Andre_601 31e7fb9a22 Merge pull request #129 from Andre601/dependabot/pip/mkdocs-material-9.2.6
Bump mkdocs-material from 9.2.5 to 9.2.6
2023-08-31 18:01:34 +02:00
dependabot[bot] b3fc768ea7 Bump mkdocs-material from 9.2.5 to 9.2.6
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.2.5 to 9.2.6.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.2.5...9.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-31 16:00:30 +00:00
Andre601 7b990e798d Add missing abstract attribute to parsePlaceholder 2023-08-31 14:16:13 +02:00
Andre601 7e1e00d246 Move and update .schema.md 2023-08-30 20:08:02 +02:00
Andre601 15677e948d Create templates for semi-automatic doc generation 2023-08-30 19:48:53 +02:00
Andre601 457f85d697 Make sure publish_assets runs after sync_mirror on a release 2023-08-29 14:04:21 +00:00
Andre601 f3a3df648f Create mirror action for hopefully better cb->gh mirror 2023-08-29 14:00:09 +00:00
Andre601 000f3dd680 Update copyright footer 2023-08-29 15:45:01 +02:00
Andre601 db3b0e39b5 Add inheritance notes 2023-08-29 15:30:38 +02:00
Andre601 e5a5cf9f7e [Docs] Add missing abstract label to parsePlaceholder 2023-08-29 14:40:51 +02:00
Andre601 0c3853de2b Fix outdated link in footer 2023-08-29 14:27:12 +02:00
Andre601 0146e594de Fix wrong link in PlaceholderProvider 2023-08-29 03:04:56 +02:00
Andre601 1a790bca41 Add API reference pages 2023-08-29 02:54:53 +02:00
Andre601 fc039ebe93 Bump mkdocs-material to 9.2.5 and add page icons 2023-08-28 15:47:18 +02:00
Andre601 22561f6848 Merge pull request 'Improve docs' (#128) from docs/improvements into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/128
2023-08-28 01:25:39 +00:00
Andre601 8a7ccc07ae Add diff view 2023-08-28 01:25:30 +00:00
Andre601 b43f7b9f31 Add diff view 2023-08-28 01:23:50 +00:00
Andre601 69b3086c65 Improve docs 2023-08-28 01:18:27 +00:00
Andre601 e5b05b5859 Add commands page 2023-08-28 01:14:43 +00:00
Andre601 a07994adb1 Typo 2023-08-28 01:13:15 +00:00
Andre601 8d83b45657 Add pages to nav 2023-08-28 01:11:35 +00:00
Andre601 22371715c5 Merge pull request 'Add migration guides' (#127) from docs/add-migration-guides into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/127
2023-08-28 01:09:35 +00:00
Andre601 8a7d042476 docs/migration/v1_9_0-to-v1_10_0.md hinzugefügt 2023-08-28 01:09:11 +00:00
Andre601 26205cdd67 Add v1.5.3 to v1.6.0 guide 2023-08-28 01:01:24 +00:00
Andre601 ccb9cd5522 Add migration guides 2023-08-28 00:46:20 +00:00
Andre601 2383214b7e Bump mkdocs-material to 9.2.3 2023-08-23 00:18:58 +00:00
Andre601 a82b6bf0e9 Merge pull request 'fix/docs' (#126) from fix/docs into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/126
2023-08-23 00:10:35 +00:00
Andre601 3e541e65ed docs/profiles/formatting.md aktualisiert 2023-08-23 00:10:10 +00:00
Andre601 314becdc45 docs/examples.md aktualisiert 2023-08-22 23:59:24 +00:00
Andre601 8f662ced5c Use {} format for matrix variables. 2023-08-22 12:47:00 +00:00
Andre601 3ff782e128 Rename step 2023-08-22 12:13:24 +00:00
Andre601 6a6a708ee7 Obtain release changelog from codeberg. 2023-08-22 12:12:47 +00:00
Andre601 1751a77e6f Add depends_on 2023-08-11 14:25:38 +00:00
Andre601 3069244f21 „.woodpecker/create_gh_release.yml“ ändern 2023-08-04 16:56:10 +00:00
Andre601 99d4232304 Create file for gh release creation 2023-08-04 16:44:57 +00:00
Andre601 ec408316bd Don't use GitHub setup here 2023-08-04 16:39:35 +00:00
Andre601 eee5271966 Add token auth header to avoid rate limits(?) 2023-08-04 16:33:30 +00:00
Andre601 34e4816517 First step towards Codeberg migration 2023-08-04 16:30:15 +00:00
Andre601 7bde6dedb5 Improve HangarUploader 2023-08-02 00:45:37 +02:00
Andre_601 6864f57917 Remove Spigot badge 2023-08-01 18:30:14 +02:00
Andre_601 0b705ca897 Merge pull request #125 from Andre601/dependabot/maven/core/com.google.guava-guava-32.1.2-jre
Bump com.google.guava:guava from 32.1.1-jre to 32.1.2-jre in /core
2023-08-01 17:18:45 +02:00
dependabot[bot] 4661d72f8c Bump com.google.guava:guava from 32.1.1-jre to 32.1.2-jre in /core
Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.1-jre to 32.1.2-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 15:11:06 +00:00
Andre601 2b7053c724 Don't clear caches on reload 2023-07-30 19:26:45 +02:00
Andre_601 8d81367354 Update docs URLs 2023-07-29 22:32:52 +02:00
Andre_601 facb358404 Update docs URLs 2023-07-29 22:32:02 +02:00
Andre601 fd49e101ca Update HangarUploader 2023-07-28 19:37:47 +02:00
Andre_601 a55e19bb4a Add dependencies 2023-07-28 19:10:16 +02:00
Andre_601 07c1893895 Merge pull request #115 from Andre601/feature/papiproxybridge-support
PAPIProxyBridge support
2023-07-28 18:53:22 +02:00
Andre_601 eed3c37bcb Merge branch 'master' into feature/papiproxybridge-support 2023-07-28 18:50:05 +02:00
Andre601 42d9a54668 Add PAPIProxyBridge as soft-depend 2023-07-28 18:46:26 +02:00
Andre601 51811452fd Use PAPIProxyBridge v1.3 2023-07-28 18:38:50 +02:00
Andre_601 0b21958826 Merge pull request #124 from Andre601/dependabot/pip/mkdocs-material-9.1.21
Bump mkdocs-material from 9.1.20 to 9.1.21
2023-07-28 18:05:41 +02:00
dependabot[bot] f3fdc68dce Bump mkdocs-material from 9.1.20 to 9.1.21
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.20 to 9.1.21.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.20...9.1.21)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-28 16:03:00 +00:00
Andre_601 3b76a2abdd Merge pull request #123 from Andre601/dependabot/pip/mkdocs-material-9.1.20
Bump mkdocs-material from 9.1.19 to 9.1.20
2023-07-27 17:51:30 +02:00
dependabot[bot] 87964d42a7 Bump mkdocs-material from 9.1.19 to 9.1.20
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.19 to 9.1.20.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.19...9.1.20)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-27 15:48:19 +00:00
Andre_601 2529195097 Merge pull request #122 from Andre601/dependabot/maven/core/com.unascribed-flexver-java-1.1.1
Bump com.unascribed:flexver-java from 1.1.0 to 1.1.1 in /core
2023-07-24 17:33:22 +02:00
dependabot[bot] 62e54fe9ea Bump com.unascribed:flexver-java from 1.1.0 to 1.1.1 in /core
Bumps com.unascribed:flexver-java from 1.1.0 to 1.1.1.

---
updated-dependencies:
- dependency-name: com.unascribed:flexver-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 15:30:05 +00:00
Andre_601 ad49a0659e Add Folia to supported loaders$ 2023-07-24 01:09:33 +02:00
Andre_601 a703fba542 [Docs] More indent fixes 2023-07-22 17:17:54 +02:00
Andre_601 bc57b549d5 [API] Fix wrong indent in changelog 2023-07-22 17:15:19 +02:00
Andre_601 eed64e0f60 Fix wrong artifactId 2023-07-22 17:10:31 +02:00
Andre_601 a673050489 Merge pull request #121 from Andre601/dependabot/pip/mkdocs-material-9.1.19
Bump mkdocs-material from 9.1.18 to 9.1.19
2023-07-18 17:23:24 +02:00
dependabot[bot] d07890112d Bump mkdocs-material from 9.1.18 to 9.1.19
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.18 to 9.1.19.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.18...9.1.19)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 15:20:59 +00:00
Andre601 9cbd7fb6b7 Fix rare NPE for gson.fromJson in PlayerHandler 2023-07-15 23:47:09 +02:00
Andre601 5055c89cde Implement cache for last used server. 2023-07-15 23:22:53 +02:00
Andre601 eb04cab549 Remove unused getStringList method 2023-07-10 19:44:02 +02:00
Andre601 db2e56a382 Move PAPI stuff to dedicated class. 2023-07-10 14:49:14 +02:00
Andre_601 71313afb01 Merge pull request #119 from Andre601/dependabot/maven/core/com.google.guava-guava-32.1.1-jre
Bump guava from 32.0.1-jre to 32.1.1-jre in /core
2023-07-03 17:36:42 +02:00
Andre_601 039f2f7b8a Merge pull request #118 from Andre601/dependabot/pip/mkdocs-material-9.1.18
Bump mkdocs-material from 9.1.17 to 9.1.18
2023-07-03 17:36:10 +02:00
dependabot[bot] b34c7b3cec Bump guava from 32.0.1-jre to 32.1.1-jre in /core
Bumps [guava](https://github.com/google/guava) from 32.0.1-jre to 32.1.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 15:33:34 +00:00
dependabot[bot] 40e1fb1f02 Bump mkdocs-material from 9.1.17 to 9.1.18
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.17 to 9.1.18.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.17...9.1.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 15:18:43 +00:00
Andre_601 9292a46a86 Merge pull request #116 from Andre601/dependabot/pip/mkdocs-material-9.1.17
Bump mkdocs-material from 9.1.16 to 9.1.17
2023-06-26 19:13:18 +02:00
dependabot[bot] fbb7e0f103 Bump mkdocs-material from 9.1.16 to 9.1.17
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.16 to 9.1.17.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.16...9.1.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 16:04:25 +00:00
Andre_601 c6b6187fe8 Create labeler.yml 2023-06-24 13:29:48 +02:00
Andre601 937929c3c5 PAPIProxyBridge support 2023-06-23 20:34:15 +02:00
Andre601 04534e18c3 Make sure api-version is a string 2023-06-23 17:35:48 +02:00
Andre_601 6a3adee315 Merge pull request #114 from Andre601/dependabot/maven/bukkit/org.apache.maven.plugins-maven-shade-plugin-3.5.0
Bump maven-shade-plugin from 3.4.1 to 3.5.0 in /bukkit
2023-06-19 18:28:07 +02:00
Andre_601 dddea9c022 Merge pull request #113 from Andre601/dependabot/maven/velocity/org.apache.maven.plugins-maven-shade-plugin-3.5.0
Bump maven-shade-plugin from 3.4.1 to 3.5.0 in /velocity
2023-06-19 18:27:53 +02:00
dependabot[bot] a5029f22ad Bump maven-shade-plugin from 3.4.1 to 3.5.0 in /bukkit
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.1...maven-shade-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 16:08:13 +00:00
dependabot[bot] e425ae4ce3 Bump maven-shade-plugin from 3.4.1 to 3.5.0 in /velocity
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.1...maven-shade-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 16:01:30 +00:00
Andre_601 48163610a4 Make note about priority and conditions more clear 2023-06-19 15:24:47 +02:00
Andre_601 78fc37c2d7 Add missing whitelistEnabled placeholder 2023-06-18 16:18:36 +02:00
Andre_601 61aceb3fe8 Merge pull request #112 from Andre601/feature/new-placeholder-features
Allow multiple servers/worlds for playersOnline, add whitelistEnabled for spigot/paper and config backup on migration.
2023-06-18 15:52:04 +02:00
Andre601 2ccb2a470f Use the right method for whitelistEnabled
+ config migrator backup
2023-06-18 15:44:37 +02:00
Andre601 849ea169a2 Make backups during config migrations. 2023-06-18 15:34:06 +02:00
Andre601 da7ae22535 Allow multiple worlds/Servers for playersOnline 2023-06-18 15:12:47 +02:00
Andre_601 fbd8d9fffa Merge pull request #110 from Andre601/dependabot/maven/bungeecord/org.apache.maven.plugins-maven-shade-plugin-3.5.0
Bump maven-shade-plugin from 3.4.1 to 3.5.0 in /bungeecord
2023-06-16 18:05:14 +02:00
Andre_601 df10bdcc65 Merge pull request #109 from Andre601/dependabot/maven/core/org.apache.maven.plugins-maven-shade-plugin-3.5.0
Bump maven-shade-plugin from 3.4.1 to 3.5.0 in /core
2023-06-16 18:05:00 +02:00
dependabot[bot] da1ada5a10 Bump maven-shade-plugin from 3.4.1 to 3.5.0 in /bungeecord
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.1...maven-shade-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-16 15:59:58 +00:00
dependabot[bot] 21f083dda1 Bump maven-shade-plugin from 3.4.1 to 3.5.0 in /core
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.1...maven-shade-plugin-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-16 15:59:44 +00:00
Andre_601 e7882d1be8 Include GitHub Actions account in git 2023-06-15 22:39:59 +02:00
Andre_601 81ed3a441f Merge pull request #108 from Andre601/dependabot/pip/mkdocs-material-9.1.16
Bump mkdocs-material from 9.1.15 to 9.1.16
2023-06-15 18:16:41 +02:00
dependabot[bot] 41381f498e Bump mkdocs-material from 9.1.15 to 9.1.16
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.15 to 9.1.16.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.15...9.1.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 16:02:48 +00:00
Andre601 e669a995a7 Include 1.20 in HangarUploader 2023-06-12 17:21:17 +02:00
Andre601 aad10a1146 Fix broken version check for config 2023-06-11 21:38:29 +02:00
Andre601 eb4455797a Force a block-style for sections 2023-06-11 21:35:02 +02:00
Andre601 02f1e68522 Fix some ConfigMigrator stuff 2023-06-11 21:30:31 +02:00
Andre_601 933d5f1e48 Merge pull request #96 from Andre601/feature/more-placeholders
Add Server placeholder options
2023-06-11 20:56:59 +02:00
Andre601 50e2fa95bf Bump API version 2023-06-11 20:52:00 +02:00
Andre_601 c908e6dc21 Merge pull request #105 from Andre601/feature/paper-plugin-changes
Use new Paper plugin dependency structure
2023-06-11 20:51:26 +02:00
Andre601 ccbe2afffb Add small comment 2023-06-11 20:42:02 +02:00
Andre_601 3d94259160 Merge pull request #107 from Andre601/dependabot/maven/core/com.google.guava-guava-32.0.1-jre
Bump guava from 32.0.0-jre to 32.0.1-jre in /core
2023-06-09 21:26:56 +02:00
Andre_601 ee6d596493 Fix wrong URL 2023-06-09 21:26:29 +02:00
dependabot[bot] 8c608b60bd Bump guava from 32.0.0-jre to 32.0.1-jre in /core
Bumps [guava](https://github.com/google/guava) from 32.0.0-jre to 32.0.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-09 16:00:07 +00:00
Andre_601 2b5e7d98c8 Update success.md 2023-06-08 22:43:20 +02:00
Andre_601 ee6e879c08 Use nightly.link 2023-06-08 22:42:56 +02:00
Andre_601 639084806a Update MODRINTH.md 2023-06-08 17:48:56 +02:00
Andre_601 74a929d0ad Add note about adventure online tool 2023-06-08 17:44:38 +02:00
Andre_601 5caffcb49a Merge pull request #106 from Andre601/dependabot/maven/bukkit/com.viaversion-viaversion-api-4.7.0
Bump viaversion-api from 4.6.2 to 4.7.0 in /bukkit
2023-06-07 20:09:56 +02:00
dependabot[bot] ce73d3c0e7 Bump viaversion-api from 4.6.2 to 4.7.0 in /bukkit
Bumps viaversion-api from 4.6.2 to 4.7.0.

---
updated-dependencies:
- dependency-name: com.viaversion:viaversion-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 18:00:25 +00:00
Andre_601 a0b59aecc8 Merge pull request #104 from Andre601/dependabot/maven/core/net.kyori-adventure-text-serializer-legacy-4.14.0
Bump adventure-text-serializer-legacy from 4.13.1 to 4.14.0 in /core
2023-06-07 19:43:37 +02:00
Andre_601 3758a99ae2 Update checked modules 2023-06-07 19:42:21 +02:00
Andre_601 1f45f5c3e5 Merge pull request #103 from Andre601/dependabot/maven/core/net.kyori-adventure-text-minimessage-4.14.0
Bump adventure-text-minimessage from 4.13.1 to 4.14.0 in /core
2023-06-07 19:41:05 +02:00
Andre_601 937dc93366 Merge pull request #102 from Andre601/dependabot/maven/core/net.kyori-adventure-api-4.14.0
Bump adventure-api from 4.13.1 to 4.14.0 in /core
2023-06-07 19:38:35 +02:00
Andre601 b4dffedd09 Use new Paper plugin dependency structure 2023-06-07 19:24:46 +02:00
dependabot[bot] ae1e16ca8b Bump adventure-text-serializer-legacy from 4.13.1 to 4.14.0 in /core
Bumps [adventure-text-serializer-legacy](https://github.com/KyoriPowered/adventure) from 4.13.1 to 4.14.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.13.1...v4.14.0)

---
updated-dependencies:
- dependency-name: net.kyori:adventure-text-serializer-legacy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 16:00:18 +00:00
dependabot[bot] 775482ea0f Bump adventure-text-minimessage from 4.13.1 to 4.14.0 in /core
Bumps [adventure-text-minimessage](https://github.com/KyoriPowered/adventure) from 4.13.1 to 4.14.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.13.1...v4.14.0)

---
updated-dependencies:
- dependency-name: net.kyori:adventure-text-minimessage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 16:00:15 +00:00
dependabot[bot] 6fa848f730 Bump adventure-api from 4.13.1 to 4.14.0 in /core
Bumps [adventure-api](https://github.com/KyoriPowered/adventure) from 4.13.1 to 4.14.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.13.1...v4.14.0)

---
updated-dependencies:
- dependency-name: net.kyori:adventure-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 16:00:10 +00:00
Andre_601 6a1d720f08 Merge branch 'master' into feature/more-placeholders 2023-05-30 00:07:05 +02:00
Andre_601 7d72af0e44 Fix protocollib version 2023-05-29 18:06:27 +02:00
Andre_601 ef1a34bdec Merge pull request #100 from Andre601/dependabot/maven/core/com.google.guava-guava-32.0.0-jre
Bump guava from 31.1-jre to 32.0.0-jre in /core
2023-05-29 18:05:42 +02:00
Andre_601 c30334d2af Merge pull request #101 from Andre601/dependabot/pip/mkdocs-material-9.1.15
Bump mkdocs-material from 9.1.14 to 9.1.15
2023-05-29 18:05:34 +02:00
dependabot[bot] da71fc0af9 Bump mkdocs-material from 9.1.14 to 9.1.15
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.14 to 9.1.15.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.14...9.1.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 16:04:35 +00:00
dependabot[bot] f5ff4702e5 Bump guava from 31.1-jre to 32.0.0-jre in /core
Bumps [guava](https://github.com/google/guava) from 31.1-jre to 32.0.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 16:02:52 +00:00
Andre601 257031827d Try 5.0.0 of ProtocolLib 2023-05-29 00:37:59 +02:00
Andre601 5e9c6f43fe Merge branch 'master' into feature/more-placeholders 2023-05-29 00:31:27 +02:00
Andre601 bfc76290a7 Populate map on Server Load 2023-05-27 21:58:24 +02:00
Andre_601 4d8139bb3e Merge pull request #99 from Andre601/dependabot/pip/mkdocs-material-9.1.14
Bump mkdocs-material from 9.1.13 to 9.1.14
2023-05-22 18:42:54 +02:00
dependabot[bot] 77cc783855 Bump mkdocs-material from 9.1.13 to 9.1.14
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.13 to 9.1.14.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.13...9.1.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 16:07:36 +00:00
Andre601 d01605ee47 Update API changelog 2023-05-22 01:27:52 +02:00
Andre601 8128f3e4af Use asl-api v3 2023-05-22 01:11:21 +02:00
Andre_601 10436a55bb Update to mc-publish 3.3 2023-05-20 12:23:26 +02:00
Andre601 740bf63afa remove broken import 2023-05-18 00:09:23 +02:00
Andre601 9508f34cc2 Cache worlds for Spigot and Paper 2023-05-17 23:59:40 +02:00
Andre_601 10de3a42f4 Merge pull request #98 from Andre601/dependabot/pip/mkdocs-material-9.1.13
Bump mkdocs-material from 9.1.12 to 9.1.13
2023-05-17 19:25:13 +02:00
dependabot[bot] 407008284b Bump mkdocs-material from 9.1.12 to 9.1.13
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.12 to 9.1.13.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.12...9.1.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-17 16:03:15 +00:00
Andre601 e2fd877e91 Add glightbox mkdocs plugin 2023-05-16 15:40:17 +02:00
Andre601 ca16f618d8 Add config migration + case-insensitive equals 2023-05-16 15:37:58 +02:00
Andre_601 80731117a3 Merge pull request #97 from Andre601/dependabot/pip/mkdocs-material-9.1.12
Bump mkdocs-material from 9.1.11 to 9.1.12
2023-05-12 18:19:29 +02:00
dependabot[bot] dc62ef0989 Bump mkdocs-material from 9.1.11 to 9.1.12
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.11 to 9.1.12.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.11...9.1.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-12 16:12:52 +00:00
Andre_601 13209e7a79 Add timezone indicator 2023-05-12 00:31:58 +02:00
Andre_601 8edb7b194a Add timezone 2023-05-12 00:30:35 +02:00
Andre_601 354b5f83b2 Update to latest template action 2023-05-12 00:22:35 +02:00
Andre_601 5e568c68c4 Update to latest template action 2023-05-12 00:22:16 +02:00
Andre601 5cc9678b5a Update docs 2023-05-10 11:31:20 +02:00
Andre601 ae5a5973aa Trigger Workflow 2023-05-10 11:03:59 +02:00
Andre_601 5a589b2297 Fix JSON paths 2023-05-10 11:03:56 +02:00
Andre601 e6bc14fca5 Trigger Workflow 2023-05-10 10:59:43 +02:00
Andre_601 95d67a270b Use different date 2023-05-10 10:59:35 +02:00
Andre601 559d5a2d9b Trigger Workflow 2023-05-10 10:55:54 +02:00
Andre_601 a60bffa04d Update template action 2023-05-10 10:37:44 +02:00
Andre_601 1a5dd75157 Update template action 2023-05-10 10:37:24 +02:00
Andre601 f5113d3d45 Trigger Workflow 2023-05-09 20:01:12 +02:00
Andre_601 cddd2dbeb7 Remove :funcs 2023-05-09 20:01:10 +02:00
Andre601 10da7c9eeb Trigger Workflow 2023-05-09 19:59:21 +02:00
Andre_601 e50bbf4620 Try newer commit SHA 2023-05-09 19:59:19 +02:00
Andre_601 fe1b6dc0e5 Try newer commit SHA 2023-05-09 19:59:05 +02:00
Andre601 a20acf5378 Trigger Workflow 2023-05-09 19:52:52 +02:00
Andre_601 1d74640d67 Update success.md 2023-05-09 19:52:39 +02:00
Andre_601 20e3f908f9 Use :funcs 2023-05-09 19:51:48 +02:00
Andre_601 8b2a499d20 use :funcs 2023-05-09 19:51:27 +02:00
Andre601 d8ba5ffaea Trigger Workflow 2023-05-09 18:35:19 +02:00
Andre_601 608c617b17 Remove - from placeholder 2023-05-09 18:34:41 +02:00
Andre_601 50d47a0c65 Don't use - I guess? 2023-05-09 18:33:37 +02:00
Andre601 1d41072767 Trigger Workflow 2023-05-09 18:30:42 +02:00
Andre_601 2ffd7f479b Checkout repo 2023-05-09 18:30:39 +02:00
Andre_601 38f1e4f21d Checkout repo 2023-05-09 18:30:03 +02:00
Andre601 33f29b5694 Trigger Workflow 2023-05-09 18:25:52 +02:00
Andre_601 4b6901467f Revert artifact info getting 2023-05-09 18:23:55 +02:00
Andre_601 62dc420d55 Prefix path with ./ 2023-05-09 18:20:02 +02:00
Andre_601 d7cb52d785 Try with ./ prefixed path 2023-05-09 18:19:11 +02:00
Andre_601 67bdd98a5b Merge pull request #86 from Andre601/feature/improve-pr-comment-action
Update pr-comment.yml
2023-05-09 18:10:21 +02:00
Andre_601 ffa0da8f1c Update building.md 2023-05-09 18:07:24 +02:00
Andre_601 abb2378bf2 Wrong location for the options 2023-05-09 18:06:02 +02:00
Andre_601 d10c6ffb78 Merge pull request #95 from Andre601/dependabot/pip/mkdocs-material-9.1.11
Bump mkdocs-material from 9.1.9 to 9.1.11
2023-05-09 18:05:36 +02:00
dependabot[bot] e2b4fdf72f Bump mkdocs-material from 9.1.9 to 9.1.11
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.9 to 9.1.11.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.1.9...9.1.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-09 16:03:25 +00:00
Andre_601 993c665445 Update failed.md 2023-05-09 18:00:52 +02:00
Andre_601 607b95b723 Update success.md 2023-05-09 18:00:18 +02:00
Andre_601 8476e72e9a Update failed.md 2023-05-09 17:54:35 +02:00
Andre_601 57b782d7d7 Update create-pr-artifact.yml 2023-05-09 17:53:31 +02:00
Andre_601 2dd3b04dbe Use experimental template action ver 2023-05-09 17:51:59 +02:00
Andre601 afa18b81fe Add Server placeholder options 2023-05-08 17:00:35 +02:00
Andre601 17357345ab Use old badge system + add template render 2023-04-17 00:09:30 +02:00
Andre_601 b9885c1249 Update building.md 2023-04-16 23:29:58 +02:00
Andre_601 e357f370e0 Update failed.md 2023-04-16 23:29:08 +02:00
Andre_601 d777ac84f0 Create success.md 2023-04-16 23:28:52 +02:00
Andre_601 5da627b1b6 Create failed.md 2023-04-16 23:24:10 +02:00
Andre_601 8ee063daec Merge pull request #87 from Andre601/feature/pr-comment-files
Create building.md
2023-04-16 23:19:47 +02:00
Andre_601 ad46149bb6 Create building.md 2023-04-16 23:18:50 +02:00
Andre_601 528226401f Update pr-comment.yml 2023-04-14 23:38:30 +02:00
167 changed files with 6368 additions and 2134 deletions

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ body:
Please make sure you've checked the following things first:
- You're using the latest release of AdvancedServerList [[Download from Modrinth](https://modrinth.com/plugin/advancedserverlist)] and the right API version.
- You're using a supported Proxy/Server version. As of right now is only 1.19.x supported.
- You're using a supported Proxy/Server version. As of right now is only 1.19+ supported.
- The Feature you suggest hasn't been suggested before.
- type: dropdown
attributes:
+1 -1
View File
@@ -9,7 +9,7 @@ body:
Please make sure you've checked the following things first:
- You're using the latest release of AdvancedServerList [[Download from Modrinth](https://modrinth.com/plugin/advancedserverlist)]
- You're using a supported Proxy/Server version. As of right now is only 1.19.x supported.
- You're using a supported Proxy/Server version. As of right now is only 1.19+ supported.
- The issue happens with just AdvancedServerList installed.
- type: dropdown
attributes:
+1 -1
View File
@@ -5,4 +5,4 @@ contact_links:
url: https://discord.gg/6dazXp6
- name: Wiki
about: Check the Wiki for explanations about the features and examples.
url: https://github.com/Andre601/AdvancedServerList/wiki
url: https://docs.andre601.ch/AdvancedServerList
+1 -1
View File
@@ -9,7 +9,7 @@ body:
Please make sure you've checked the following things first:
- You're using the latest release of AdvancedServerList [[Download from Modrinth](https://modrinth.com/plugin/advancedserverlist)]
- You're using a supported Proxy/Server version. As of right now is only 1.19.x supported.
- You're using a supported Proxy/Server version. As of right now is only 1.19+ supported.
- The Feature you suggest hasn't been suggested before.
- type: dropdown
attributes:
+30 -14
View File
@@ -4,19 +4,19 @@ AdvancedServerList is a plugin that allowys you to customize your server's MOTD,
## Supported Platforms
<a href="https://www.spigotmc.org" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/spigot_vector.svg" width="64" alt="platform-spigot" title="Tested on Spigot">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/spigot_vector.svg&w=64 alt="platform-spigot" title="Tested on Spigot">
</a>
<a href="https://papermc.io" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/paper_vector.svg" width="64" alt="platform-paper" title="Tested on Paper">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/paper_vector.svg&w=64 alt="platform-paper" title="Tested on Paper">
</a>
<a href="https://www.spigotmc.org" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/bungeecord_vector.svg" width="64" alt="platform-bungeecord" title="Tested on BungeeCord">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/bungeecord_vector.svg&w=64 alt="platform-bungeecord" title="Tested on BungeeCord">
</a>
<a href="https://www.papermc.io" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/waterfall_vector.svg" width="64" alt="platform-waterfall" title="Tested on Waterfall">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/waterfall_vector.svg&w=64 alt="platform-waterfall" title="Tested on Waterfall">
</a>
<a href="https://velocitypowered.com" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/velocity_vector.svg" width="64" alt="platform-velocity" title="Tested on Velocity">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/supported/velocity_vector.svg&w=64 alt="platform-velocity" title="Tested on Velocity">
</a>
## What is a Server List Profile?
@@ -24,12 +24,14 @@ A Server List Profile refers to a YAML file located in the plugin's `profiles` d
It allows you to configure specific aspects of the server display in the MC-Client's multiplayer server list, such as the MOTD, player count text, player count hover or Favicon.
> [*Read More*][profiles]
### Conditions
Thanks to conditions can you determine when a profile should be displayed in the player’s server list, to allow displaying specific text (i.e. a warning when they are using an outdated version).
When multiple profiles exist that have valid conditions will the one with the highest priority (Higher number = higher priority) be selected. Having no conditions makes the profile automatically return true.
> [*Read More*][conditions]
### Placeholders
Placeholders can be used within conditions to further customize them. They can also be used in any other text option (motd, playerCount and players) to display their respective values.
The format is `${<target> <identifier>}` which was adopted from BungeeTabListPlus. Depending on what platform you use the plugin on are only specific placeholders available.
@@ -37,17 +39,20 @@ The format is `${<target> <identifier>}` which was adopted from BungeeTabListPlu
When using the SpigotMC/PaperMC version can you also use placeholders from [PlaceholderAPI][placeholderapi] using its `%<identifier>_<values>%` placeholder format. PlaceholderAPI needs to be installed for that.
> [*Read More*][placeholders]
### Formatting
The plugin uses the MiniMessage format for a consistent, easy way of formatting your text.
Only certain options are usable for each option. As an example does motd support HEX colours and gradients, while the other options only support default colour codes.
> [*Read More*][minimessage]
## Dependencies
| Dependency | Platforms | Required? |
| ---------------- | ------------- | --------- |
|------------------|---------------|-----------|
| [ProtocolLib] | Spigot | Yes |
| [PlaceholderAPI] | Spigot, Paper | No |
| [ViaVersion] | Spigot, Paper | No |
## Statistics
@@ -58,31 +63,42 @@ You can disable this in the global bStats config file located in `/plugins/bstat
- [Paper/Spigot][bstats-spigot]
- [Velocity][bstats-velocity]
## Videos
Do you have your own video to share? Contact me and I will add it to this section.
<details><summary>Click to Show/Hide Videos</summary>
Spanish Video by Ajneb97
<iframe width="560" height="auto" src="https://www.youtube.com/embed/rIbljm_4HVI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</details>
## Screenshots
<a href="https://modrinth.com/plugin/advancedserverlist/gallery" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/documentation/modrinth-gallery_vector.svg" width="208" alt="gallery" title="Check out the Gallery">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/documentation/modrinth-gallery_vector.svg&w=208" alt="gallery" title="Check out the Gallery">
</a>
## Support
<a href="https://discord.gg/6dazXp6" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/social/discord-singular_vector.svg" width="64" alt="discord" title="Join my Discord Server">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/social/discord-singular_vector.svg&w=64" alt="discord" title="Join my Discord Server">
</a>
<a href="https://app.revolt.chat/invite/74TpERXA" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/social/revolt-singular_vector.svg" width="64" alt="revolt" title="Join my Revolt Server">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/social/revolt-singular_vector.svg&w=64" alt="revolt" title="Join my Revolt Server">
</a>
<a href="https://blobfox.coffee/@andre_601" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/social/mastodon-singular_vector.svg" width="64" alt="revolt" title="Chat with me on Mastodon">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact-minimal/social/mastodon-singular_vector.svg&w=64" alt="revolt" title="Chat with me on Mastodon">
</a>
<!-- Links -->
[profiles]: https://andre601.ch/AdvancedServerList/profiles
[conditions]: https://andre601.ch/AdvancedServerList/profiles/#conditions
[placeholders]: https://andre601.ch/AdvancedServerList/profiles/placeholders
[minimessage]: https://andre601.ch/AdvancedServerList/profiles/formatting
[profiles]: https://docs.andre601.ch/AdvancedServerList/latest/profiles
[conditions]: https://docs.andre601.ch/AdvancedServerList/latest/profiles/#conditions
[placeholders]: https://docs.andre601.ch/AdvancedServerList/latest/profiles/placeholders
[minimessage]: https://docs.andre601.ch/AdvancedServerList/latest/profiles/formatting
[protocollib]: https://www.spigotmc.org/resources/1997/
[placeholderapi]: https://www.spigotmc.org/resources/6245/
[viaversion]: https://www.spigotmc.org/resources/19254/
[bstats]: https://bstats.org
[bstats-bungee]: https://bstats.org/plugin/bungeecord/AdvancedServerList/15585
+7
View File
@@ -0,0 +1,7 @@
<!-- pr-build comment -->
![badge]
Building jar file from Pull request. Please wait...
[badge]: https://img.shields.io/badge/Building...-0d1117?style=for-the-badge&labelColor=7a8490&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNNC43NSAyaDE0LjVhLjc1Ljc1IDAgMCAxIDAgMS41aC0uNzV2Mi45ODJhNC43NSA0Ljc1IDAgMCAxLTIuMjE1IDQuMDE3bC0yLjA0NCAxLjI5YS4yNS4yNSAwIDAgMCAwIC40MjJsMi4wNDQgMS4yOWE0Ljc1IDQuNzUgMCAwIDEgMi4yMTUgNC4wMTdWMjAuNWguNzVhLjc1Ljc1IDAgMCAxIDAgMS41SDQuNzVhLjc1Ljc1IDAgMCAxIDAtMS41aC43NXYtMi45ODJhNC43NSA0Ljc1IDAgMCAxIDIuMjE1LTQuMDE3bDIuMDQ0LTEuMjlhLjI1LjI1IDAgMCAwIDAtLjQyMmwtMi4wNDQtMS4yOUE0Ljc1IDQuNzUgMCAwIDEgNS41IDYuNDgyVjMuNWgtLjc1YS43NS43NSAwIDAgMSAwLTEuNVpNMTcgMy41SDd2Mi45ODJBMy4yNSAzLjI1IDAgMCAwIDguNTE2IDkuMjNsMi4wNDQgMS4yOWExLjc1IDEuNzUgMCAwIDEgMCAyLjk2bC0yLjA0NCAxLjI5QTMuMjUgMy4yNSAwIDAgMCA3IDE3LjUxOFYyMC41aDEwdi0yLjk4MmEzLjI1IDMuMjUgMCAwIDAtMS41MTYtMi43NDhsLTIuMDQ0LTEuMjlhMS43NSAxLjc1IDAgMCAxIDAtMi45NmwyLjA0NC0xLjI5QTMuMjUgMy4yNSAwIDAgMCAxNyA2LjQ4MloiPjwvcGF0aD48L3N2Zz4=
+12
View File
@@ -0,0 +1,12 @@
<!-- pr-build comment -->
![badge]
**Compiling of jar files failed!**
Please check the logs below for any errors.
| Name | Link |
| ------ | -------------------------------- |
| Commit | {{ .commit }} |
| Logs | {{ .logs | mdlink "View Logs" }} |
[badge]: https://img.shields.io/badge/Build_Failure!-0d1117?style=for-the-badge&labelColor=f85149&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNNS43MiA1LjcyYS43NS43NSAwIDAgMSAxLjA2IDBMMTIgMTAuOTRsNS4yMi01LjIyYS43NDkuNzQ5IDAgMCAxIDEuMjc1LjMyNi43NDkuNzQ5IDAgMCAxLS4yMTUuNzM0TDEzLjA2IDEybDUuMjIgNS4yMmEuNzQ5Ljc0OSAwIDAgMS0uMzI2IDEuMjc1Ljc0OS43NDkgMCAwIDEtLjczNC0uMjE1TDEyIDEzLjA2bC01LjIyIDUuMjJhLjc1MS43NTEgMCAwIDEtMS4wNDItLjAxOC43NTEuNzUxIDAgMCAxLS4wMTgtMS4wNDJMMTAuOTQgMTIgNS43MiA2Ljc4YS43NS43NSAwIDAgMSAwLTEuMDZaIj48L3BhdGg+PC9zdmc+
+15
View File
@@ -0,0 +1,15 @@
<!-- pr-build comment -->
![badge]
The compiling of the jar files was successful!
You can find a direct download for the artifact below.
File expires: `{{ .expire | date "02 Jan 2006 15:04 MST" }}`
| Name | Link |
| -------- | -------------------------------------------- |
| Commit | {{ .commit }} |
| Logs | {{ .logs | mdlink "View Logs" }} |
| Download | {{ .download | mdlink "Download Artifact" }} |
[badge]: https://img.shields.io/badge/Build_Success!-0d1117?style=for-the-badge&labelColor=3fb950&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNMjEuMDMgNS43MmEuNzUuNzUgMCAwIDEgMCAxLjA2bC0xMS41IDExLjVhLjc0Ny43NDcgMCAwIDEtMS4wNzItLjAxMmwtNS41LTUuNzVhLjc1Ljc1IDAgMSAxIDEuMDg0LTEuMDM2bDQuOTcgNS4xOTVMMTkuOTcgNS43MmEuNzUuNzUgMCAwIDEgMS4wNiAwWiI+PC9wYXRoPjwvc3ZnPg==
-58
View File
@@ -1,58 +0,0 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/bungeecord"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- 'Type: Update Dependency'
- 'Target: BungeeCord'
- package-ecosystem: maven
directory: "/core"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- 'Type: Update Dependency'
- 'Target: Core'
- package-ecosystem: maven
directory: "/paper"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- 'Type: Update Dependency'
- 'Target: PaperMC'
- package-ecosystem: maven
directory: "/spigot"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- 'Type: Update Dependency'
- 'Target: Spigot'
- package-ecosystem: maven
directory: "/velocity"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- 'Type: Update Dependency'
- 'Target: Velocity'
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- 'Type: Update Dependency'
- 'Target: GitHub Action'
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- 'Type: Update Dependency'
- 'Target: MkDocs'
+14
View File
@@ -0,0 +1,14 @@
"Target: All":
- all: ["bukkit/**", "bungeecord/**", "core/**", "velocity/**"]
"Target: Bukkit":
- all: ["bukkit/**", "!bungeecord/**", "!core/**", "!velocity/**"]
"Target: BungeeCord":
- all: ["!bukkit/**", "bungeecord/**", "!core/**", "!velocity/**"]
"Target: Core":
- all: ["!bukkit/**", "!bungeecord/**", "core/**", "!velocity/**"]
"Target: Velocity":
- all: ["!bukkit/**", "!bungeecord/**", "!core/**", "velocity/**"]
-100
View File
@@ -1,100 +0,0 @@
name: Create PR Artifacts
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
branches:
- master
paths-ignore:
- '.github/**'
- 'docs/**'
- '.gitignore'
- 'LICENSE'
- 'README.md'
- 'mkdocs.yml'
- 'requirements.txt'
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref }}'
cancel-in-progress: false
permissions:
issues: write
pull-requests: write
jobs:
buildArtifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Find Comment
uses: peter-evans/find-comment@v2
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '<!-- pr-build comment -->'
- name: Print Comment info
run: |
echo "Comment ID: ${{ steps.find-comment.outputs.comment-id }}"
echo "Comment Author: ${{ steps.find-comment.outputs.comment-author }}"
echo "Comment created at: ${{ steps.find-comment.outputs.comment-created-at }}"
- name: Post/Update Comment
uses: peter-evans/create-or-update-comment@v3
id: comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: |-
<!-- pr-build comment -->
![badge]
Please wait while we're building the Jar files for this Pull request...
[badge]: https://img.shields.io/badge/Building...-0d1117?style=for-the-badge&labelColor=7a8490&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNNC43NSAyaDE0LjVhLjc1Ljc1IDAgMCAxIDAgMS41aC0uNzV2Mi45ODJhNC43NSA0Ljc1IDAgMCAxLTIuMjE1IDQuMDE3bC0yLjA0NCAxLjI5YS4yNS4yNSAwIDAgMCAwIC40MjJsMi4wNDQgMS4yOWE0Ljc1IDQuNzUgMCAwIDEgMi4yMTUgNC4wMTdWMjAuNWguNzVhLjc1Ljc1IDAgMCAxIDAgMS41SDQuNzVhLjc1Ljc1IDAgMCAxIDAtMS41aC43NXYtMi45ODJhNC43NSA0Ljc1IDAgMCAxIDIuMjE1LTQuMDE3bDIuMDQ0LTEuMjlhLjI1LjI1IDAgMCAwIDAtLjQyMmwtMi4wNDQtMS4yOUE0Ljc1IDQuNzUgMCAwIDEgNS41IDYuNDgyVjMuNWgtLjc1YS43NS43NSAwIDAgMSAwLTEuNVpNMTcgMy41SDd2Mi45ODJBMy4yNSAzLjI1IDAgMCAwIDguNTE2IDkuMjNsMi4wNDQgMS4yOWExLjc1IDEuNzUgMCAwIDEgMCAyLjk2bC0yLjA0NCAxLjI5QTMuMjUgMy4yNSAwIDAgMCA3IDE3LjUxOFYyMC41aDEwdi0yLjk4MmEzLjI1IDMuMjUgMCAwIDAtMS41MTYtMi43NDhsLTIuMDQ0LTEuMjlhMS43NSAxLjc1IDAgMCAxIDAtMi45NmwyLjA0NC0xLjI5QTMuMjUgMy4yNSAwIDAgMCAxNyA2LjQ4MloiPjwvcGF0aD48L3N2Zz4=
- name: Set up JDK 1.16
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '16'
cache: 'maven'
- name: Obtain short Commit SHA
id: get-commit
run: 'echo "sha_short=$(git rev-parse --short ${{ github.event.pull_request.head.sha }})" >> $GITHUB_OUTPUT'
- name: Build Jar files
run: mvn clean install
env:
COMMIT_SHA: ${{ steps.get-commit.outputs.sha_short }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: AdvancedServerList-Artifacts
path: '*/target/AdvancedServerList-*.jar'
if-no-files-found: error
- name: Update Comment (Failure)
if: failure()
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.comment.outputs.comment-id }}
edit-mode: replace
body: |-
<!-- pr-build comment -->
![badge]
The Build of this Pull request failed.
Please check the below linked logs for a possible cause.
| Name | Link |
| ------ | ----------------------------------------------------------------------------------- |
| Commit | ${{ github.event.pull_request.head.sha }} |
| Logs | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
[badge]: https://img.shields.io/badge/Build_Failure!-0d1117?style=for-the-badge&labelColor=f85149&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNNS43MiA1LjcyYS43NS43NSAwIDAgMSAxLjA2IDBMMTIgMTAuOTRsNS4yMi01LjIyYS43NDkuNzQ5IDAgMCAxIDEuMjc1LjMyNi43NDkuNzQ5IDAgMCAxLS4yMTUuNzM0TDEzLjA2IDEybDUuMjIgNS4yMmEuNzQ5Ljc0OSAwIDAgMS0uMzI2IDEuMjc1Ljc0OS43NDkgMCAwIDEtLjczNC0uMjE1TDEyIDEzLjA2bC01LjIyIDUuMjJhLjc1MS43NTEgMCAwIDEtMS4wNDItLjAxOC43NTEuNzUxIDAgMCAxLS4wMTgtMS4wNDJMMTAuOTQgMTIgNS43MiA2Ljc4YS43NS43NSAwIDAgMSAwLTEuMDZaIj48L3BhdGg+PC9zdmc+
+28 -14
View File
@@ -2,24 +2,29 @@ name: 'Deploy Site (Push)'
on:
workflow_dispatch:
push:
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'mkdocs-theme/**'
- 'requirements.txt'
branches:
- master
tags-ignore:
- '**'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
env:
GITHUB_REPO_INSTANCE: true
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Create/Get Cache
@@ -31,5 +36,14 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
- name: Deploy Files
run: mkdocs gh-deploy --force
- name: Build docs
run: mkdocs build
- name: Configure GitHub Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'site/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
-99
View File
@@ -1,99 +0,0 @@
name: Comment on Pull request
on:
workflow_run:
types:
- completed
workflows:
- 'Create PR Artifacts'
permissions:
issues: write
pull-requests: write
jobs:
comment:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Get Artifact and Pull request info
env:
GITHUB_TOKEN: ${{ github.token }} # No idea why this is set here when ${{ secrets.GITHUB_TOKEN }} is a thing...
WORKFLOW_RUN_EVENT_OBJ: ${{ toJSON(github.event.workflow_run) }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
run: |
PREVIOUS_JOB_ID=$(jq -r '.id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Previous Job ID: $PREVIOUS_JOB_ID"
echo "PREVIOUS_JOB_ID=$PREVIOUS_JOB_ID" >> "$GITHUB_ENV"
SUITE_ID=$(jq -r '.check_suite_id' <<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Previous Suite ID: $SUITE_ID"
echo "SUITE_ID=$SUITE_ID" >> "$GITHUB_ENV"
ARTIFACT_ID=$(gh api "/repos/$OWNER/$REPO/actions/artifacts" \
--jq ".artifacts.[] |
select(.workflow_run.id==${PREVIOUS_JOB_ID}) |
select(.expired==false) |
.id")
echo "Artifact ID: $ARTIFACT_ID"
echo "ARTIFACT_ID=$ARTIFACT_ID" >> "$GITHUB_ENV"
ARTIFACT_EXPIRE_DATE=$(gh api "/repos/$OWNER/$REPO/actions/artifacts" \
--jq ".artifacts.[] |
select(.workflow_run.id==${PREVIOUS_JOB_ID}) |
select(.expired==false) |
.expires_at")
echo "Artifact Expire Date: $ARTIFACT_EXPIRE_DATE"
echo "ARTIFACT_EXPIRE_DATE=$ARTIFACT_EXPIRE_DATE" >> "$GITHUB_ENV"
PR_NUMBER=$(jq -r '.pull_requests[0].number' \
<<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Pull request Number: $PR_NUMBER"
echo "PR_NUMBER=$PR_NUMBER" >> "$GITHUB_ENV"
HEAD_SHA=$(jq -r '.pull_requests[0].head.sha' \
<<< "$WORKFLOW_RUN_EVENT_OBJ")
echo "Head SHA: $HEAD_SHA"
echo "HEAD_SHA=$HEAD_SHA" >> "$GITHUB_ENV"
- name: Find Comment
uses: peter-evans/find-comment@v2
id: find-comment
with:
issue-number: ${{ env.PR_NUMBER }}
comment-author: 'github-actions[bot]'
body-includes: '<!-- pr-build comment -->'
- name: Print Comment info
run: |
echo "Comment ID: ${{ steps.find-comment.outputs.comment-id }}"
echo "Comment Author: ${{ steps.find-comment.outputs.comment-author }}"
echo "Comment created at: ${{ steps.find-comment.outputs.comment-created-at }}"
- name: Update Comment
env:
JOB_PATH: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ env.PREVIOUS_JOB_ID }}"
ARTIFACT_URL: "${{ github.server_url }}/${{ github.repository }}/suites/${{ env.SUITE_ID }}/artifacts/${{ env.ARTIFACT_ID }}"
ARTIFACT_EXPIRE_DATE: "${{ env.ARTIFACT_EXPIRE_DATE }}"
HEAD_SHA: "${{ env.HEAD_SHA }}"
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ env.PR_NUMBER }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: |-
<!-- pr-build comment -->
![badge]
Build Successful! You can find a link to the downloadable artifact below.
Expire Date: `${{ env.ARTIFACT_EXPIRE_DATE }}`
| Name | Link |
| -------- | ----------------------- |
| Commit | ${{ env.HEAD_SHA }} |
| Logs | ${{ env.JOB_PATH }} |
| Download | ${{ env.ARTIFACT_URL }} |
[badge]: https://img.shields.io/badge/Build_Success!-0d1117?style=for-the-badge&labelColor=3fb950&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjZmZmZmZmIj48cGF0aCBkPSJNMjEuMDMgNS43MmEuNzUuNzUgMCAwIDEgMCAxLjA2bC0xMS41IDExLjVhLjc0Ny43NDcgMCAwIDEtMS4wNzItLjAxMmwtNS41LTUuNzVhLjc1Ljc1IDAgMSAxIDEuMDg0LTEuMDM2bDQuOTcgNS4xOTVMMTkuOTcgNS43MmEuNzUuNzUgMCAwIDEgMS4wNiAwWiI+PC9wYXRoPjwvc3ZnPg==
-131
View File
@@ -1,131 +0,0 @@
#
# Big thank you to @Kir-Antipov for providing this workflow file.
# Check out his mc-publish action here: https://github.com/Kir-Antipov/mc-publish
#
name: Publish Assets
on:
release:
types:
- published
jobs:
buildJars:
runs-on: ubuntu-latest
outputs:
plugin_release: ${{ steps.github-release.outputs.PLUGIN_RELEASE }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Get Version from Release
id: github-release
run: |
version=$(echo ${{ github.event.release.tag_name }} | cut -d'v' -f2)
echo "PLUGIN_RELEASE=$version" >> $GITHUB_OUTPUT
- name: Set up JDK 1.16
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '16'
cache: 'maven'
- name: Build Jar files
run: mvn clean install
- name: Save All files
uses: actions/upload-artifact@v3
with:
name: asl-files
path: |
*/target/AdvancedServerList-*.jar
hangar-uploader/target/HangarUploader.jar
if-no-files-found: error
retention-days: 1
publish:
needs: [buildJars]
strategy:
matrix:
include:
- platforms: BungeeCord, Waterfall
directory: bungeecord
loaders: |
bungeecord
waterfall
- platforms: Spigot, Paper
directory: bukkit
loaders: |
spigot
paper
- platforms: Velocity
directory: velocity
loaders: velocity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Jar files
uses: actions/download-artifact@v3
with:
name: asl-files
- name: Upload AdvancedServerList v${{ needs.buildJars.outputs.plugin_release }} (${{ matrix.loaders }}) to GitHub and Modrinth
if: '!github.event.release.prerelease'
uses: Kir-Antipov/mc-publish@v3.2
with:
name: ${{ github.event.release.tag_name }} (${{ matrix.platforms }})
version: ${{ needs.buildJars.outputs.plugin_release }}
version-type: release
files: ${{ matrix.directory}}/target/AdvancedServerList-*.jar
files-secondary: ""
loaders: ${{ matrix.loaders }}
version-resolver: releases
game-versions: |
1.19
1.19.1
1.19.2
1.19.3
1.19.4
java: 16
modrinth-id: xss83sOY
modrinth-featured: false
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload AdvancedServerList v${{ needs.buildJars.outputs.plugin_release }} (${{ matrix.loaders }}) to GitHub and Modrinth [Pre-Release]
if: 'github.event.release.prerelease'
uses: Kir-Antipov/mc-publish@v3.2
with:
name: ${{ github.event.release.tag_name }} (${{ matrix.platforms }})
version: ${{ needs.buildJars.outputs.plugin_release }}
version-type: beta
files: ${{ matrix.directory }}/target/AdvancedServerList-*.jar
files-secondary: ""
loaders: ${{ matrix.loaders }}
version-resolver: releases
game-versions: |
1.19
1.19.1
1.19.2
1.19.3
1.19.4
java: 16
modrinth-id: xss83sOY
modrinth-featured: false
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
publishHangar:
needs: [buildJars]
runs-on: ubuntu-latest
steps:
- name: Set up JDK 1.16
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '16'
- name: Download Release Assets
uses: actions/download-artifact@v3
with:
name: asl-files
- name: Move HangarUploader.jar
working-directory: hangar-uploader/target/
run: mv HangarUploader.jar ../../
- name: Execute HangarUploader.jar
run: java -jar HangarUploader.jar ${{ secrets.HANGAR_TOKEN }} ${{ needs.buildJars.outputs.plugin_release }} ${{ github.event.release.prerelease }}
env:
GITHUB_RELEASE_BODY: ${{ github.event.release.body }}
+1
View File
@@ -2,3 +2,4 @@
/.idea/
/**/dependency-reduced-pom.xml
/**/target/
/**/__pycache__/
+33
View File
@@ -0,0 +1,33 @@
when:
- event: tag
branch: master
steps:
createFiles:
image: maven:3.9.6-eclipse-temurin-17
secrets:
- source: cb_token
target: codeberg_api_token
- source: modrinth_api_token
target: modrinth_api_token
- source: hangar_api_token
target: hangar_api_token
commands:
# Create the jar files.
- mvn clean install
# Move VersionUploader jar file
- cd version-uploader/target/
- mv VersionUploader.jar ../../
- cd ../../
# Execute Jar file
- java -jar VersionUploader.jar --modrinth
uploadToCodeberg:
image: woodpeckerci/plugin-gitea-release
settings:
base_url: https://codeberg.org
files:
- "bungeecord/target/AdvancedServerList-*.jar"
- "paper/target/AdvancedServerList-*.jar"
- "velocity/target/AdvancedServerList-*.jar"
api_key:
from_secret: CB_TOKEN
+36
View File
@@ -0,0 +1,36 @@
when:
- branch: master
event: push
path:
include: ['requirements.txt', 'mkdocs.yml', 'docs/**']
variables:
setup_git: &setup_git
- apk add git
- git config --global user.email "github@andre601.ch"
- git config --global user.name "ASL Docs Builder"
steps:
cloneTargetRepo:
image: alpine:3.18.4
commands:
- chmod -R a+w .
- <<: *setup_git
- git clone -b pages https://codeberg.org/Andre601/AdvancedServerList.git site
- chmod -R a+w site
buildDocs:
image: woodpeckerci/plugin-mkdocs:latest
settings:
pip_install_file: requirements.txt
commitAndPush:
image: alpine:3.18.4
secrets:
- cb_token
commands:
- <<: *setup_git
- mv domains site/.domains
- cd site
- git remote set-url origin https://$CB_TOKEN@codeberg.org/Andre601/AdvancedServerList.git
- git add --all
- git commit -m "Update AdvancedServerList Docs ($( env TZ=Europe/Zurich date +"%d.%m.%Y %Z" )) [SKIP CI]"
- git push
+22 -21
View File
@@ -3,23 +3,19 @@
AdvancedServerList is a plugin that allowys you to customize your server's MOTD, favicon, Player count text and player count hover displayed in a player's multiplayer server list based on conditions and priorities.
## Downloads
<a href="https://modrinth.com/plugin/advancedserverlist" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/Andre601/devins-badges@13e0142/assets/compact/available/modrinth_vector.svg" height="46" alt="modrinth" title="Available on Modrinth">
</a>
<br>
<!--
<a href="https://hangar.papermc.io/Andre_601/AdvancedServerList" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/Andre601/devins-badges@13e0142/assets/compact/available/hangar_vector.svg" height="46" alt="hangar" title="Available on Hangar">
</a>
<br>
<a href="https://www.spigotmc.org/resources/102910" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/Andre601/devins-badges@b9ff12b/assets/compact/available/spigot_vector.svg" height="46" alt="spigot" title="Available on SpigotMC">
</a>
-->
## Supported Platforms
<a href="https://www.spigotmc.org" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/Andre601/devins-badges@13e0142/assets/compact-minimal/supported/spigot_vector.svg" height="64" alt="platform-spigot" title="Tested on Spigot">
</a>
<a href="https://papermc.io" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/Andre601/devins-badges@13e0142/assets/compact-minimal/supported/paper_vector.svg" height="64" alt="platform-paper" title="Tested on Paper">
</a>
@@ -47,10 +43,10 @@ When multiple profiles exist that have valid conditions will the one with the hi
> [*Read More*][conditions]
### Placeholders
Placeholders can be used within conditions to further customize them. They can also be used in any other text option (motd, playerCount and players) to display their respective values.
Placeholders can be used within conditions to further customize them. They can also be used in any other text option to display their respective values.
The format is `${<target> <identifier>}` which was adopted from BungeeTabListPlus. Depending on what platform you use the plugin on are only specific placeholders available.
When using the SpigotMC/PaperMC version can you also use placeholders from [PlaceholderAPI][placeholderapi] using its `%<identifier>_<values>%` placeholder format. PlaceholderAPI needs to be installed for that.
When using the SpigotMC/PaperMC version, or while PAPIProxyBridge is installed on your proxy, can you also use placeholders from [PlaceholderAPI][placeholderapi] using its `%<identifier>_<values>%` placeholder format. PlaceholderAPI needs to be installed for that.
If you're a plugin dev can you even add your own custom placeholders through AdvancedServerList's own API.
@@ -64,11 +60,14 @@ Only certain options are usable for each option. As an example does motd support
## Dependencies
| Dependency | Platforms | Required? |
|------------------|---------------|-----------|
| [ProtocolLib] | Spigot | Yes |
| [PlaceholderAPI] | Spigot, Paper | No |
| [ViaVersion] | Spigot, Paper | No |
All listed dependencies are optional.
| Dependency | Platforms |
|-------------------|----------------------|
| [PlaceholderAPI] | Paper |
| [ViaVersion] | Paper |
| [PAPIProxyBridge] | BungeeCord, Velocity |
| [Maintenance] | All |
## Statistics
@@ -86,6 +85,7 @@ You can disable this in the global bStats config file located in `/plugins/bstat
</a>
## Support
<a href="https://discord.gg/6dazXp6" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/Andre601/devins-badges@13e0142/assets/compact-minimal/social/discord-singular_vector.svg" height="64" alt="discord" title="Join my Discord Server">
</a>
@@ -97,16 +97,17 @@ You can disable this in the global bStats config file located in `/plugins/bstat
</a>
<!-- Links -->
[profiles]: https://www.andre601.ch/AdvancedServerList/profiles/
[conditions]: https://www.andre601.ch/AdvancedServerList/profiles/#conditions
[placeholders]: https://www.andre601.ch/AdvancedServerList/profiles/placeholders/
[minimessage]: https://www.andre601.ch/AdvancedServerList/profiles/formatting/
[profiles]: https://asl.andre601.ch/profiles/
[conditions]: https://asl.andre601.ch/profiles/#conditions
[placeholders]: https://asl.andre601.ch/profiles/placeholders/
[minimessage]: https://asl.andre601.ch/profiles/formatting/
[modrinth]: https://modrinth.com/plugin/advancedserverlist
[protocollib]: https://www.spigotmc.org/resources/1997/
[placeholderapi]: https://www.spigotmc.org/resources/6245/
[viaversion]: https://www.spigotmc.org/resources/19254/
[placeholderapi]: https://hangar.papermc.io/HelpChat/PlaceholderAPI
[viaversion]: https://hangar.papermc.io/ViaVersion/ViaVersion
[papiproxybridge]: https://hangar.papermc.io/William278/PAPIProxyBridge
[maintenance]: https://hangar.papermc.io/kennytv/Maintenance
[bstats]: https://bstats.org
[bstats-bungee]: https://bstats.org/plugin/bungeecord/AdvancedServerList/15585
@@ -1,75 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.bukkit.commands;
import ch.andre601.advancedserverlist.core.interfaces.commands.CmdSender;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
import ch.andre601.advancedserverlist.paper.commands.PaperCmdSender;
import ch.andre601.advancedserverlist.spigot.commands.SpigotCmdSender;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
public class CmdAdvancedServerList extends Command implements CommandExecutor{
private final PluginCore<?> plugin;
private final BukkitAudiences audiences;
public CmdAdvancedServerList(PluginCore<?> plugin){
this(plugin, null);
}
public CmdAdvancedServerList(PluginCore<?> plugin, BukkitAudiences audiences){
super(
"advancedserverlist",
"Main command of the plugin",
"/asl [reload|help|clearCache]",
Collections.singletonList("asl")
);
this.plugin = plugin;
this.audiences = audiences;
}
public boolean execute(@NotNull CommandSender sender, @NotNull String s, @NotNull String[] args){
plugin.getCore().getCommandHandler().handle(getSender(sender), args);
return true;
}
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, @NotNull String[] args){
plugin.getCore().getCommandHandler().handle(getSender(sender), args);
return true;
}
private CmdSender getSender(CommandSender sender){
return audiences == null ? new PaperCmdSender(sender) : new SpigotCmdSender(sender, audiences);
}
}
@@ -1,61 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.bukkit.objects;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.spigot.objects.SpigotPlayer;
public class BukkitPlayerPlaceholders extends PlaceholderProvider{
private BukkitPlayerPlaceholders(){
super("player");
}
public static BukkitPlayerPlaceholders init(){
return new BukkitPlayerPlaceholders();
}
@Override
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server){
SpigotPlayer bukkitPlayer = (SpigotPlayer)player;
return switch(placeholder){
case "name" -> bukkitPlayer.getName();
case "protocol" -> String.valueOf(bukkitPlayer.getProtocol());
case "uuid" -> bukkitPlayer.getUUID().toString();
case "hasPlayedBefore" -> returnValue(bukkitPlayer, bukkitPlayer.hasPlayedBefore());
case "isBanned" -> returnValue(bukkitPlayer, bukkitPlayer.isBanned());
case "isWhitelisted" -> returnValue(bukkitPlayer, bukkitPlayer.isWhitelisted());
default -> null;
};
}
private String returnValue(SpigotPlayer player, Object value){
return player.getPlayer() == null ? null : String.valueOf(value);
}
}
@@ -1,164 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.spigot;
import ch.andre601.advancedserverlist.bukkit.BukkitCore;
import ch.andre601.advancedserverlist.bukkit.commands.CmdAdvancedServerList;
import ch.andre601.advancedserverlist.bukkit.logging.BukkitLogger;
import ch.andre601.advancedserverlist.bukkit.objects.BukkitPlayerPlaceholders;
import ch.andre601.advancedserverlist.bukkit.objects.PAPIPlaceholders;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.profiles.favicon.FaviconHandler;
import ch.andre601.advancedserverlist.spigot.events.LoadEvent;
import com.comphenix.protocol.wrappers.WrappedServerPing;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import org.bstats.bukkit.Metrics;
import org.bstats.charts.SimplePie;
import org.bukkit.command.PluginCommand;
import java.nio.file.Path;
public class SpigotCore extends BukkitCore<WrappedServerPing.CompressedImage>{
private final PluginLogger logger = new BukkitLogger(getLogger());
private AdvancedServerList<WrappedServerPing.CompressedImage> core;
private FaviconHandler<WrappedServerPing.CompressedImage> faviconHandler = null;
private PAPIPlaceholders<WrappedServerPing.CompressedImage> papiPlaceholders = null;
@Override
public void onEnable(){
try{
Class.forName("io.papermc.paper.configuration.ConfigurationLoaders");
printPaperInfo();
}catch(ClassNotFoundException ex){
try{
// Above class only exists since 1.19+, so this is a fallback for older versions.
Class.forName("com.destroystokyo.paper.PaperConfig");
printPaperInfo();
}catch(ClassNotFoundException ignored){}
}
this.core = AdvancedServerList.init(this, BukkitPlayerPlaceholders.init());
}
@Override
public void onDisable(){
if(papiPlaceholders != null){
papiPlaceholders.unregister();
papiPlaceholders = null;
}
getCore().disable();
}
@Override
public void loadCommands(){
PluginCommand cmd = getServer().getPluginCommand("advancedserverlist");
if(cmd == null){
getPluginLogger().warn("Unable to register command /advancedserverlist");
return;
}
cmd.setExecutor(new CmdAdvancedServerList(this, BukkitAudiences.create(this)));
}
@Override
public void loadEvents(){
new LoadEvent(this);
}
@Override
public void loadMetrics(){
new Metrics(this, 15584).addCustomChart(new SimplePie("profiles",
() -> String.valueOf(core.getFileHandler().getProfiles().size())
));
}
@Override
public void clearFaviconCache(){
if(faviconHandler == null)
return;
faviconHandler.clearCache();
}
@Override
public AdvancedServerList<WrappedServerPing.CompressedImage> getCore(){
return core;
}
@Override
public Path getFolderPath(){
return getDataFolder().toPath();
}
@Override
public PluginLogger getPluginLogger(){
return logger;
}
@Override
public FaviconHandler<WrappedServerPing.CompressedImage> getFaviconHandler(){
if(faviconHandler == null)
faviconHandler = new FaviconHandler<>(core);
return faviconHandler;
}
@Override
public String getPlatformName(){
return getServer().getName();
}
@Override
public String getPlatformVersion(){
return getServer().getVersion();
}
@Override
public String getLoader(){
return "spigot";
}
public void setPapiPlaceholders(PAPIPlaceholders<WrappedServerPing.CompressedImage> papiPlaceholders){
this.papiPlaceholders = papiPlaceholders;
}
private void printPaperInfo(){
getPluginLogger().warn("======================================================================================");
getPluginLogger().warn("You are using the Spigot version of AdvancedServerList on a Paper server.");
getPluginLogger().warn("It is recommended to use the dedicated Paper version, to benefit from the");
getPluginLogger().warn("following improvements:");
getPluginLogger().warn(" - No downloading of external Libraries already provided by Paper (i.e. Adventure).");
getPluginLogger().warn(" - No dependency on ProtocolLib thanks to provided Events.");
getPluginLogger().warn("");
getPluginLogger().warn("AdvancedServerList may work as normal, but consider using the PaperMC version instead!");
getPluginLogger().warn("======================================================================================");
}
}
@@ -1,63 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.spigot.events;
import ch.andre601.advancedserverlist.bukkit.events.JoinEvent;
import ch.andre601.advancedserverlist.spigot.SpigotCore;
import ch.andre601.advancedserverlist.bukkit.objects.PAPIPlaceholders;
import com.comphenix.protocol.ProtocolLibrary;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.server.ServerLoadEvent;
import org.bukkit.plugin.PluginManager;
public class LoadEvent implements Listener{
private final SpigotCore plugin;
public LoadEvent(SpigotCore plugin){
this.plugin = plugin;
plugin.getServer().getPluginManager().registerEvents(this, plugin);
}
@EventHandler
public void onServerLoad(ServerLoadEvent event){
PluginManager manager = plugin.getServer().getPluginManager();
if(!manager.isPluginEnabled("ProtocolLib")){
plugin.getCore().getPlugin().getPluginLogger().warn("ProtocolLib not found! AdvancedServerList requires it to work on Spigot!");
manager.disablePlugin(plugin);
return;
}
JoinEvent.init(plugin);
ProtocolLibEvents.init(plugin, ProtocolLibrary.getProtocolManager());
if(manager.isPluginEnabled("PlaceholderAPI"))
plugin.setPapiPlaceholders(PAPIPlaceholders.init(plugin));
}
}
@@ -1,190 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.spigot.events;
import ch.andre601.advancedserverlist.api.events.GenericServerListEvent;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.bukkit.BukkitCore;
import ch.andre601.advancedserverlist.bukkit.events.PreServerListSetEventImpl;
import ch.andre601.advancedserverlist.core.interfaces.events.GenericEventWrapper;
import ch.andre601.advancedserverlist.core.objects.CachedPlayer;
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
import ch.andre601.advancedserverlist.core.profiles.replacer.StringReplacer;
import ch.andre601.advancedserverlist.spigot.SpigotCore;
import ch.andre601.advancedserverlist.bukkit.objects.SpigotPlayerImpl;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.WrappedChatComponent;
import com.comphenix.protocol.wrappers.WrappedGameProfile;
import com.comphenix.protocol.wrappers.WrappedServerPing;
import me.clip.placeholderapi.PlaceholderAPI;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
public class ProtocolLibEventWrapper implements GenericEventWrapper<WrappedServerPing.CompressedImage, SpigotPlayerImpl>{
private final SpigotCore plugin;
private final PacketEvent event;
private final WrappedServerPing ping;
public ProtocolLibEventWrapper(SpigotCore plugin, PacketEvent event){
this.plugin = plugin;
this.event = event;
this.ping = event.getPacket().getServerPings().read(0);
}
@Override
public GenericServerListEvent callEvent(ProfileEntry entry){
PreServerListSetEventImpl event = new PreServerListSetEventImpl(entry);
plugin.getServer().getPluginManager().callEvent(event);
return event;
}
@Override
public void setMaxPlayers(int maxPlayers){
ping.setPlayersMaximum(maxPlayers);
}
@Override
public void setMotd(Component component){
ping.setMotD(WrappedChatComponent.fromJson(GsonComponentSerializer.gson().serialize(component)));
}
@Override
public void hidePlayers(){
ping.setPlayersVisible(false);
}
@Override
public void setPlayerCount(String name){
ping.setVersionName(name);
ping.setVersionProtocol(-1);
}
@Override
public void setPlayers(List<String> lines, SpigotPlayerImpl player, GenericServer server){
List<WrappedGameProfile> players = new ArrayList<>(lines.size());
for(String line : lines){
String parsed = ComponentParser.text(line)
.modifyText(text -> StringReplacer.replace(text, player, server))
.modifyText(text -> {
if(plugin.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI"))
return PlaceholderAPI.setPlaceholders(player.getPlayer(), text);
return text;
})
.toString();
players.add(new WrappedGameProfile(UUID.randomUUID(), parsed));
}
ping.setPlayers(players);
}
@Override
public void setFavicon(WrappedServerPing.CompressedImage favicon){
ping.setFavicon(favicon);
}
@Override
public void setDefaultFavicon(){
ping.setFavicon(ping.getFavicon());
}
// Not used in ProtocolLib
@Override
public void updateEvent(){
event.getPacket().getServerPings().write(0, ping);
}
@Override
public boolean isInvalidProtocol(){
return event.getPlayer().getAddress() == null;
}
@Override
public int getProtocolVersion(){
return ping.getVersionProtocol();
}
@Override
public int getOnlinePlayers(){
return ping.getPlayersOnline();
}
@Override
public int getMaxPlayers(){
return ping.getPlayersMaximum();
}
@Override
public String getPlayerIP(){
return event.getPlayer().getAddress() == null ? "UNKNOWN" : event.getPlayer().getAddress().getHostString();
}
@Override
public String parsePAPIPlaceholders(String text, SpigotPlayerImpl player){
if(plugin.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI"))
return PlaceholderAPI.setPlaceholders(player.getPlayer(), text);
return text;
}
@Override
public String getVirtualHost(){
String host = this.resolveHost(event.getPlayer().getAddress());
if(host == null)
return null;
return ProtocolLibEvents.getHostAddresses().get(host);
}
@Override
public BukkitCore<WrappedServerPing.CompressedImage> getPlugin(){
return plugin;
}
@Override
public SpigotPlayerImpl createPlayer(CachedPlayer player, int protocol){
OfflinePlayer pl = Bukkit.getOfflinePlayer(player.getUuid());
return new SpigotPlayerImpl(pl.hasPlayedBefore() ? pl : null, player, protocol);
}
@Override
public WrappedServerPing.CompressedImage createFavicon(BufferedImage image) throws Exception{
return WrappedServerPing.CompressedImage.fromPng(image);
}
}
@@ -1,84 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.spigot.events;
import ch.andre601.advancedserverlist.core.events.PingEventHandler;
import ch.andre601.advancedserverlist.spigot.SpigotCore;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolManager;
import com.comphenix.protocol.events.ListenerPriority;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketEvent;
import org.bukkit.Bukkit;
import org.bukkit.event.Listener;
import java.net.InetSocketAddress;
import java.util.HashMap;
import java.util.Map;
public class ProtocolLibEvents implements Listener{
private final ProtocolManager protocolManager;
private static final Map<String, String> hostAddresses = new HashMap<>();
private ProtocolLibEvents(SpigotCore plugin, ProtocolManager protocolManager){
this.protocolManager = protocolManager;
loadPacketListener(plugin);
Bukkit.getPluginManager().registerEvents(this, plugin);
}
public static void init(SpigotCore plugin, ProtocolManager protocolManager){
new ProtocolLibEvents(plugin, protocolManager);
}
public static Map<String, String> getHostAddresses(){
return hostAddresses;
}
private void loadPacketListener(SpigotCore spigotPlugin){
protocolManager.addPacketListener(new PacketAdapter(spigotPlugin, ListenerPriority.LOW, PacketType.Handshake.Client.SET_PROTOCOL){
@Override
public void onPacketReceiving(PacketEvent event){
InetSocketAddress address = event.getPlayer().getAddress();
if(address == null)
return;
String host = event.getPacket().getStrings().read(0);
hostAddresses.put(address.getHostString(), host);
}
});
protocolManager.addPacketListener(new PacketAdapter(spigotPlugin, ListenerPriority.LOW, PacketType.Status.Server.SERVER_INFO){
@Override
public void onPacketSending(PacketEvent event){
PingEventHandler.handleEvent(new ProtocolLibEventWrapper(spigotPlugin, event));
}
});
}
}
+9 -9
View File
@@ -67,39 +67,39 @@
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.20-R0.1</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.20-R0.1</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
<version>4.13.0</version>
<version>4.14.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.13.0</version>
<version>4.14.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bungeecord</artifactId>
<version>4.1.2</version>
<version>4.3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bungeecord</artifactId>
<version>3.0.0</version>
<version>3.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -111,13 +111,13 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.10.0</version>
<version>4.12.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>AdvancedServerList-BungeeCord-${plugin.version}${project.build.commit}</finalName>
<finalName>AdvancedServerList-BungeeCord-${plugin.version}</finalName>
<resources>
<resource>
<filtering>true</filtering>
@@ -133,7 +133,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.1</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
@@ -26,10 +26,11 @@
package ch.andre601.advancedserverlist.bungeecord;
import ch.andre601.advancedserverlist.bungeecord.commands.CmdAdvancedServerList;
import ch.andre601.advancedserverlist.bungeecord.events.JoinEvent;
import ch.andre601.advancedserverlist.bungeecord.events.PingEvent;
import ch.andre601.advancedserverlist.bungeecord.listeners.JoinEvent;
import ch.andre601.advancedserverlist.bungeecord.listeners.PingEvent;
import ch.andre601.advancedserverlist.bungeecord.logging.BungeeLogger;
import ch.andre601.advancedserverlist.bungeecord.objects.BungeePlayerPlaceholders;
import ch.andre601.advancedserverlist.bungeecord.objects.BungeeServerPlaceholders;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
@@ -45,11 +46,11 @@ public class BungeeCordCore extends Plugin implements PluginCore<Favicon>{
private AdvancedServerList<Favicon> core;
private FaviconHandler<Favicon> faviconHandler = null;
private final PluginLogger logger = new BungeeLogger(getLogger());
private final PluginLogger logger = new BungeeLogger(this);
@Override
public void onEnable(){
this.core = AdvancedServerList.init(this, BungeePlayerPlaceholders.init());
this.core = AdvancedServerList.init(this, BungeePlayerPlaceholders.init(), BungeeServerPlaceholders.init());
}
@Override
@@ -23,13 +23,15 @@
*
*/
package ch.andre601.advancedserverlist.bungeecord.events;
package ch.andre601.advancedserverlist.bungeecord.listeners;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import ch.andre601.advancedserverlist.bungeecord.objects.BungeePlayerImpl;
import ch.andre601.advancedserverlist.api.events.GenericServerListEvent;
import ch.andre601.advancedserverlist.bungeecord.objects.BungeeProxyImpl;
import ch.andre601.advancedserverlist.core.events.PingEventHandler;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
import ch.andre601.advancedserverlist.core.interfaces.events.GenericEventWrapper;
import ch.andre601.advancedserverlist.core.objects.CachedPlayer;
@@ -40,11 +42,14 @@ import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer;
import net.md_5.bungee.api.Favicon;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.ProxyPingEvent;
import java.awt.image.BufferedImage;
import java.net.InetSocketAddress;
import java.util.List;
import java.util.Map;
import java.util.UUID;
public class BungeeEventWrapper implements GenericEventWrapper<Favicon, BungeePlayerImpl>{
@@ -128,6 +133,14 @@ public class BungeeEventWrapper implements GenericEventWrapper<Favicon, BungeePl
return protocol == null;
}
@Override
public boolean isMaintenanceModeActive(){
if(plugin.getProxy().getPluginManager().getPlugin("Maintenance") == null)
return false;
return PingEventHandler.getMaintenanceUtil().isMaintenanceEnabled();
}
@Override
public int getProtocolVersion(){
return this.protocol.getProtocol();
@@ -150,7 +163,25 @@ public class BungeeEventWrapper implements GenericEventWrapper<Favicon, BungeePl
@Override
public String parsePAPIPlaceholders(String text, BungeePlayerImpl player){
return text;
if(plugin.getProxy().getPluginManager().getPlugin("PAPIProxyBridge") == null)
return text;
if(!PingEventHandler.getPAPIUtil().isCompatible())
return text;
String server = PingEventHandler.getPAPIUtil().getServer();
if(server == null || server.isEmpty())
return text;
ServerInfo serverInfo = plugin.getProxy().getServerInfo(server);
if(serverInfo == null || serverInfo.getPlayers().isEmpty())
return text;
ProxiedPlayer carrier = PingEventHandler.getPAPIUtil().getPlayer(serverInfo.getPlayers());
if(carrier == null)
return text;
return PingEventHandler.getPAPIUtil().parse(text, carrier.getUniqueId(), player.getUUID());
}
@Override
@@ -168,6 +199,13 @@ public class BungeeEventWrapper implements GenericEventWrapper<Favicon, BungeePl
return new BungeePlayerImpl(player, protocol);
}
@Override
public GenericServer createGenericServer(int playersOnline, int playersMax, String host){
Map<String, ServerInfo> servers = plugin.getProxy().getServers();
return new BungeeProxyImpl(servers, playersOnline, playersMax, host);
}
@Override
public Favicon createFavicon(BufferedImage image) throws IllegalArgumentException{
return Favicon.create(image);
@@ -23,7 +23,7 @@
*
*/
package ch.andre601.advancedserverlist.bungeecord.events;
package ch.andre601.advancedserverlist.bungeecord.listeners;
import ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import net.md_5.bungee.api.connection.ProxiedPlayer;
@@ -23,7 +23,7 @@
*
*/
package ch.andre601.advancedserverlist.bungeecord.events;
package ch.andre601.advancedserverlist.bungeecord.listeners;
import ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import ch.andre601.advancedserverlist.core.events.PingEventHandler;
@@ -23,10 +23,10 @@
*
*/
package ch.andre601.advancedserverlist.bukkit.events;
package ch.andre601.advancedserverlist.bungeecord.listeners;
import ch.andre601.advancedserverlist.api.bungeecord.events.PreServerListSetEvent;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.spigot.events.PreServerListSetEvent;
public class PreServerListSetEventImpl extends PreServerListSetEvent{
@@ -25,6 +25,7 @@
package ch.andre601.advancedserverlist.bungeecord.logging;
import ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import java.util.logging.Level;
@@ -32,10 +33,24 @@ import java.util.logging.Logger;
public class BungeeLogger implements PluginLogger{
private final BungeeCordCore plugin;
private final Logger logger;
public BungeeLogger(Logger logger){
this.logger = logger;
public BungeeLogger(BungeeCordCore plugin){
this.plugin = plugin;
this.logger = plugin.getLogger();
}
@Override
public void debug(Class<?> clazz, String msg, Object... args){
if(plugin.isDebugEnabled())
info("[DEBUG] [" + clazz.getSimpleName() + "] " + msg, args);
}
@Override
public void debugWarn(Class<?> clazz, String msg, Object... args){
if(plugin.isDebugEnabled())
warn("[DEBUG] [" + clazz.getSimpleName() + "] " + msg, args);
}
@Override
@@ -0,0 +1,53 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.bungeecord.objects;
import ch.andre601.advancedserverlist.api.bungeecord.objects.BungeeProxy;
import net.md_5.bungee.api.config.ServerInfo;
import java.util.Map;
public record BungeeProxyImpl(Map<String, ServerInfo> servers, int playersOnline, int playersMax, String host) implements BungeeProxy{
@Override
public Map<String, ServerInfo> getServers(){
return servers;
}
@Override
public int getPlayersOnline(){
return playersOnline;
}
@Override
public int getPlayersMax(){
return playersMax;
}
@Override
public String getHost(){
return host;
}
}
@@ -0,0 +1,97 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.bungeecord.objects;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.bungeecord.objects.BungeeProxy;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import net.md_5.bungee.api.config.ServerInfo;
import java.net.InetSocketAddress;
public class BungeeServerPlaceholders extends PlaceholderProvider{
private BungeeServerPlaceholders(){
super("server");
}
public static BungeeServerPlaceholders init(){
return new BungeeServerPlaceholders();
}
@Override
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server){
if(!(server instanceof BungeeProxy proxy))
return null;
String[] args = placeholder.split("\\s", 2);
return switch(args[0]){
case "playersOnline" -> {
if(args.length >= 2){
String[] servers = args[1].split(",");
int players = 0;
for(String serverName : servers){
if(serverName.isEmpty())
continue;
ServerInfo info = proxy.getServers().get(serverName.strip());
if(info == null)
continue;
players += info.getPlayers().size();
}
yield String.valueOf(players);
}
yield String.valueOf(proxy.getPlayersOnline());
}
case "playersMax" -> {
// ServerInfo doesn't provide the max players that could join, so we won't allow an extra argument
if(args.length >= 2)
yield null;
yield String.valueOf(proxy.getPlayersMax());
}
case "host" -> {
if(args.length > 2)
yield null;
if(args.length == 2){
ServerInfo info = proxy.getServers().get(args[1]);
yield String.valueOf(((InetSocketAddress)info.getSocketAddress()).getHostString());
}
yield proxy.getHost();
}
default -> null;
};
}
}
+4
View File
@@ -3,4 +3,8 @@ author: 'Andre_601'
version: '${plugin.version}'
description: '${plugin.description}'
softDepends:
- PAPIProxyBridge
- Maintenance
main: 'ch.andre601.advancedserverlist.bungeecord.BungeeCordCore'
+29 -8
View File
@@ -41,6 +41,7 @@
<properties>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<plugin.config.version>3</plugin.config.version>
</properties>
<repositories>
@@ -48,6 +49,14 @@
<id>flexver-repo</id>
<url>https://repo.sleeping.town/</url>
</repository>
<repository>
<id>papiproxybridge-repo</id>
<url>https://repo.william278.net/releases/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
@@ -66,19 +75,19 @@
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
<version>4.13.1</version>
<version>4.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.13.1</version>
<version>4.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-legacy</artifactId>
<version>4.13.1</version>
<version>4.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -90,19 +99,31 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.11.0</version>
<version>4.12.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.unascribed</groupId>
<artifactId>flexver-java</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
<version>32.1.3-jre</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.william278</groupId>
<artifactId>papiproxybridge</artifactId>
<version>1.4.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>eu.kennytv.maintenance</groupId>
<artifactId>maintenance-api</artifactId>
<version>4.2.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
@@ -116,7 +137,7 @@
</dependencies>
<build>
<finalName>AdvancedServerList-Core-${plugin.version}${project.build.commit}</finalName>
<finalName>AdvancedServerList-Core-${plugin.version}</finalName>
<resources>
<resource>
<filtering>true</filtering>
@@ -132,7 +153,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.1</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
@@ -31,12 +31,13 @@ import ch.andre601.advancedserverlist.core.check.UpdateChecker;
import ch.andre601.advancedserverlist.core.commands.CommandHandler;
import ch.andre601.advancedserverlist.core.file.FileHandler;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
import ch.andre601.advancedserverlist.core.objects.ServerPlaceholders;
import ch.andre601.advancedserverlist.core.profiles.players.PlayerHandler;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
public class AdvancedServerList<F>{
@@ -51,20 +52,19 @@ public class AdvancedServerList<F>{
private String version;
private AdvancedServerList(PluginCore<F> plugin, PlaceholderProvider placeholders){
private AdvancedServerList(PluginCore<F> plugin, List<PlaceholderProvider> placeholders){
this.plugin = plugin;
this.fileHandler = new FileHandler(this);
this.commandHandler = new CommandHandler(this);
this.playerHandler = new PlayerHandler(this);
this.api.addPlaceholderProvider(placeholders);
this.api.addPlaceholderProvider(new ServerPlaceholders());
placeholders.forEach(this.api::addPlaceholderProvider);
load();
}
public static <F> AdvancedServerList<F> init(PluginCore<F> plugin, PlaceholderProvider placeholders){
return new AdvancedServerList<>(plugin, placeholders);
public static <F> AdvancedServerList<F> init(PluginCore<F> plugin, PlaceholderProvider... placeholders){
return new AdvancedServerList<>(plugin, Arrays.asList(placeholders));
}
public PluginCore<F> getPlugin(){
@@ -125,8 +125,18 @@ public class AdvancedServerList<F>{
return;
}
if(getFileHandler().isOldConfig()){
getPlugin().getPluginLogger().info("Detected old config.yml. Attempting to migrate...");
if(getFileHandler().migrateConfig()){
getPlugin().getPluginLogger().info("Migration completed successfully!");
}else{
getPlugin().getPluginLogger().warn("Couldn't migrate config.yml! Check previous lines for errors.");
return;
}
}
if(getFileHandler().loadProfiles()){
getPlugin().getPluginLogger().info("Successfully loaded " + getFileHandler().getProfiles().size() + " profiles!");
getPlugin().getPluginLogger().info("Successfully loaded %d profile(s)!", getFileHandler().getProfiles().size());
}else{
getPlugin().getPluginLogger().warn("Unable to load profiles! Check previous lines for errors.");
return;
@@ -153,7 +163,7 @@ public class AdvancedServerList<F>{
getPlugin().getPluginLogger().info("AdvancedServerList is ready!");
if(getFileHandler().getBoolean("check_updates"))
if(getFileHandler().getBoolean("checkUpdates"))
this.updateChecker = new UpdateChecker(this);
}
@@ -32,6 +32,8 @@ import java.util.concurrent.ThreadFactory;
public class UpdateCheckThread implements ThreadFactory{
@Override
public Thread newThread(@NotNull Runnable r){
return new Thread(r, "AdvancedServerList Update-Thread");
Thread t = new Thread(r, "AdvancedServerList-UpdateThread");
t.setDaemon(true);
return t;
}
}
@@ -52,7 +52,7 @@ public class UpdateChecker{
private final String url = "https://api.modrinth.com/v2/project/advancedserverlist/version?loaders=[\"%s\"]";
private final OkHttpClient client = new OkHttpClient();
private final AdvancedServerList core;
private final AdvancedServerList<?> core;
private final PluginLogger logger;
private final String loader;
@@ -65,7 +65,7 @@ public class UpdateChecker{
private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new UpdateCheckThread());
public UpdateChecker(AdvancedServerList core){
public UpdateChecker(AdvancedServerList<?> core){
this.core = core;
this.logger = core.getPlugin().getPluginLogger();
this.loader = core.getPlugin().getLoader();
@@ -81,10 +81,12 @@ public class UpdateChecker{
logger.warn("Failed to look for any updates. See previous messages for reasons.");
return;
}
logger.debug(UpdateChecker.class, "Comparing versions...");
int result = version.compare(core.getVersion());
switch(result){
case -1 -> printUpdateBanner(version.getVersionNumber(), version.getId(), version.isRelease());
case -1 -> printUpdateBanner(version);
case 0 -> logger.info("No new update found. You're running the latest version!");
case 1 -> logger.info(
"Your version (%s) is higher than the latest release (%s). Are you running a dev build?",
@@ -119,21 +121,31 @@ public class UpdateChecker{
private CompletableFuture<ModrinthVersion> checkUpdate(){
return CompletableFuture.supplyAsync(() -> {
PluginLogger logger = core.getPlugin().getPluginLogger();
String finalUrl = String.format(url, loader);
logger.debug(UpdateChecker.class, "Looking for updates on '%s'...", finalUrl);
if(core.getVersion().equals("UNKNOWN")){
logger.warn("Cannot perform Update check! Plugin version couldn't be parsed.");
return null;
}
Request request = new Request.Builder()
.url(String.format(url, loader))
.url(finalUrl)
.header("User-Agent", "AdvancedServerList-" + loader + "/" + core.getVersion())
.build();
logger.debug(UpdateChecker.class, "Connecting to website...");
try(Response response = client.newCall(request).execute()){
logger.debug(UpdateChecker.class, "Connected! Checking response code...");
if(!response.isSuccessful()){
logger.warn("Encountered a non-successful response from Modrinth! Code: %d", response.code());
return null;
}
logger.debug(UpdateChecker.class, "Received positive response code '%d'", response.code());
ResponseBody body = response.body();
if(body == null){
@@ -147,6 +159,8 @@ public class UpdateChecker{
return null;
}
logger.debug(UpdateChecker.class, "Received non-empty response body. Parsing it from JSON Array...");
List<ModrinthVersion> list = gson.fromJson(responseString, listType);
if(list == null || list.isEmpty()){
logger.warn("Couldn't convert JSON Array into a valid list.");
@@ -155,11 +169,15 @@ public class UpdateChecker{
ModrinthVersion version = list.get(0);
logger.debug(UpdateChecker.class, "Found entry '%s'", version);
if(version.getVersionNumber() == null || version.getVersionNumber().isEmpty()){
logger.warn("Cannot check latest version. Received version number was null/empty.");
return null;
}
logger.debug(UpdateChecker.class, "Successfully parsed version!");
return version;
}catch(JsonSyntaxException ex){
logger.warn("Encountered invalid JSON from Response body!", ex);
@@ -171,22 +189,22 @@ public class UpdateChecker{
});
}
private void printUpdateBanner(String version, String versionId, boolean isRelease){
private void printUpdateBanner(ModrinthVersion version){
logger.info("==================================================================");
logger.info("You are running an outdated version of AdvancedServerList!");
logger.info("");
logger.info("Your version: %s", core.getVersion());
logger.info("Modrinth version: %s", version);
logger.info("Modrinth version: %s", version.getVersionNumber());
logger.info("");
if(!isRelease){
if(!version.isRelease()){
logger.info("WARNING: This release is an Alpha/Beta! It may contain");
logger.info(" breaking changes!");
logger.info("");
}
logger.info("You can download the latest release from here:");
logger.info("https://modrinth.com/plugin/advancedserverlist/version/%s", versionId);
logger.info("https://modrinth.com/plugin/advancedserverlist/version/%s", version.getId());
logger.info("==================================================================");
}
@@ -219,5 +237,10 @@ public class UpdateChecker{
public int compare(String version){
return FlexVerComparator.compare(version, versionNumber);
}
@Override
public String toString(){
return String.format("ModrinthVersion{id=%s,versionNumber=%s,versionType=%s}", id, versionNumber, versionNumber);
}
}
}
@@ -36,7 +36,7 @@ public class CommandHandler{
private final List<PluginCommand> subCommands = new ArrayList<>();
public CommandHandler(AdvancedServerList core){
public CommandHandler(AdvancedServerList<?> core){
subCommands.add(new Help());
subCommands.add(new Reload(core));
subCommands.add(new ClearCache(core));
@@ -78,7 +78,7 @@ public class CommandHandler{
sender.sendMsg();
sender.sendMsg("<aqua>/asl <white>help <grey>- Shows this help");
sender.sendMsg();
sender.sendMsg("<aqua>/asl <white>reload <grey>- Reloads the plugin and clears caches");
sender.sendMsg("<aqua>/asl <white>reload <grey>- Reloads the config.yml and profiles");
sender.sendMsg();
sender.sendMsg("<aqua>/asl <white>clearCache <grey>- Clears the Player and Favicon cache");
}
@@ -86,9 +86,9 @@ public class CommandHandler{
private static class Reload extends PluginCommand{
private final AdvancedServerList core;
private final AdvancedServerList<?> core;
public Reload(AdvancedServerList core){
public Reload(AdvancedServerList<?> core){
super("reload");
this.core = core;
@@ -110,21 +110,15 @@ public class CommandHandler{
sender.sendErrorMsg("<red>Error while loading profile(s)!");
}
core.clearFaviconCache();
sender.sendPrefixedMsg("<green>Successfully cleared Favicon Cache!");
core.clearPlayerCache();
sender.sendPrefixedMsg("<green>Successfully cleared Player Cache!");
sender.sendPrefixedMsg("<green>Reload complete!");
}
}
private static class ClearCache extends PluginCommand{
private final AdvancedServerList core;
private final AdvancedServerList<?> core;
public ClearCache(AdvancedServerList core){
public ClearCache(AdvancedServerList<?> core){
super("clearCache");
this.core = core;
@@ -23,14 +23,20 @@
*
*/
package ch.andre601.advancedserverlist.bukkit;
package ch.andre601.advancedserverlist.core.compat.maintenance;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
import org.bukkit.plugin.java.JavaPlugin;
import eu.kennytv.maintenance.api.Maintenance;
import eu.kennytv.maintenance.api.MaintenanceProvider;
/*
* Small convenience class to "merge" the PluginCore and JavaPlugin classes.
* Allows me to have BukkitCore<?> for whenever I also need a JavaPlugin (i.e. registering events).
* See JoinEvent class for an example.
*/
public abstract class BukkitCore<F> extends JavaPlugin implements PluginCore<F>{}
public class MaintenanceUtil{
private final Maintenance api;
public MaintenanceUtil(){
this.api = MaintenanceProvider.get();
}
public boolean isMaintenanceEnabled(){
return api.isMaintenance();
}
}
@@ -0,0 +1,49 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.core.compat.papi;
import java.util.function.Supplier;
public class PAPICache{
private CacheValue cache = null;
public PAPICache(){}
public String get(Supplier<String> supplier){
if(cache == null || cache.isExpired())
cache = new CacheValue(supplier.get(), System.currentTimeMillis());
return cache.server();
}
private record CacheValue(String server, long timestamp){
// Consider the cache expired if it is older than 5 seconds.
public boolean isExpired(){
return (timestamp < 0L) || System.currentTimeMillis() - timestamp >= 5000L;
}
}
}
@@ -0,0 +1,87 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.core.compat.papi;
import net.william278.papiproxybridge.api.PlaceholderAPI;
import java.util.*;
import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
public class PAPIUtil{
private final PlaceholderAPI papi;
private final PAPICache cache = new PAPICache();
public PAPIUtil(){
this.papi = PlaceholderAPI.createInstance();
}
// Make sure the version of PAPIProxyBridge we get has the required methods we need...
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean isCompatible(){
try{
papi.getClass().getMethod("findServers");
return true;
}catch(NoSuchMethodException ex){
return false;
}
}
public String getServer(){
return cache.get(() -> {
List<String> servers;
try{
servers = papi.findServers().getNow(Collections.emptyList());
}catch(CancellationException | CompletionException ex){
return null;
}
if(servers == null || servers.isEmpty())
return null;
return servers.get(0);
});
}
public <P> P getPlayer(Collection<P> players){
if(players.isEmpty())
return null;
return List.copyOf(players).get(0);
}
public String parse(String text, UUID carrier, UUID player){
try{
CompletableFuture<String> future = papi.formatPlaceholders(text, carrier, player);
return future.getNow(text);
}catch(IllegalArgumentException | CancellationException | CompletionException ex){
return text;
}
}
}
@@ -29,9 +29,11 @@ import ch.andre601.advancedserverlist.api.events.GenericServerListEvent;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.core.compat.maintenance.MaintenanceUtil;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
import ch.andre601.advancedserverlist.core.interfaces.events.GenericEventWrapper;
import ch.andre601.advancedserverlist.core.objects.GenericServerImpl;
import ch.andre601.advancedserverlist.core.compat.papi.PAPIUtil;
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
import ch.andre601.advancedserverlist.core.profiles.profile.ProfileManager;
@@ -39,12 +41,21 @@ import ch.andre601.advancedserverlist.core.profiles.replacer.StringReplacer;
public class PingEventHandler{
private static PAPIUtil papiUtil = null;
private static MaintenanceUtil maintenanceUtil = null;
public static <F, P extends GenericPlayer> void handleEvent(GenericEventWrapper<F, P> event){
if(event.isInvalidProtocol())
event.getPlugin().getPluginLogger().debug(PingEventHandler.class, "Received ping event. Handling it...");
if(event.isInvalidProtocol() || event.isMaintenanceModeActive()){
event.getPlugin().getPluginLogger().debug(PingEventHandler.class, "Not handling event. Either protocol was invalid of Maintenance is enabled.");
return;
}
PluginCore<F> plugin = event.getPlugin();
String host = event.getVirtualHost();
PluginLogger logger = plugin.getPluginLogger();
logger.debug(PingEventHandler.class, "Protocol valid. Continue handling...");
int online = event.getOnlinePlayers();
int max = event.getMaxPlayers();
@@ -53,29 +64,54 @@ public class PingEventHandler{
plugin.getCore().getPlayerHandler().getCachedPlayer(event.getPlayerIP()),
event.getProtocolVersion()
);
GenericServer server = new GenericServerImpl(online, max, host);
GenericServer server = event.createGenericServer(online, max, host);
ServerListProfile profile = ProfileManager.resolveProfile(plugin.getCore(), player, server);
if(profile == null)
if(profile == null){
logger.debugWarn(PingEventHandler.class, "Server List Profile couldn't be resolved properly. Cancelling event handling...");
return;
}
logger.debug(PingEventHandler.class, "Received valid Server List Profile. Calling PreServerListSetEvent...");
GenericServerListEvent e = event.callEvent(ProfileManager.merge(profile));
if(e == null || e.isCancelled())
if(e == null || e.isCancelled()){
logger.debug(PingEventHandler.class, "PreServerListSetEvent was cancelled. Stopping ping handling...");
return;
}
logger.debug(PingEventHandler.class, "PreServerListSetEvent completed. Proceeding with ping handling...");
ProfileEntry entry = e.getEntry();
if(entry.isInvalid())
if(entry.isInvalid()){
logger.debugWarn(PingEventHandler.class, "No valid ProfileEntry retrieved. Cancelling ping handling...");
return;
}
if(ProfileManager.checkOption(entry.extraPlayersEnabled())){
boolean extraPlayers = ProfileManager.checkOption(entry.extraPlayersEnabled());
if(extraPlayers){
max = online + (entry.extraPlayersCount() == null ? 0 : entry.extraPlayersCount());
logger.debug(PingEventHandler.class, "Extra Players enabled. Applying '%d' as max player count...", max);
event.setMaxPlayers(max);
}
GenericServer finalServer = new GenericServerImpl(online, max, host);
if(ProfileManager.checkOption(entry.maxPlayersEnabled()) && !extraPlayers){
max = (entry.maxPlayersCount() == null) ? 0 : entry.maxPlayersCount();
logger.debug(PingEventHandler.class, "Max Players enabled. Applying '%d' as max player count...", max);
event.setMaxPlayers(max);
}
GenericServer finalServer = event.createGenericServer(online, max, host);
if(ProfileManager.checkOption(entry.motd())){
logger.debug(PingEventHandler.class, "MOTD set. Applying '%s'...", String.join("\\n", entry.motd()));
event.setMotd(
ComponentParser.list(entry.motd())
.modifyText(text -> StringReplacer.replace(text, player, finalServer))
@@ -87,10 +123,14 @@ public class PingEventHandler{
boolean hidePlayers = ProfileManager.checkOption(entry.hidePlayersEnabled());
if(hidePlayers){
logger.debug(PingEventHandler.class, "Hide Players enabled. Hiding player count...");
event.hidePlayers();
}
if(ProfileManager.checkOption(entry.playerCountText()) && !hidePlayers){
logger.debug(PingEventHandler.class, "Player Count Text set. Applying '%s'...", entry.playerCountText());
event.setPlayerCount(
ComponentParser.text(entry.playerCountText())
.modifyText(text -> StringReplacer.replace(text, player, finalServer))
@@ -100,14 +140,19 @@ public class PingEventHandler{
}
if(ProfileManager.checkOption(entry.players()) && !hidePlayers){
logger.debug(PingEventHandler.class, "Player Count Hover set. Applying '%s'...", String.join("\\n", entry.players()));
event.setPlayers(entry.players(), player, server);
}
if(ProfileManager.checkOption(entry.favicon())){
logger.debug(PingEventHandler.class, "Favicon set. Resolving '%s'...", entry.favicon());
String favicon = StringReplacer.replace(entry.favicon(), player, server);
F fav = plugin.getFaviconHandler().getFavicon(favicon, image -> {
try{
logger.debug(PingEventHandler.class, "Converting BufferedImage to Server or Proxy Favicon instance...");
return event.createFavicon(image);
}catch(Exception ex){
plugin.getPluginLogger().warn("Encountered an Exception while creating Favicon!", ex);
@@ -116,12 +161,31 @@ public class PingEventHandler{
});
if(fav == null){
logger.debugWarn(PingEventHandler.class, "Favicon was invalid or not yet resolved! Using default favicon of Server/Proxy...");
event.setDefaultFavicon();
}else{
logger.debug(PingEventHandler.class, "Applying favicon...");
event.setFavicon(fav);
}
}
logger.debug(PingEventHandler.class, "Event handling completed. Updating Ping data...");
event.updateEvent();
}
public static PAPIUtil getPAPIUtil(){
if(papiUtil != null)
return papiUtil;
return (papiUtil = new PAPIUtil());
}
public static MaintenanceUtil getMaintenanceUtil(){
if(maintenanceUtil != null)
return maintenanceUtil;
return (maintenanceUtil = new MaintenanceUtil());
}
}
@@ -0,0 +1,103 @@
/*
* MIT License
*
* Copyright (c) 2022-2023 Andre_601
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package ch.andre601.advancedserverlist.core.file;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import org.spongepowered.configurate.ConfigurateException;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.NodePath;
import org.spongepowered.configurate.transformation.ConfigurationTransformation;
import org.spongepowered.configurate.transformation.TransformAction;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class ConfigMigrator{
public static final int LATEST = resolveConfigVersion();
private ConfigMigrator(){}
public static ConfigurationTransformation.Versioned create(){
return ConfigurationTransformation.versionedBuilder()
.versionKey("configVersion")
.addVersion(LATEST, twoToThree())
.addVersion(2, oneToTwo())
.build();
}
public static ConfigurationTransformation twoToThree(){
return ConfigurationTransformation.builder()
.addAction(NodePath.path(), ((path, value) -> {
value.node("debug").set(false);
return null;
}))
.build();
}
public static ConfigurationTransformation oneToTwo(){
return ConfigurationTransformation.builder()
.addAction(NodePath.path("unknown_player"), (path, value) -> new Object[]{"unknownPlayer", "name"})
.addAction(NodePath.path("unknown_player_uuid"), (path, value) -> new Object[]{"unknownPlayer", "uuid"})
.addAction(NodePath.path("disable_cache"), TransformAction.rename("disableCache"))
.addAction(NodePath.path("check_updates"), TransformAction.rename("checkUpdates"))
.addAction(NodePath.path("send_statistics"), TransformAction.rename("sendStatistics"))
.addAction(NodePath.path(), (path, value) -> {
value.node("configVersion").set(LATEST);
return null;
})
.build();
}
public static <N extends ConfigurationNode> N updateNode(final N node, PluginLogger logger) throws ConfigurateException{
if(!node.virtual()){
final ConfigurationTransformation.Versioned versioned = create();
final int startVersion = versioned.version(node);
versioned.apply(node);
final int endVersion = versioned.version(node);
if(startVersion < endVersion)
logger.info("Migrated config.yml from v" + startVersion + " to v" + endVersion);
}
return node;
}
private static int resolveConfigVersion(){
try(InputStream is = AdvancedServerList.class.getResourceAsStream("/version.properties")){
Properties properties = new Properties();
properties.load(is);
return Integer.parseInt(properties.getProperty("config-version"));
}catch(IOException | NumberFormatException ex){
return -1;
}
}
}
@@ -30,7 +30,9 @@ import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.core.profiles.profile.ProfileSerializer;
import org.spongepowered.configurate.ConfigurateException;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.yaml.NodeStyle;
import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
import java.io.File;
@@ -38,13 +40,16 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
public class FileHandler{
private final AdvancedServerList plugin;
private final AdvancedServerList<?> plugin;
private final PluginLogger logger;
private final Path config;
@@ -54,7 +59,7 @@ public class FileHandler{
private ConfigurationNode node = null;
public FileHandler(AdvancedServerList core){
public FileHandler(AdvancedServerList<?> core){
this.plugin = core;
this.logger = core.getPlugin().getPluginLogger();
@@ -68,7 +73,7 @@ public class FileHandler{
public boolean loadConfig(){
logger.info("Loading config.yml...");
File folder = config.toFile().getParentFile();
File folder = plugin.getPlugin().getFolderPath().toFile();
if(!folder.exists() && !folder.mkdirs()){
logger.warn("Couldn't create folder for plugin. Is it missing Write permissions?");
return false;
@@ -82,6 +87,7 @@ public class FileHandler{
}
Files.copy(stream, config);
logger.info("Created new config.yml!");
}catch(IOException ex){
logger.warn("Cannot create config.yml for plugin.", ex);
return false;
@@ -112,6 +118,26 @@ public class FileHandler{
return reloadProfiles();
}
public boolean migrateConfig(){
YamlConfigurationLoader loader = YamlConfigurationLoader.builder()
.path(config)
.nodeStyle(NodeStyle.BLOCK)
.build();
if(!makeBackup())
return false;
try{
node = ConfigMigrator.updateNode(loader.load(), logger);
loader.save(node);
return true;
}catch(ConfigurateException ex){
logger.warn("Error while trying to migrate config.yml.", ex);
return false;
}
}
public boolean reloadConfig(){
return (node = getConfigurationNode(config)) != null;
}
@@ -131,7 +157,7 @@ public class FileHandler{
continue;
profiles.add(ServerListProfile.Builder.resolve(file.getName(), tmp, logger).build());
logger.info("Loaded " + file.getName());
logger.info("Loaded '%s'!", file.getName());
}
if(profiles.isEmpty()){
@@ -152,7 +178,7 @@ public class FileHandler{
try{
return loader.load();
}catch(IOException ex){
logger.warn("Cannot load " + path.toFile().getName() + " due to an IOException!", ex);
logger.warn("Cannot load '%s' due to an IOException!", ex, path.toFile().getName());
return null;
}
}
@@ -164,4 +190,36 @@ public class FileHandler{
public boolean getBoolean(Object... path){
return node.node(path).getBoolean();
}
public boolean isOldConfig(){
return node.node("configVersion").virtual() || node.node("configVersion").getInt(0) < ConfigMigrator.LATEST;
}
private boolean makeBackup(){
logger.info("Making backup of old config.yml...");
File backups = plugin.getPlugin().getFolderPath().resolve("backups").toFile();
if(!backups.exists() && !backups.mkdirs()){
logger.warn("Cannot create backups folder for migration!");
return false;
}
String date = DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(LocalDateTime.now());
File configBackup = new File(backups, "config_" + date.replace(":", "_") + ".yml");
try{
if(!configBackup.exists() && !configBackup.createNewFile()){
logger.warn("Cannot create backup file for config.yml!");
return false;
}
Files.copy(config, configBackup.toPath(), StandardCopyOption.REPLACE_EXISTING);
logger.info("Saved backup as '%s'!", configBackup.getName());
return true;
}catch(IOException ex){
logger.warn("Encountered IOException while trying to create a backup.", ex);
return false;
}
}
}
@@ -27,6 +27,10 @@ package ch.andre601.advancedserverlist.core.interfaces;
public interface PluginLogger{
void debug(Class<?> clazz, String msg, Object... args);
void debugWarn(Class<?> clazz, String msg, Object... args);
void info(String msg, Object... args);
void warn(String msg, Object... args);
@@ -41,7 +41,7 @@ public interface PluginCore<F>{
void clearFaviconCache();
AdvancedServerList getCore();
AdvancedServerList<F> getCore();
Path getFolderPath();
@@ -54,4 +54,8 @@ public interface PluginCore<F>{
String getPlatformVersion();
String getLoader();
default boolean isDebugEnabled(){
return getCore().getFileHandler().getBoolean("debug");
}
}
@@ -59,6 +59,8 @@ public interface GenericEventWrapper<F, P extends GenericPlayer>{
boolean isInvalidProtocol();
boolean isMaintenanceModeActive();
int getProtocolVersion();
int getOnlinePlayers();
@@ -75,6 +77,8 @@ public interface GenericEventWrapper<F, P extends GenericPlayer>{
P createPlayer(CachedPlayer player, int protocol);
GenericServer createGenericServer(int playersOnline, int playersMax, String host);
F createFavicon(BufferedImage image) throws Exception;
default String resolveHost(InetSocketAddress address){
@@ -127,12 +127,24 @@ public class Expression{
return left.equals(right);
}
},
EQUALS_IGNORE_CASE('~', '='){
@Override
public boolean evaluate(String left, String right){
return left.equalsIgnoreCase(right);
}
},
NOT_EQUAL('!', '='){
@Override
public boolean evaluate(String left, String right){
return !left.equals(right);
}
},
NOT_EQUAL_IGNORE_CASE('!', '~'){
@Override
public boolean evaluate(String left, String right){
return !left.equalsIgnoreCase(right);
}
},
GREATER('>', '\0'){
@Override
public boolean evaluate(String left, String right){
@@ -172,7 +184,7 @@ public class Expression{
public static Operator getOperand(char first, char second){
for(Operator operator : VALUES){
if(operator.first == first){
if((!operator.hasSecond() && second != '=') || operator.second == second)
if((!operator.hasSecond() && second != '=' && second != '~') || operator.second == second)
return operator;
}
}
@@ -39,32 +39,27 @@ import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.Locale;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
import java.util.function.Function;
public class FaviconHandler<F>{
private final Cache<String, F> favicons = CacheBuilder.newBuilder()
private final Cache<String, CompletableFuture<F>> favicons = CacheBuilder.newBuilder()
.expireAfterWrite(5, TimeUnit.MINUTES)
.build();
private final AdvancedServerList core;
private final AdvancedServerList<F> core;
private final ThreadPoolExecutor faviconThreadPool;
public FaviconHandler(AdvancedServerList core){
public FaviconHandler(AdvancedServerList<F> core){
this.core = core;
this.faviconThreadPool = createFaviconThreadPool();
}
public F getFavicon(String input, Function<BufferedImage, F> function){
try{
return favicons.get(input, () -> {
BufferedImage image = resolveImage(core, input);
if(image == null)
return null;
return function.apply(image);
});
}catch(ExecutionException ignored){
return favicons.get(input, () -> convert(input, function)).getNow(null);
}catch(ExecutionException e){
return null;
}
}
@@ -73,13 +68,36 @@ public class FaviconHandler<F>{
favicons.invalidateAll();
}
private BufferedImage resolveImage(AdvancedServerList core, String input){
private CompletableFuture<F> convert(String input, Function<BufferedImage, F> function){
return CompletableFuture.supplyAsync(() -> {
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Getting BufferedImage for input '%s'...", input);
BufferedImage img = resolveImage(core, input);
if(img == null){
core.getPlugin().getPluginLogger().debugWarn(FaviconHandler.class, "No BufferedImage could be created!");
return null;
}
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Received BufferedImage! Applying it...");
return function.apply(img);
}, faviconThreadPool);
}
private BufferedImage resolveImage(AdvancedServerList<F> core, String input){
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Resolving favicon for input '%s'...", input);
InputStream stream;
if(input.toLowerCase(Locale.ROOT).startsWith("https://")){
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "URL detected. Getting file from it...");
stream = getFromUrl(core, input);
}else
if(input.toLowerCase(Locale.ROOT).endsWith(".png")){
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Image file detected. Trying to reolve it...");
File folder = core.getPlugin().getFolderPath().resolve("favicons").toFile();
if(!folder.exists()){
core.getPlugin().getPluginLogger().warn("Cannot get Favicon %s from favicons folder. Folder doesn't exist!", input);
@@ -90,12 +108,16 @@ public class FaviconHandler<F>{
try{
stream = new FileInputStream(file);
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Resolved image file!");
}catch(IOException ex){
core.getPlugin().getPluginLogger().warn("Cannot create Favicon from File %s.", input);
core.getPlugin().getPluginLogger().warn("Cause: %s", ex.getMessage());
return null;
}
}else{
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Possible player name/UUID detected. Using https://mc-heads.net/avatar/%s/64...", input);
stream = getFromUrl(core, "https://mc-heads.net/avatar/" + input + "/64");
}
@@ -111,6 +133,8 @@ public class FaviconHandler<F>{
return null;
}
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Resizing image to 64x64 pixels...");
BufferedImage favicon = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);
Graphics2D img = favicon.createGraphics();
@@ -118,6 +142,7 @@ public class FaviconHandler<F>{
img.drawImage(original, 0, 0, 64, 64, null);
img.dispose();
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Image resized!");
return favicon;
}catch(IOException ex){
core.getPlugin().getPluginLogger().warn("Unable to create Favicon. Encountered IOException during creation.");
@@ -126,13 +151,16 @@ public class FaviconHandler<F>{
}
}
private InputStream getFromUrl(AdvancedServerList core, String url){
private InputStream getFromUrl(AdvancedServerList<F> core, String url){
try{
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "Resolving URL '%s'...", url);
URL faviconUrl = new URL(url);
URLConnection connection = faviconUrl.openConnection();
connection.setRequestProperty("User-Agent", "AdvancedServerList/" + core.getVersion());
connection.connect();
core.getPlugin().getPluginLogger().debug(FaviconHandler.class, "URL resolved!");
return connection.getInputStream();
}catch(IOException ex){
core.getPlugin().getPluginLogger().warn("Error while connecting to %s for Favicon creation.", url);
@@ -140,4 +168,12 @@ public class FaviconHandler<F>{
return null;
}
}
private ThreadPoolExecutor createFaviconThreadPool(){
return new ThreadPoolExecutor(3, 3, 60L, TimeUnit.SECONDS, new LinkedBlockingDeque<>(1024), r -> {
Thread t = new Thread(r, "AdvancedServerList-FaviconThread");
t.setDaemon(true);
return t;
});
}
}
@@ -31,33 +31,31 @@ import ch.andre601.advancedserverlist.core.objects.CachedPlayer;
import com.google.gson.Gson;
import io.leangen.geantyref.TypeToken;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.Reader;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.*;
public class PlayerHandler{
private final AdvancedServerList core;
private final AdvancedServerList<?> core;
private final PluginLogger logger;
private final Path cache;
private List<CachedPlayer> cachedPlayers = new ArrayList<>();
private final Type listType = new TypeToken<ArrayList<CachedPlayer>>(){}.getType();
private final Gson gson = new Gson();
// UUID of MHF_Question
private final String defaultUUID = "606e2ff0-ed77-4842-9d6c-e1d3321c7838";
private final UUID defaultUUID = UUID.fromString("606e2ff0-ed77-4842-9d6c-e1d3321c7838");
private List<CachedPlayer> cachedPlayers = new ArrayList<>();
private CachedPlayer defaultPlayer = null;
public PlayerHandler(AdvancedServerList core){
public PlayerHandler(AdvancedServerList<?> core){
this.core = core;
this.logger = core.getPlugin().getPluginLogger();
this.cache = core.getPlugin().getFolderPath().resolve("playercache.json");
@@ -69,13 +67,13 @@ public class PlayerHandler{
return;
}
if(core.getFileHandler().getBoolean("disable_cache")){
if(core.getFileHandler().getBoolean("disableCache")){
logger.info("'disable_cache' is set to true. Skipping playercache.json loading...");
return;
}
try{
Reader reader = Files.newBufferedReader(cache);
BufferedReader reader = Files.newBufferedReader(cache);
cachedPlayers = gson.fromJson(reader, listType);
@@ -85,6 +83,14 @@ public class PlayerHandler{
return;
}
// In case Gson messes up... I guess.
if(cachedPlayers == null){
logger.warn("Couldn't load players from playercache.json file. Is the JSON valid?");
// Create new ArrayList instance to avoid further issues.
cachedPlayers = new ArrayList<>();
return;
}
logger.info("Loaded %d players into cache!", cachedPlayers.size());
}
@@ -94,7 +100,7 @@ public class PlayerHandler{
return;
}
if(core.getFileHandler().getBoolean("disable_cache")){
if(core.getFileHandler().getBoolean("disableCache")){
logger.info("'disable_cache' is set to true. Skipping saving of cached players...");
return;
}
@@ -110,14 +116,14 @@ public class PlayerHandler{
}
public void addPlayer(String ip, String name, UUID uuid){
if(contains(ip) || core.getFileHandler().getBoolean("disable_cache"))
if(contains(ip) || core.getFileHandler().getBoolean("disableCache"))
return;
cachedPlayers.add(new CachedPlayer(ip, name, uuid));
}
public CachedPlayer getCachedPlayer(String key){
if(!contains(key) || core.getFileHandler().getBoolean("disable_cache"))
if(!contains(key) || core.getFileHandler().getBoolean("disableCache"))
return getDefaultPlayer();
for(CachedPlayer player : cachedPlayers){
@@ -157,8 +163,8 @@ public class PlayerHandler{
return (defaultPlayer = new CachedPlayer(
"0.0.0.0",
core.getFileHandler().getString("Anonymous", "unknown_player"),
convertToUUID(core.getFileHandler().getString(defaultUUID, "unknown_player_uuid"))
core.getFileHandler().getString("Anonymous", "unknownPlayer", "name"),
convertToUUID(core.getFileHandler().getString(defaultUUID.toString(), "unknownPlayer", "uuid"))
));
}
@@ -167,7 +173,7 @@ public class PlayerHandler{
return UUID.fromString(uuid);
}catch(IllegalArgumentException ex){
// This is always a valid UUID.
return UUID.fromString(defaultUUID);
return defaultUUID;
}
}
@@ -53,13 +53,16 @@ public class ProfileManager{
String favicon = resolveFavicon(entry, defEntry);
boolean isHidePlayersEnabled = resolveHidePlayersEnabled(entry, defEntry);
boolean isExtraPlayersEnabled = resolveExtraPlayersEnabled(entry, defEntry);
boolean isMaxPlayersEnabled = resolveMaxPlayersEnabled(entry, defEntry);
Integer extraPlayersCount = resolveExtraPlayersCount(entry, defEntry);
Integer maxPlayersCount = resolveMaxPlayersCount(entry, defEntry);
return new ProfileEntry(motd, players, playerCountText, favicon,
NullBool.resolve(isHidePlayersEnabled), NullBool.resolve(isExtraPlayersEnabled), extraPlayersCount);
NullBool.resolve(isHidePlayersEnabled), NullBool.resolve(isExtraPlayersEnabled), NullBool.resolve(isMaxPlayersEnabled),
extraPlayersCount, maxPlayersCount);
}
public static ServerListProfile resolveProfile(AdvancedServerList core, GenericPlayer player, GenericServer server){
public static ServerListProfile resolveProfile(AdvancedServerList<?> core, GenericPlayer player, GenericServer server){
for(ServerListProfile profile : core.getFileHandler().getProfiles()){
if(profile.isInvalidProfile())
continue;
@@ -78,7 +81,9 @@ public class ProfileManager{
String favicon = node.node("favicon").getString("");
NullBool hidePlayers = resolveNullBool(node, "playerCount", "hidePlayers");
NullBool extraPlayersEnabled = resolveNullBool(node, "playerCount", "extraPlayers", "enabled");
Integer extraPlayers = resolveNullableInt(node);
NullBool maxPlayersEnabled = resolveNullBool(node, "playerCount", "maxPlayers", "enabled");
Integer extraPlayers = resolveNullableInt(node, "playerCount", "extraPlayers", "amount");
Integer maxPlayers = resolveNullableInt(node, "playerCount", "maxPlayers", "amount");
return new ProfileEntry.Builder()
.setMotd(motd)
@@ -87,7 +92,9 @@ public class ProfileManager{
.setFavicon(favicon)
.setHidePlayersEnabled(hidePlayers)
.setExtraPlayersEnabled(extraPlayersEnabled)
.setExtraPlayerCount(extraPlayers)
.setMaxPlayersEnabled(maxPlayersEnabled)
.setExtraPlayersCount(extraPlayers)
.setMaxPlayersCount(maxPlayers)
.build();
}
@@ -150,6 +157,13 @@ public class ProfileManager{
return profile.extraPlayersEnabled().getOrDefault(false);
}
private static boolean resolveMaxPlayersEnabled(ProfileEntry profile, ProfileEntry defaultProfile){
if(profile == null || !checkOption(profile.maxPlayersEnabled()))
return defaultProfile.maxPlayersEnabled().getOrDefault(false);
return profile.maxPlayersEnabled().getOrDefault(false);
}
private static Integer resolveExtraPlayersCount(ProfileEntry profile, ProfileEntry defaultProfile){
if(profile == null || profile.extraPlayersCount() == null)
return defaultProfile.extraPlayersCount() == null ? 0 : defaultProfile.extraPlayersCount();
@@ -157,6 +171,13 @@ public class ProfileManager{
return profile.extraPlayersCount();
}
private static Integer resolveMaxPlayersCount(ProfileEntry profile, ProfileEntry defaultProfile){
if(profile == null || profile.maxPlayersCount() == null)
return defaultProfile.maxPlayersCount() == null ? 0 : defaultProfile.maxPlayersCount();
return profile.maxPlayersCount();
}
private static List<String> resolveList(ConfigurationNode node, Object... path){
try{
return node.node(path).getList(String.class);
@@ -172,10 +193,10 @@ public class ProfileManager{
return NullBool.resolve(node.node(path).getBoolean());
}
private static Integer resolveNullableInt(ConfigurationNode node){
if(node.node("playerCount", "extraPlayers", "amount").virtual())
private static Integer resolveNullableInt(ConfigurationNode node, Object... path){
if(node.node(path).virtual())
return null;
return node.node("playerCount", "extraPlayers", "amount").getInt();
return node.node(path).getInt();
}
}
@@ -52,8 +52,10 @@ public class ProfileSerializer implements TypeSerializer<ProfileEntry>{
node.node("playerCount", "hover").set(profile.players());
node.node("playerCount", "text").set(profile.playerCountText());
node.node("favicon").set(profile.favicon());
node.node("playerCount", "hidePlayers").set(profile.hidePlayersEnabled());
node.node("playerCount", "extraPlayers", "enabled").set(profile.extraPlayersEnabled());
node.node("playerCount", "extraPlayers", "amount").set(profile.extraPlayersCount());
node.node("playerCount", "hidePlayers").set(profile.hidePlayersEnabled().getOrDefault(false));
node.node("playerCount", "extraPlayers", "enabled").set(profile.extraPlayersEnabled().getOrDefault(false));
node.node("playerCount", "extraPlayers", "amount").set((profile.extraPlayersCount() == null) ? 0 : profile.extraPlayersCount());
node.node("playerCount", "maxPlayers", "enabled").set(profile.maxPlayersEnabled().getOrDefault(false));
node.node("playerCount", "maxPlayers", "amount").set((profile.maxPlayersCount() == null) ? 0 : profile.maxPlayersCount());
}
}
+32 -15
View File
@@ -1,27 +1,25 @@
#
# Used for when AdvancedServerList doesn't have a cached player to use for ${player name}
# Used for when AdvancedServerList doesn't have a cached player to use for player placeholders.
#
# Defaults to 'Anonymous' when not present.
#
unknown_player: "Anonymous"
#
# UUID used for when AdvancedServerList doesn't have a cached player to use for the ${player uuid}
# placeholder.
#
# Defaults to the UUID of MHF_Question (606e2ff0-ed77-4842-9d6c-e1d3321c7838) when not present.
#
unknown_player_uuid: "606e2ff0-ed77-4842-9d6c-e1d3321c7838"
unknownPlayer:
#
# The name to use. Defaults to Anonymous.
#
name: "Anonymous"
#
# The UUID to use. Defaults to 606e2ff0-ed77-4842-9d6c-e1d3321c7838 (UUID of MHF_Question).
#
uuid: "606e2ff0-ed77-4842-9d6c-e1d3321c7838"
#
# Should the Caching of players be disabled?
#
# When set to true will AdvancedServerList not load any players from the cache.data file (if present) nor save any to it.
# Placeholders that rely on the player being cached (such as ${player isWhitelisted}) will not work while this option is enabled.
# Placeholders that rely on the player being cached (such as ${player name}) will not work while this option is enabled.
#
# Defaults to false when not present.
#
disable_cache: false
disableCache: false
#
# Should AdvancedServerList check for new versions?
@@ -31,4 +29,23 @@ disable_cache: false
#
# Defaults to false when not present.
#
check_updates: true
checkUpdates: true
#
# Should debug mode be enabled?
#
# When set to true will AdvancedServerList print additional messages to the console prefixed with "[DEBUG]".
# It is recommended to only enable this when having problems or when being told to by the plugin dev, as it could
# otherwise cause significant spam in your console.
#
# Defaults to false when not present.
#
debug: false
#
# DO NOT EDIT!
#
# This is used internally to determine if the config needs to be migrated.
# Changing or even removing this option could result in your config being broken.
#
config-version: ${plugin.config.version}
+42 -13
View File
@@ -2,7 +2,7 @@
# Set the priority of this profile.
# Higher number = Higher priority.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#priority
# Read more: https://asl.andre601.ch/profiles/#priority
#
priority: 0
@@ -10,7 +10,7 @@ priority: 0
# Set conditions that needs to be met.
# Only when all conditions return true will the profile be shown (Given no profile with higher priority is used).
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#conditions
# Read more: https://asl.andre601.ch/profiles/#conditions
#
#conditions:
# - '{playerVersion} < 759'
@@ -25,7 +25,7 @@ priority: 0
#
# Remove this option or set it to profiles: [] to use the global options of this file.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#profiles
# Read more: https://asl.andre601.ch/profiles/#profiles
#
#profiles:
# - motd:
@@ -49,7 +49,7 @@ priority: 0
#
# Remove this option or set it to motd: [] to not alter the MOTD.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#motds
# Read more: https://asl.andre601.ch/profiles/#motd
#
motd:
- '<grey>Line 1'
@@ -64,14 +64,14 @@ motd:
#
# Remove this option or set to favicon: '' to not replace the Favicon.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#favicon
# Read more: https://asl.andre601.ch/profiles/#favicon
#
favicon: ''
#
# Contains various options to manipulate the player count (Text displaying online and max players allowed).
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#playercount
# Read more: https://asl.andre601.ch/profiles/#playercount
#
playerCount:
#
@@ -82,7 +82,7 @@ playerCount:
#
# Defaults to false when not present.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#hideplayers
# Read more: https://asl.andre601.ch/profiles/#hideplayers
#
hidePlayers: false
#
@@ -90,7 +90,7 @@ playerCount:
#
# Remove this option or set it to hover: [] to not modify the player samples on the player count.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#hover
# Read more: https://asl.andre601.ch/profiles/#hover
#
hover:
- '<grey>Line 1'
@@ -104,24 +104,24 @@ playerCount:
#
# Remove this option or set it to text: '' to not modify the player count text.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#text
# Read more: https://asl.andre601.ch/profiles/#text
#
text: ''
#
# Allows you to modify the max player count displayed.
# Note that this will affect ${server playersMax} (Except for when used in conditions).
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#extraPlayers
# Read more: https://asl.andre601.ch/profiles/#extraplayers
#
extraPlayers:
#
# Enables/Disables the extraPlayers option.
# When enabled will the total amount of players allowed be modified to the current
# When enabled will the total amount of players allowed to join be modified to the current
# number of online players + 'amount'
#
# Defaults to false when not present.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#enabled
# Read more: https://asl.andre601.ch/profiles/#extraplayers-enabled
#
enabled: false
#
@@ -134,6 +134,35 @@ playerCount:
#
# Defaults to 0 when not present.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#amount
# Read more: https://asl.andre601.ch/profiles/#extraplayers-amount
#
amount: 0
#
# Allows you to set the max players that could join your server.
# Note that this option influences the '${server playersMax}' placeholder.
#
# The settings of this option have no effect should 'extraPlayers' be enabled
#
# Read more: https://asl.andre601.ch/profiles/#maxplayers
#
maxPlayers:
#
# Enables/Disables the maxPlayers option.
# When enabled will the total amount of players allowed to join be changed to what 'amount' is set to.
#
# Defaults to false when not present.
#
# Read more: https://asl.andre601.ch/profiles/#maxplayers-enabled
#
enabled: false
#
# Sets the number to display for the max number of players allowed to join your server.
#
# Example:
# Setting this option to 0 (Default) while 1 player is online would display '1/0'
#
# Defaults to 0 if not set.
#
# Read more: https://asl.andre601.ch/profiles/#maxplayers-amount
#
amount: 0
+2 -1
View File
@@ -23,4 +23,5 @@
#
#
version=${plugin.version}
version=${plugin.version}
config-version=${plugin.config.version}
+57
View File
@@ -0,0 +1,57 @@
#
# Modified version of Squidfunk's shortcodes.py file for Material for MkDocs.
#
# It was altered to create compact admonition-like boxes to display in the documentation.
#
# Original shortcodes.py file:
# https://github.com/squidfunk/mkdocs-material/blob/56b96b4d799174d48d36613d70ffac9b964171cc/material/overrides/hooks/shortcodes.py
#
from __future__ import annotations
import posixpath
import re
from mkdocs.config.defaults import MkDocsConfig
from mkdocs.structure.files import File, Files
from mkdocs.structure.pages import Page
from re import Match
def on_page_markdown(
markdown: str, *, page: Page, config: MkDocsConfig, files: Files
):
# Replace callback
def replace(match: Match):
type, args = match.groups()
args = args.strip()
if type == "abstract": return _admo(text = args, type = "abstract")
elif type == "info": return _admo(text = args, type = "info")
elif type == "tip": return _admo(text = args, type = "tip")
elif type == "success": return _admo(text = args, type = "success")
elif type == "question": return _admo(text = args, type = "question")
elif type == "warning": return _admo(text = args, type = "warning")
elif type == "failure": return _admo(text = args, type = "failure")
elif type == "danger": return _admo(text = args, type = "danger")
elif type == "bug": return _admo(text = args, type = "bug")
elif type == "example": return _admo(text = args, type = "example")
elif type == "quote": return _admo(text = args, type = "quote")
else: return _admo(text = args)
# Otherwise, raise an error
raise RuntimeError(f"Unknown shortcode: {type}")
# Find and replace all external asset URLs in current page
return re.sub(
r"<!-- admo:(\w+)(.*?) -->",
replace, markdown, flags = re.I | re.M
)
def _admo(text: str = "", type: str = ""):
classes = f"mdx-grid-wrapper mdx-admo--{type}" if type else "mdx-grid-wrapper"
return "".join([
f"<div class=\"{classes}\">",
f"<div class=\"mdx-grid-child mdx-grid-child--icon\"></div>",
f"<div class=\"mdx-grid-child\">{text}</div>"
"</div>",
])
+35
View File
@@ -0,0 +1,35 @@
{% extends "base.html" %}
{% import "api-objects/info-template.html" as info %}
{% block content %}
{% include "partials/content.html" %}
{% if page.meta %}
<!--
Object summaries
-->
{% if page.meta.constructors %}
{{ info.summary('Constructor Summary', page.meta.constructors, details_type='constructor') }}
{% endif %}
{% if page.meta.classes %}
{{ info.summary('Class Summary', page.meta.classes, details_type='class') }}
{% endif %}
{% if page.meta.enums %}
{{ info.summary('Enum Constant Summary', page.meta.enums, details_type='enum') }}
{% endif %}
{% if page.meta.methods or page.meta.inherits %}
{{ info.summary('Method Summary', page.meta.methods, page.meta.inherits, details_type='method') }}
{% endif %}
<!--
Detailed object info
-->
{% if page.meta.constructors %}
{{ info.info('Constructor Detail', page.meta.constructors) }}
{% endif %}
{% if page.meta.enums %}
{{ info.info('Enum Constant Detail', page.meta.enums, true) }}
{% endif %}
{% if page.meta.methods %}
{{ info.info('Method Detail', page.meta.methods)}}
{% endif %}
{% endif %}
{% endblock %}
@@ -0,0 +1,218 @@
{% macro summary(title, summaries, inherits, details_type = 'unknown') -%}
<h2 id="{{ title | lower() | replace(' ', '-') | e}}">
{{ title }}
</h2>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table">
{% if summaries %}
<table>
<thead>
<tr>
{% if details_type and details_type == "method" %}
<th>Modifier and Type</th>
{% endif %}
<th>{{ details_type | capitalize() }}</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for summary in summaries %}
<tr>
{% set modifiers = namespace(name = "") %}
{% for attribute in summary.attributes %}
{% set modifiers.name = modifiers.name ~ attribute %}
{% if loop.revindex > 0 %}{% set modifiers.name = modifiers.name ~ " " %}{% endif %}
{% endfor %}
{% if modifiers.name %}{% set modifiers.name = modifiers.name ~ " " %}{% endif %}
{% if summary.type and summary.type.name %}
{% set modifiers.name = modifiers.name ~ summary.type.name %}
{% else %}
{% set modifiers.name = modifiers.name ~ "void" %}
{% endif %}
{% set desc = "" %}
{% if summary.deprecated %}
{% set desc = "<api__deprecated></api__deprecated><br>" ~ summary.deprecated.split("<br>")[0] %}
{% elif summary.description %}
{% set desc = summary.description.split("<br>")[0] %}
{% endif %}
{% set final_name = namespace(name = "") %}
{% if details_type and details_type == "enum" %}
{% set final_name.name = summary.name | upper() %}
{% else %}
{% set final_name.name = summary.name ~ "(" %}
{% endif %}
{% for parameter in summary.parameters %}
{% set final_name.name = final_name.name ~ parameter.type %}
{% if loop.revindex > 1 %}{% set final_name.name = final_name.name ~ ", " %}{% endif %}
{% endfor %}
{% if details_type != "enum" %}
{% set final_name.name = final_name.name ~ ")" %}
{% endif %}
{% if details_type and details_type == "method" %}
{% if modifiers.name %}
<td><code>{{ modifiers.name }}</code></td>
{% else %}
<td></td>
{% endif %}
{% endif %}
<td>
{% if summary.link %}
<a href="{{ summary.link }}"><code>{{ final_name.name | e}}</code></a>
{% else %}
<a href="#{{ final_name.name | lower() | replace(' ', '-') | e }}"><code>{{ final_name.name | e}}</code></a>
{% endif %}
</td>
<td>{{ desc }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if inherits %}
{% for classpath, inherit in inherits.items() %}
<table>
<thead>
<tr>
<th>Methods inherited from <a href="{{ inherit.link }}"><code>{{ classpath }}</code></a></th>
</tr>
</thead>
<tbody>
<tr>
<td>
{% for inh in inherit.list %}
<a href="{{ inherit.link }}#{{ inh | lower() | replace(' ', '-') | e }}">
<code>{{- inh | e -}}</code>
</a>
{%- if loop.revindex > 1 %}, {% endif -%}
{% endfor %}
</td>
</tr>
</tbody>
</table>
{% endfor %}
{% endif %}
</div>
</div>
{%- endmacro %}
{% macro info(title, details, enum = false) -%}
<h2 id="{{ title | lower() | replace(' ', '-') | e}}">
{{ title }}
</h2>
{% for detail in details %}
<div class="api-detail">
{% set final_name = namespace(name = "") %}
{% if enum %}
{% set final_name.name = detail.name | upper() %}
{% else %}
{% set final_name.name = detail.name ~ "(" %}
{% endif %}
{% for parameter in detail.parameters %}
{% set final_name.name = final_name.name ~ parameter.type %}
{% if loop.revindex > 1 %}{% set final_name.name = final_name.name ~ ", " %}{% endif %}
{% endfor %}
{% if not enum %}
{% set final_name.name = final_name.name ~ ")" %}
{% endif %}
<h3 id="{{ final_name.name | lower() | replace(' ', '-') | e }}">
{% if detail.deprecated %}
<api__deprecated></api__deprecated>
{% endif %}
{% for attribute in detail.attributes %}
<api__{{- attribute -}}></api__{{- attribute -}}>
{% endfor %}
{% if enum %}
<api__static></api__static> <api__final></api__final>
{% endif %}
{% if detail.type %}
{% if detail.type.link %}
<a href="{{ detail.type.link }}" class="api-type__{{- detail.type.type | default('primitive') -}}">{{ detail.type.name | default('void') | e }}</a>
{% else %}
<span class="api-type__{{- detail.type.type | default('primitive') -}}">{{ detail.type.name | default('void') | e }}</span>
{% endif %}
{% endif %}
<code>{{ final_name.name | e }}</code><a href="#{{ final_name.name | lower() | replace(' ', '-') | e }}" class="headerlink" title="Permanent link"></a>
</h3>
{% if detail.deprecated %}
<div class="admonition deprecated">
<div class="admonition-title">Deprecation Warning</div>
<p>
{{ detail.deprecated }}
</p>
</div>
{% endif %}
{% if detail.description %}
<p class="api-detail__description">
{{ detail.description }}
</p>
{% endif %}
{% if detail.parameters %}
<h4 id="{{ detail.name | lower() | replace(' ', '-') | e }}-parameters">
Parameters:<a href="#{{ detail.name | lower() | replace(' ', '-') | e }}-parameters" class="headerlink" title="Permanent link"></a>
</h4>
<ul>
{% for parameter in detail.parameters %}
<li>
{% for attribute in parameter.attribute %}
<api__{{- attribute -}}></api__{{- attribute -}}>
{% endfor %}
<code>{{ parameter.type | e }}: {{ parameter.name }}</code>{% if parameter.description %} - {{ parameter.description }}{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% if detail.returns %}
<h4 id="{{ detail.name | lower() | replace(' ', '-') | e }}-returns">
Returns:<a href="#{{ detail.name | lower() | replace(' ', '-') | e }}-returns" class="headerlink" title="Permanent link"></a>
</h4>
<p class="api-detail__description">
{{ detail.returns }}
</p>
{% endif %}
{% if detail.throws %}
<h4 id="{{ detail.name | lower() | replace(' ', '-') | e }}-throws">
Throws:<a href="#{{ detail.name | lower() | replace(' ', '-') | e }}-throws" class="headerlink" title="Permanent link"></a>
</h4>
<ul>
{% for throw in detail.throws %}
<li>
<code>{{ throw.name }}</code>{% if throw.description %} - {{ throw.description }}{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% if seealso %}
<h4 id="{{ detail.name | lower() | replace(' ', '-') | e }}-see-also">
See also:<a href="#{{ detail.name | lower() | replace(' ', '-') | e }}-see-also" class="headerlink" title="Permanent link"></a>
</h4>
<ul>
{% for see in detail.seealso %}
<li>
<a href="{{ see.link }}"><code>{{ see.name }}</code></a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endfor %}
{%- endmacro %}
+42
View File
@@ -0,0 +1,42 @@
<!-- Tags -->
{% if "material/tags" in config.plugins and tags %}
{% include "partials/tags.html" %}
{% endif %}
<!-- Actions -->
{% include "partials/actions.html" %}
{% if config.extra.github_repository %}
<div class="admonition info">
<p class="admonition-title">Moved</p>
<p>
The documenation has been moved and can now be found at <a href="https://asl.andre601.ch" target="_blank" rel="noreferral nofollow noopener"><strong>asl.andre601.ch</strong></a>.<br>
This page in particular can be found at <a href="https://asl.andre601.ch/{{ page.url }}" target="_blank" rel="noreferral nofollow noopener"><strong>asl.andre601.ch/{{ page.url }}</strong></a>.
</p>
</div>
{% endif %}
<!--
Hack: check whether the content contains a h1 headline. If it doesn't, the
page title (or respectively site name) is used as the main headline.
-->
{% if "\x3ch1" not in page.content %}
<h1>{{ page.title | d(config.site_name, true)}}</h1>
{% endif %}
<!-- Page content -->
{{ page.content }}
<!-- Source file information -->
{% if page.meta and (
page.meta.git_revision_date_localized or
page.meta.revision_date
) %}
{% include "partials/source-file.html" %}
{% endif %}
<!-- Was this page helpful? -->
{% include "partials/feedback.html" %}
<!-- Comment system -->
{% include "partials/comments.html" %}
+9
View File
@@ -0,0 +1,9 @@
nav:
- Home: index.md
- getting-started
- commands
- profiles
- examples
- migration
- api
- PlaceholderAPI: placeholderapi
+1
View File
@@ -0,0 +1 @@
<div class="mdx-badge"><span class="mdx-badge__icon">[:octicons-tag-24:](changelog.md#v3.1.0 'View latest Release Changelog')</span><span class="mdx-badge__text">[v3.1.0](changelog.md#v3.1.0 'View latest Release Changelog')</span></div>
+1
View File
@@ -0,0 +1 @@
<div class="mdx-badge"><span class="mdx-badge__icon" >[:octicons-alert-24:](changelog.md)</span><span class="mdx-badge__text">[v3.1.0](changelog.md#v3.1.0 'View latest Release Changelog')</span></div>
+2
View File
@@ -0,0 +1,2 @@
nav:
- ...
+62 -6
View File
@@ -1,16 +1,69 @@
---
icon: octicons/log-24
---
# Changelog
This page lists the recent changes made towards the AdvancedServerListAPI.
They are ordered newest to oldest.
## v2.1.0
## v3.1.0 { #v3.1.0 }
### :octicons-pencil-24:{ .changelog-changed title="Changed" } Changed { #v-changed }
### :octicons-plus-circle-24:{ .changelog-added title="Added" } Added { #v3.1.0-added }
- New getters in [`ProfileEntry`][profileentry]:
- [`maxPlayersEnabled()`][maxplayersenabled] - Returns the value for `playerCount -> maxPlayers -> enabled` as `NullBool`
- [`maxPlayersCount()`][maxplayerscount] - Returns the value of `playerCount -> maxPlayers -> amount` as nullable `Integer`
- New setters in [`ProfileEntry.Builder`][profileentry.builder]:
- [`setMaxPlayersEnabled(NullBool)`][setmaxplayersenabled] - Sets whether the max players feature is enabled or not.
- [`setMaxPlayersCount(Integer)`][setmaxplayerscount] - Sets the number to use for the max players count.
- [`setExtraPlayersCount(Integer)`][setextraplayersecount] - Replacement for [deprecated `setExtraPlayerCount(Integer)` method](#v3.1.0-deprecated).
### :octicons-zap-24:{ .changelog-breaking title="Deprecated" } Deprecated { #v3.1.0-deprecated }
- `setExtraPlayerEnabled(Integer)` in `ProfileEntry.Builder` - Typo in method name.
[profileentry]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/index.md
[maxplayersenabled]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/index.md#maxplayersenabled()
[maxplayerscount]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/index.md#maxplayerscount()
[profileentry.builder]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/builder.md
[setmaxplayersenabled]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/builder.md#setmaxplayersenabled(nullbool)
[setmaxplayerscount]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/builder.md#setmaxplayerscount(integer)
[setextraplayersecount]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/builder.md#setextraplayerscount(integer)
----
## v3.0.0 { #v3.0.0 }
### :octicons-alert-24:{ .changelog-breaking title="Breaking Changes" } Breaking Changes { #v3-breaking }
- Removed `platform-spigot` API in favour of a more generic sounding `platform-bukkit`
- Renamed all platform-specific packages from `ch.andre601.advancedserverlist.<platform>` to `ch.andre601.advancedserverlist.api.<platform>`
### :octicons-plus-circle-24:{ .changelog-added title="Added" } Added { #v3-added }
- New platform-specific `GenericServer` instances with their own methods to use.
- `BukkitServer` - Contains a `getWorlds()` method that returns a `Map<String, World>` of all loaded worlds in the server.
- `BungeeProxy` - Contains a `getServers()` method that returns a `Map<String, ServerInfo>` of all known Servers for BungeeCord.
- `VelocityProxy` - Contains a `getServers()` method that returns a `Map<String, RegisteredServer>` of all known Servers for Velocity.
### :octicons-trash-24:{ .changelog-removed title="Removed" } Removed { #v3-removed }
- All previously deprecated `getX()` methods from the `ProfileEntry` record
----
## v2.1.0 { #v2.1.0 }
### :octicons-pencil-24:{ .changelog-changed title="Changed" } Changed { #v2.1.0-changed }
- Turned `ProfileEntry` class into a record
- Former `getX()` methods are now deprecated in favour of the recor's own `x()` methods (i.e. `getMotd()` -> `motd()`)
- Former `getX()` methods are now deprecated in favour of the record's own `x()` methods (i.e. `getMotd()` -> `motd()`)
## v2.0.0
----
## v2.0.0 { #v2.0.0 }
### :octicons-alert-24:{ .changelog-breaking title="Breaking Changes" } Breaking Changes { #v2-breaking }
@@ -39,7 +92,9 @@ They are ordered newest to oldest.
- `UnsupportedAPIAccessException` as it is no longer used in the API itself.
## v1.0.0
----
## v1.0.0 { #v1.0.0 }
### :octicons-plus-circle-24:{ .changelog-added title="Added" } Added { #v1-added }
@@ -56,5 +111,6 @@ Templates for changelog
### :octicons-plus-circle-24:{ .changelog-added title="Added" } Added { #v-added }
### :octicons-pencil-24:{ .changelog-changed title="Changed" } Changed { #v-changed }
### :octicons-trash-24:{ .changelog-removed title="Removed" } Removed { #v-removed }
### :octicons-zap-24:{ .changelog-deprecated title="Deprecated" } Deprecated { #v-deprecated }
-->
-->
+331 -89
View File
@@ -1,3 +1,7 @@
---
icon: octicons/command-palette-24
---
# API
AdvancedServerList v2 introduced a new API that plugins can hook into to use.
@@ -5,82 +9,95 @@ It provides a way for your plugin to provide its own placeholders that should be
## Add dependency
Add the following to your `build.gradle` or `pom.xml` file to use the API:
Add the following to your `pom.xml`, `build.gradle` or `build.gradle.kts` depending on what you use:
=== ":simple-gradle: Gradle"
/// tab | :simple-apachemaven: Maven
```xml title="pom.xml"
<repositories>
<repository>
<id>jitpack</id>
<url>https://jitpack.io/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>api</artifactId>
<version>{apiVersion}</version>
<scope>provided</scope>
</dependency>
<!-- Optional platform dependencies -->
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-bukkit</artifactId>
<version>{apiVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-bungeecord</artifactId>
<version>{apiVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-velocity</artifactId>
<version>{apiVersion}</version>
<scope>provided</scope>
</dependency>
</dependencies>
```
///
/// tab | :simple-gradle: Gradle
```groovy title="build.gradle"
repositorories {
maven { url = 'https://jitpack.io/' }
}
dependencies {
compileOnly 'ch.andre601.asl-api:api:{apiVersion}'
Make sure to replace `{version}` with the latest version available in the [GitHub Repository][api-repo].
// Optional platform dependencies
compileOnly 'ch.andre601.asl-api:platform-bukkit:{apiVersion}'
compileOnly 'ch.andre601.asl-api:platform-bungeecord:{apiVersion}'
compileOnly 'ch.andre601.asl-api:platform-velocity:{apiVersion}'
}
```
///
/// tab | :simple-gradle: Gradle (KTS)
```kotlin title="build.gradle.kts"
repositories {
maven("https://jitpack.io")
}
dependencies {
compileOnly("ch.andre601.asl-api:api:{apiVersion}")
```groovy title="build.gradle"
repositorories {
maven { url = 'https://jitpack.io/' }
}
dependencies {
implementation 'ch.andre601.asl-api:api:{version}'
// Optional platform dependencies
implementation 'ch.andre601.asl-api:platform-bungeecord:{version}'
implementation 'ch.andre601.asl-api:platform-spigot:{version}'
implementation 'ch.andre601.asl-api:platform-velocity:{version}'
}
```
// Optional platform dependencies
compileOnly("ch.andre601.asl-api:platform-bukkit:{apiVersion}")
compileOnly("ch.andre601.asl-api:platform-bungeecord:{apiVersion}")
compileOnly("ch.andre601.asl-api:platform-velocity:{apiVersion}")
}
```
///
=== ":simple-apachemaven: Maven"
Make sure to replace `{version}` with the latest version available in the [GitHub Repository][api-repo].
```xml title="pom.xml"
<repositories>
<repository>
<id>jitpack</id>
<url>https://jitpack.io/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>api</artifactId>
<version>{version}</version>
</dependency>
<!-- Optional platform dependencies -->
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-bungeecord</artifactId>
<version>{version}</version>
</dependency>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-spigot</artifactId>
<version>{version}</version>
</dependency>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-velocity</artifactId>
<version>{version}</version>
</dependency>
</dependencies>
```
## Adding your own Placeholders
[api-repo]: https://github.com/Andre601/asl-api
<!-- admo:info This requires the main api module -->
## Add own placeholders
The API allows you to add your own placeholders which would be available through the `${<identifier> <values>}` placeholder Pattern in a Server List profile.
To add your own placeholders will you need to do a few steps.
To add your own placeholders, follow these steps:
### 1) Get API instance
### 1. Create a Placeholder class
Use `AdvancedServerListAPI.get()` to retrieve an instance of the currently used AdvancedServerList API.
It will be needed at a later point.
You should first create a new class and make it extend the abstract [`PlaceholderProvider`][placeholderprovider]. This class includes a constructor and a method you need to add, so do that:
### 2) Create a Placeholder class
Make a new class that you want to use for the placeholders and let it extend the `PlaceholderProvider` class of AdvancedServerList.
Your IDE should now tell you to implement/override some methods. Confirm this action and your class should look something alongside this:
```java title="PlaceholderProvider example"
```java
public class MyPlaceholders extends PlaceholderProvider {
public MyPlaceholders(String identifier) {
@@ -94,23 +111,25 @@ public class MyPlaceholders extends PlaceholderProvider {
}
```
It's recommended to replace your generated constructor with a no-args one and set the identifier directly in the `super()`.
For example:
/// tip
You can replace the Constructor with a String argument with a no-args constructor and set the identifier directly in the `super`:
```java
public MyPlaceholders() {
super("myplaceholders");
}
```
///
The next step now would be to handle the different placeholders. These are handled in the `parsePlaceholder` method you had to override.
The `placeholder` String is whatever value was provided after the identifier in `${<identifier> <placeholder>}`. It can contain spaces.
The [`parsePlaceholder(String, GenericPlayer, GenericServer)`][parseplaceholder] method is used by AdvancedServerList to replace a matching placeholder with a value.
What you return is completely up to you. Just keep in mind that returning `null` will be treated as an invalid placeholder by AdvancedServerList, resulting in the placeholder being returned as-is without any changes.
Something to note is, that when returning `null` will AdvancedServerList understand it as an invalid placeholder and return it unchanged.
[placeholderprovider]: reference/api/ch.andre601.advancedserverlist.api/placeholderprovider.md
[parseplaceholder]: reference/api/ch.andre601.advancedserverlist.api/placeholderprovider.md#parseplaceholder(string,-genericplayer,-genericserver)
Here is a small example of the final class:
/// details | Example of final class
type: example
```java title="PlaceholderProvider example"
```java
public class MyPlaceholders extends PlaceholderProvider {
public MyPlaceholders() {
@@ -119,35 +138,258 @@ public class MyPlaceholders extends PlaceholderProvider {
@Override
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server) {
if(placeholder.equals("hello"))
return "Hi!";
if(placeholder.equalsIgnoreCase("hello"))
return "Hello " + player.getName();
return null;
}
}
```
///
### 3) Register the placeholder class
### 2. Register the Placeholders
All that is left to do now is to register your class as a new PlaceholderProvider instance. To do this, get the API instance you retrieved earlier and use `addPlaceholderProvider` with a new instance of your class.
Next step should be to register the placeholder. To achieve this, first obtain an instance of the [`AdvancedServerListAPI`][advancedserverlistapi] by using the static [`get()`][get] method. After that call [`addPlaceholderProvider(PlaceholderProvider placeholderProvider)`][addplaceholderprovider].
Your code may look similar to this:
```java title="Registering PlaceholderProvider class"
AdvancedServerListAPI api = AdvancedServerListAPI.get();
api.addPlaceholderProvider(new MyPlaceholders());
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
AdvancedServerListAPI api = AdvancedServerListAPI.get();
api.addPlaceholderProvider(new MyPlaceholders());
}
}
```
## Events
[advancedserverlistapi]: reference/api/ch.andre601.advancedserverlist.api/advancedserverlistapi.md
[get]: reference/api/ch.andre601.advancedserverlist.api/advancedserverlistapi.md#get()
[addplaceholderprovider]: reference/api/ch.andre601.advancedserverlist.api/advancedserverlistapi.md#addplaceholderprovider(placeholderprovider)
!!! info "Note"
The mentioned event is only accessible through one of the platform dependencies, as those are used in the platform's respective event handler system.
This should register your PlaceholderExpansion as long as it is valid, meaning that the identifier...
v2 of the API adds the `PreServerListSetEvent` to the different platform dependencies to use.
It allows you to modify the ProfileEntry used for the player pinging the server/proxy or even cancelling the event altogether.
- ...is not `null`
- ...is not containing spaces
- ...is not using a name already registered in the API
### 3. Declare AdvancedServerList as (soft)depend
The final thing you should make sure is to define AdvancedServerList as a depend or soft-depend for your plugin, to make sure it loads after AdvancedServerList.
Below are example setups for Spigot, Paper, BungeeCord and Velocity:
/// tab | :simple-spigotmc: Spigot
//// tab | Softdepend
```yaml title="plugin.yml"
name: "MyPlugin"
author: "author"
version: "1.0.0"
main: "com.example.plugin.ExamplePlugin"
softdepend:
- AdvancedServerList
```
////
//// tab | Depend
```yaml title="plugin.yml"
name: "MyPlugin"
author: "author"
version: "1.0.0"
main: "com.example.plugin.ExamplePlugin"
depend:
- AdvancedServerList
```
////
///
/// tab | :fontawesome-solid-paper-plane: Paper
//// tab | Softdepend
```yaml title="paper-plugin.yml"
name: "MyPlugin"
author: "author"
version: "1.0.0"
main: "com.example.plugin.ExamplePlugin"
dependencies:
server:
AdvancedServerList:
load: BEFORE
required: false # Default, not required
```
////
//// tab | Depend
```yaml title="paper-plugin.yml"
name: "MyPlugin"
author: "author"
version: "1.0.0"
main: "com.example.plugin.ExamplePlugin"
dependencies:
server:
AdvancedServerList:
load: BEFORE
required: true
```
////
///
/// tab | :octicons-git-merge-24: BungeeCord
//// tab | Softdepend
```yaml title="bungee.yml"
name: "MyPlugin"
author: "author"
version: "1.0.0"
main: "com.example.plugin.ExamplePlugin"
softDepends:
- AdvancedServerList
```
////
//// tab | Depend
```yaml title="bungee.yml"
name: "MyPlugin"
author: "author"
version: "1.0.0"
main: "com.example.plugin.ExamplePlugin"
depends:
- AdvancedServerList
```
////
///
/// tab | :octicons-git-merge-24: Velocity
//// tab | Softdepend (File)
```json title="velocity-plugin.json"
{
"id": "myplugin",
"name": "MyPlugin",
"version": "1.0.0",
"authors": [
"author"
],
"main": "com.example.plugin.ExamplePlugin",
"dependencies": [
{
"id": "advancedserverlist",
"optional": true
}
]
}
```
////
//// tab | Depend (File)
```json title="velocity-plugin.json"
{
"id": "myplugin",
"name": "MyPlugin",
"version": "1.0.0",
"authors": [
"author"
],
"main": "com.example.plugin.ExamplePlugin",
"dependencies": [
{
"id": "advancedserverlist",
"optional": false // Default, not required
}
]
}
```
////
//// tab | Softdepend (Annotation)
```java title="MyPlugin.java"
@Plugin(
id = "myplugin",
name = "MyPlugin",
version = "1.0.0",
authors = {"author"},
dependencies = {
@Dependency(
id = "advancedserverlist",
optional = true
)
}
)
public class MyPlugin {
// ...
}
```
////
//// tab | Depend (Annotation)
```java title="MyPlugin.java"
@Plugin(
id = "myplugin",
name = "MyPlugin",
version = "1.0.0",
authors = {"author"},
dependencies = {
@Dependency(
id = "advancedserverlist",
optional = false // Default, not required
)
}
)
public class MyPlugin {
// ...
}
```
////
///
### 4. You're done!
Your plugin should now hook into AdvancedServerList and register its own custom placeholders to use.
## Listening for events
<!-- admo:info This requires the platform specific dependencies -->
AdvancedServerList provides an Event that your plugin can listen for.
The event is called `PreServerListSetEvent` and provides the following methods to use:
- [`getEntry()`][getentry] - Gets the currently set [`ProfileEntry`][profileentry].
- [`setEntry(ProfileEntry)`][setentry] - Sets a new [`ProfileEntry`][profileentry] to use.
- [`isCancelled()`][iscancelled] - Gets the current cancelled state of the event.
- [`setCancelled(boolean)`][setcancelled] - Sets the current cancelled state.
Setting the event's cancelled state to true will result in AdvancedServerList not altering the Server list.
Please check the server/proxy's documentation on how to listen for events with your plugin.
[getentry]: reference/api/ch.andre601.advancedserverlist.api/events/genericserverlistevent.md#getentry()
[setentry]: reference/api/ch.andre601.advancedserverlist.api/events/genericserverlistevent.md#setentry(profileentry)
[iscancelled]: reference/api/ch.andre601.advancedserverlist.api/events/genericserverlistevent.md#iscancelled()
[setcancelled]: reference/api/ch.andre601.advancedserverlist.api/events/genericserverlistevent.md#setcancelled(boolean)
[profileentry]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/index.md
### ProfileEntry
The ProfileEntry class has been moved to the API in v2 allowing you to create your own versions using the available Builder class.
The ProfileEntry record is the core class used within the `PreServerListSetEvent`. It sets what values (MOTD, Favicon, Players, etc.) should be displayed.
Note that the record is - by nature - immutable and that the [`Builder`][builder] class should be used to create a new ProfileEntry instance to use.
This class contains values from a Server List Profile file. The values can either be from a `profiles` list entry, one of the global options in the file, or a mix of both, depending on what options are present.
You can create a new entry or copy an existing one (i.e. from the [`PreServerListSetEvent`](#events)) to modify and use in the server list by setting it in the aforementioned `PreServerListSetEvent`.
A convenience method exists to create a `Builder` instance from an existing `ProfileEntry` in case you only want to alter certain options while everything else unchanged.
This allows you to customize the Server list using your plugin. Just keep in mind that other plugins may also do the same, overriding your changes.
[builder]: reference/api/ch.andre601.advancedserverlist.api/profiles/profileentry/builder.md
+10
View File
@@ -0,0 +1,10 @@
---
template: redirect.html
location: https://docs.andre601.ch/asl-api
title: Javadocs
icon: octicons/link-external-24
---
<!-- Comment to trigger proper build -->
+6
View File
@@ -0,0 +1,6 @@
nav:
- index.md
- api: api
- platform-bukkit: platform-bukkit
- platform-bungeecord: platform-bungeecord
- platform-velocity: platform-velocity
+3
View File
@@ -0,0 +1,3 @@
nav:
- index.md
- ch.andre601.advancedserverlist.api: ch.andre601.advancedserverlist.api
@@ -0,0 +1,54 @@
---
template: api-doc.html
methods:
- name: 'get'
description: |
Retrieve the instance used of this API.<br>
If no instance has been made so far will a new one be created.
returns: 'Instance of this API.'
attributes:
- static
type:
name: 'AdvancedServerListAPI'
type: 'object'
- name: 'addPlaceholderProvider'
description: |
Adds the provided <a href="./../placeholderprovider/"><code>PlaceholderProvider</code></a> to the list, if it passes the following checks:<br>
<ul>
<li>Provided PlaceholderProvider instance is not null.</li>
<li>The identifier is not null nor empty.</li>
<li>The identifier does not contain any spaces.</li>
<li>A PlaceholderProvider with the same identifier doesn't exist already.</li>
</ul>
Not passing any of the above checks results in a <a href="./../exceptions/invalidplaceholderproviderexception/"><code>InvalidPlaceholderProviderException</code></a> being thrown.
parameters:
- name: 'placeholderProvider'
description: 'The <a href="./../placeholderprovider/"><code>PlaceholderProvider</code></a> to add.'
type: PlaceholderProvider
attributes:
- notnull
throws:
- name: 'InvalidPlaceholderProviderException'
description: 'When the provided <a href="./../placeholderprovider/"><code>PlaceholderProvider</code> instance</a> is null, has a null or empty identifier, the identifier contains spaces, or another PlaceholderProvider with the same identifier is already in use.'
type:
name: 'void'
- name: 'retrievePlaceholderProvider'
description: 'Retrieves the <a href="./../placeholderprovider/"><code>PlaceholderProvider</code></a> associated with the provided identifier, or <code>null</code> should no such entry exist.'
parameters:
- name: 'identifier'
description: 'The identifier to find a matching <a href="./../placeholderprovider/"><code>PlaceholderProvider</code></a> for.'
type: String
returns: 'Possibly-null <a href="./../placeholderprovider/"><code>PlaceholderProvider</code> instance</a>.'
attributes:
- nullable
type:
name: PlaceholderProvider
type: object
link: './../placeholderprovider'
---
# <api__class></api__class> AdvancedServerListAPI
Core class of the API for AdvancedServerList.
Use [`get()`](#get) to retrieve the instance currently used.
@@ -0,0 +1,45 @@
---
template: api-doc.html
methods:
- name: 'getEntry'
description: 'Gets the <a href="../../profiles/profileentry/"><code>ProfileEntry</code></a> currently set.'
returns: The currently used ProfileEntry.
type:
name: ProfileEntry
type: object
link: '../../profiles/profileentry/'
- name: 'setEntry'
description: |-
Sets the new <a href="../../profiles/profileentry/"><code>ProfileEntry</code></a> to use.<br>
This may not be <code>null</code>.
parameters:
- name: 'entry'
description: 'The new <a href="../../profiles/profileentry/"><code>ProfileEntry</code></a> to use.'
type: ProfileEntry
attributes:
- notnull
throws:
- name: 'IllegalArgumentException'
description: 'When the provided ProfileEntry is <code>null</code>'
type:
name: 'void'
- name: 'isCancelled'
description: Returns whether this event has been cancelled or not.
returns: Whether this event has been cancelled or not.
type:
name: boolean
- name: 'setCancelled'
description: Sets the event's cancel state
parameters:
- name: 'cancelled'
description: 'Boolean to set the event''s cancelled state.'
type: boolean
type:
name: 'void'
---
# <api__interface></api__interface> GenericServerListEvent
Interface used for the platform-specific PreServerListSetEvent instances.
This allows the plugin to pull common info such as ProfileEntry or if the event has been cancelled by another plugin.
@@ -0,0 +1,13 @@
---
template: 'api-doc.html'
constructors:
- name: 'InvalidPlaceholderProviderException'
parameters:
- name: msg
type: String
---
# <api__class></api__class> InvalidPlaceholderProviderException
RuntimeException thrown whenever an invalid [`PlaceholderProvider`](../placeholderprovider.md) has been given.
@@ -0,0 +1,42 @@
---
template: api-doc.html
methods:
- name: 'getName'
description: |
Returns the name of the player.<br>
Note that on Spigot, Paper and other forks can the name differ from the one cached by AdvancedServerList, if the plugin was able to retrieve an OfflinePlayer instance from the server. On BungeeCord and Velocity will the returned String always be the name from the cache.<br>
<br>
Name may be whatever has been defined in AdvancedServerList's config.yml, should the player not be cached yet by the plugin.
returns: 'String representing the player''s name'
type:
name: String
type: object
- name: 'getProtocol'
description: |
Returns the protocol ID the player is using.<br>
The protocol ID is an integer used by Minecraft to determine what version a server or client is running.
returns: 'Integer representing the protocol version of this player.'
type:
name: int
- name: 'getUUID'
description: |
Returns the unique ID associated with this player.<br>
<br>
UUID may be whatever has been defined in AdvancedServerList's config.yml, should the player not be cached yet by AdvancedServerList.
returns: 'UUID of the player'
type:
name: UUID
type: object
---
# <api__interface></api__interface> GenericPlayer
A basic interface used to store generic player data to use in placeholder resolving.
The different variants of AdvancedServerList implement this into their own class and may provide additional data not available through this interface.
The following values will always be present, no matter the platform this interface is used on:
- [Name of the Player](#getname())
- [Protocol version of the Player](#getprotocol())
- [UUID of the Player](#getuuid())
@@ -0,0 +1,27 @@
---
template: api-doc.html
methods:
- name: 'getPlayersOnline'
description: 'Returns the number of players currently online on the server.'
returns: 'Number of players online on the server.'
type:
name: int
- name: 'getPlayersMax'
description: 'Returns the number of total players that can join the server.'
returns: 'Number of total players that can join the server.'
type:
name: int
- name: 'getHost'
description: 'Returns the IP/Domain that got pinged by the player.'
returns: 'Possibly-null String containing the IP/Domain that got pinged by the player'
attributes:
- nullable
type:
name: 'String'
type: 'object'
---
# <api__interface></api__interface> GenericServer
Simple class used to wrap around some generic server data such as online player count, number of total players that can join and the host (IP/Domain) that got pinged by the player.
@@ -0,0 +1,51 @@
---
template: api-doc.html
enums:
- name: 'true'
description: 'Boolean value <code>true</code>'
- name: 'false'
description: 'Boolean value <code>false</code>'
- name: 'not_set'
description: 'Boolean value <code>null</code>'
methods:
- name: 'resolve'
description: |
Returns a NullBool instance based on the provided <code>Boolean</code> value.<br>
In case of <code>null</code> being provided will <a href="#not_set"><code>NullBool.NOT_SET</code></a> be returned, otherwise will the corresponding NullBool instance matching the Boolean value be returned.
returns: 'NullBool instance based on the provided <code>Boolean</code> value.'
parameters:
- name: 'bool'
description: 'The <code>Boolean</code> value to receive a NullBool instance for.'
type: Boolean
attributes:
- nullable
attributes:
- static
type:
name: 'NullBool'
type: 'object'
- name: 'isNotSet'
description: 'Returns whether the NullBool is <a href="#not_set"><code>NullBool.NOT_SET</code></a>.'
returns: 'True if the instance is <a href="#not_set"><code>NullBool.NOT_SET</code></a>, otherwise false.'
type:
name: 'boolean'
type: 'primitive'
- name: 'getOrDefault'
description: |
Gets the corresponding boolean value associated with the NullBool instance.<br>
In the case of NullBool <a href="#isnotset()">not being set</a> will the provided default value be returned.
returns: 'True or false depending on the NullBool instance and the provided default value.'
parameters:
- name: 'def'
description: 'The default boolean value to return should the NullBool instance be <a href="#not_set"><code>NullBool.NOT_SET</code></a>.'
type: boolean
type:
name: 'boolean'
type: 'primitive'
---
# <api__enum></api__enum> NullBool
Enum used to return a `Boolean` value with a default one should no value be set.
@@ -0,0 +1,50 @@
---
template: api-doc.html
constructors:
- name: 'PlaceholderProvider'
description: 'Constructor used to set the identifier for the class extending the PlaceholderProvider class itself.'
parameters:
- name: 'identifier'
description: 'The identifier to use for the placeholder. Cannot be empty.'
type: String
attributes:
- notnull
methods:
- name: 'parsePlaceholder'
description: |
Method called by AdvancedServerList's StringReplacer class to replace any appearances of <code>${&lt;identifier&gt; &lt;placeholder&gt;}</code> with whatever value a matching PlaceholderProvider may return.<br>
<br>
Returning <code>null</code> will be treated as an invalid placeholder by the plugin, making it return the placeholder as-is without any changes.
parameters:
- name: 'placeholder'
type: String
description: 'The part of the Placeholder that comes after the identifier and before the closing curly bracket.'
- name: 'player'
type: GenericPlayer
description: 'The <a href="./../objects/genericplayer/"><code>GenericPlayer</code> instance</a> used.'
- name: 'server'
type: GenericServer
description: 'The <a href="./../objects/genericserver/"><code>GenericServer</code> instance</a> used.'
returns: 'Possibly-parsed or possibly-null String to replace the placeholder with.'
attributes:
- nullable
- abstract
type:
name: 'String'
type: 'object'
- name: 'getIdentifier'
description: 'Returns the identifier used by this PlaceholderProvider instance.'
returns: 'String representing the identifier of this PlaceholderProvider instance.'
type:
name: 'String'
type: 'object'
---
# <api__abstract></api__abstract> <api__class></api__class> PlaceholderProvider
Abstract class that is used to provide your own Placeholder patterns for AdvancedServerList to parse.
In order for your class to be considered a valid PlaceholderProvider will you need to set the `identifier` to a non-null, non-empty value without having any spaces in it.
Once set, use [`AdvancedServerListAPI#addPlaceholderProvider(PlaceholderProvider)`](advancedserverlistapi.md#addplaceholderprovider(placeholderprovider)) to register your class for AdvancedServerList to use.
@@ -0,0 +1,193 @@
---
template: api-doc.html
constructors:
- name: 'Builder'
methods:
- name: 'setMotd'
description: |
Sets a new MOTD to use.<br>
<br>
Set to an empty list to not change the MOTD.<br>
Only the first two entries of the list will be considered and any additional ones discarded.
returns: 'This Builder after the motd has been set. Useful for chaining.'
parameters:
- name: 'motd'
description: 'The MOTD to use.'
type: 'List<String>'
attributes:
- notnull
throws:
- name: 'IllegalArgumentException'
description: 'Thrown by the <code>CheckUtil</code> in case <code>null</code> has been provided as parameter.'
type:
name: 'Builder'
type: 'object'
- name: 'setPlayers'
description: |
Sets the players (lines) to use for the hover.<br>
<br>
Set to an empty list to not change the hover text.
returns: 'This Builder after the players have been set. Useful for chaining.'
parameters:
- name: 'players'
description: 'The lines to set for the hover.'
type: 'List<String>'
attributes:
- notnull
throws:
- name: 'IllegalArgumentException'
description: 'Thrown by the <code>CheckUtil</code> in case <code>null</code> has been provided as parameter.'
type:
name: 'Builder'
type: 'object'
- name: 'setPlayerCountText'
description: |
Sets the text to override the player count with.<br>
<br>
Set to an empty String or <code>null</code> to not alter the player count text.
returns: 'This Builder after the player count text has been set. Useful for chaining.'
parameters:
- name: 'playerCountText'
description: 'The text to show in the player count.'
type: String
attributes:
- nullable
type:
name: 'Builder'
type: 'object'
- name: 'setFavicon'
description: |
Sets the value to use for the favicon.<br>
The following values are supported:
<ul>
<li>URL to a valid PNG file.</li>
<li>File name (with <code>.png</code> extension) matching a file saved in the favicons folder of AdvancedServerList.</li>
<li><code>${player uuid}</code> to display the avatar of the player.</li>
</ul>
returns: 'This Builder after the favicon has been set. Useful for chaining.'
parameters:
- name: 'favicon'
description: 'The favicon to set'
type: String
attributes:
- nullable
type:
name: 'Builder'
type: 'object'
- name: 'setHidePlayersEnabled'
description: |
Sets whether the player count should be hidden or not.<br>
<br>
Set to <a href="../../objects/nullbool/#not_set"><code>NullBool.NOT_SET</code></a> to not set this.
returns: 'This Builder after the NullBool has been set. Useful for chaining.'
parameters:
- name: 'hidePlayersEnabled'
description: 'Whether the player count should be hidden or not.'
type: NullBool
attributes:
- notnull
throws:
- name: 'IllegalArgumentException'
description: 'Thrown by the <code>CheckUtil</code> in case <code>null</code> has been provided as parameter.'
type:
name: 'Builder'
type: 'object'
- name: 'setExtraPlayersEnabled'
description: |
Sets whether the extra players feature should be enabled or not.<br>
<br>
Set to <a href="../../objects/nullbool/#not_set"><code>NullBool.NOT_SET</code></a> to not set this.
returns: 'This Builder after the NullBool has been set. Useful for chaining.'
parameters:
- name: 'extraPlayersEnabled'
description: 'Whether the extra players feature should be enabled or not.'
type: NullBool
attributes:
- notnull
throws:
- name: 'IllegalArgumentException'
description: 'Thrown by the <code>CheckUtil</code> in case <code>null</code> has been provided as parameter.'
type:
name: 'Builder'
type: 'object'
- name: 'setMaxPlayersEnabled'
description: |
Sets whether the max players feature should be enabled.<br>
<br>
Set to <a href="../../objects/nullbool/#not_set"><code>NullBool.NOT_SET</code></a> to not set this.
returns: 'This Builder after the NullBool has been set. Useful for chaining.'
parameters:
- name: 'maxPlayersEnabled'
description: 'Whether the extra players feature should be enabled or not.'
type: NullBool
attributes:
- notnull
throws:
- name: 'IllegalArgumentException'
description: 'Thrown by the <code>CheckUtil</code> in case <code>null</code> has been provided as parameter.'
type:
name: 'Builder'
type: 'object'
- name: 'setExtraPlayerCount'
description: |
Sets the number of players to add to the online players to use as the new max players value.<br>
This option has no effect when <a href="../#extraplayersenabled()"><code>extraPlayersEnabled</code></a> is set to <a href="../../objects/nullbool/#false"><code>NullBool.FALSE</code></a> or <a href="../../objects/nullbool/#not_set"><code>NullBool.NOT_SET</code></a>.<br>
<br>
Set this to <code>null</code> to not alter the max player count. Alternatively, set <a href="#setextraplayersenabled(nullbool)"><code>setExtraPlayersEnabled(NullBool)</code></a> to <a href="../../objects/nullbool/#false"><code>NullBool.FALSE</code></a>.
returns: 'This Builder after the extra player count has been set. Useful for chaining.'
parameters:
- name: 'extraPlayersCount'
description: 'The number of extra players to add.'
type: Integer
attributes:
- nullable
deprecated: 'Typo in the name. Use <a href="#setextraplayerscount(integer)">setExtraPlayersCount(Integer)</a> instead.'
type:
name: 'Builder'
type: 'object'
- name: 'setExtraPlayersCount'
description: |
Sets the number of players to add to the online players to use as the new max players value.<br>
This option has no effect when <a href="../#extraplayersenabled()"><code>extraPlayersEnabled</code></a> is set to <a href="../../objects/nullbool/#false"><code>NullBool.FALSE</code></a> or <a href="../../objects/nullbool/#not_set"><code>NullBool.NOT_SET</code></a>.<br>
<br>
Set this to <code>null</code> to not alter the max player count. Alternatively, set <a href="#setextraplayersenabled(nullbool)"><code>setExtraPlayersEnabled(NullBool)</code></a> to <a href="../../objects/nullbool/#false"><code>NullBool.FALSE</code></a>.
returns: 'This Builder after the extra player count has been set. Useful for chaining.'
parameters:
- name: 'extraPlayersCount'
description: 'The number of extra players to add.'
type: Integer
attributes:
- nullable
type:
name: 'Builder'
type: 'object'
- name: 'setMaxPlayersCount'
description: |
Sets the number of max players allowed to join this server.<br>
This option has no effect when <a href="../#maxplayersenabled()"><code>maxPlayersEnabled</code></a> is set to <a href="../../objects/nullbool/#false"><code>NullBool.FALSE</code></a> or <a href="../../objects/nullbool/#not_set"><code>NullBool.NOT_SET</code></a>.<br>
<br>
Set this to <code>null</code> to not alter the max player count. Alternatively, set <a href="#setmaxplayersenabled(nullbool)"><code>setMaxPlayersEnabled(NullBool)</code></a> to <a href="../../objects/nullbool/#false"><code>NullBool.FALSE</code></a>.
returns: 'This Builder after the extra player count has been set. Useful for chaining.'
parameters:
- name: 'maxPlayersCount'
description: 'The number of max players to set.'
type: Integer
attributes:
- nullable
type:
name: 'Builder'
type: 'object'
- name: 'build'
description: 'Creates a new <a href="./.."><code>ProfileEntry</code> instance</a> with the values set in this Builder.'
returns: 'New <a href="./.."><code>ProfileEntry</code> instance</a>.'
type:
name: 'ProfileEntry'
type: 'object'
link: './..'
---
# <api__class></api__class> Builder
Builder class to create a new [`ProfileEntry` instance](index.md).
@@ -0,0 +1,204 @@
---
template: api-doc.html
constructors:
- name: 'ProfileEntry'
description: |
Creates a new instance of a ProfileEntry with the given values.<br>
It's recommended to use the <a href="./builder/"><code>Builder</code> class</a> for a more convenient configuration of the Settings.
parameters:
- name: 'motd'
description: 'The MOTD to use.'
type: 'List<String>'
attributes:
- notnull
- name: 'players'
description: 'The players (Lines) to show in the hover.'
type: 'List<String>'
attributes:
- notnull
- name: 'playerCountText'
description: 'The text to display instead of the player count.'
type: String
attributes:
- nullable
- name: 'favicon'
description: 'The favicon to use.'
type: String
attributes:
- nullable
- name: 'hidePlayersEnabled'
description: 'Whether player count should be hidden.'
type: NullBool
attributes:
- notnull
- name: 'extraPlayersEnabled'
description: 'Whether the extra players option should be enabled.'
type: NullBool
attributes:
- notnull
- name: 'maxPlayersEnabled'
description: 'Whether the max players option should be enabled.'
type: NullBool
attributes:
- notnull
- name: 'extraPlayersCount'
description: 'The number to add to the online players for the max players number.'
type: Integer
attributes:
- nullable
- name: 'maxPlayersCount'
description: 'The number to use for the max players count.'
type: Integer
attributes:
- nullable
seealso:
- name: 'ProfileEntry.Builder'
link: './builder/'
classes:
- name: 'Builder'
description: 'Builder class to create a new ProfileEntry instance.'
type: 'static class'
link: 'builder/'
methods:
- name: 'empty'
description: |
Creates an "empty" PlayerEntry with the following values set:<br>
<ul>
<li><a href="#motd()"><code>motd</code></a>: Empty List</li>
<li><a href="#players()"><code>players</code></a>: Empty List</li>
<li><a href="#playercounttext()"><code>playerCountText</code></a>: Empty String</li>
<li><a href="#favicon()"><code>favicon</code></a>: Empty String</li>
<li><a href="#hideplayersenabled()"><code>hidePlayersEnabled</code></a>: <a href="../../objects/nullbool/#not_set"><code>NullBool.NOT_SET</code></a></li>
<li><a href="#extraplayersenabled()"><code>extraPlayersEnabled</code></a>: <a href="../../objects/nullbool/#not_set"><code>NullBool.NOT_SET</code></a></li>
<li><a href="#maxplayersenabled()"><code>maxPlayersEnabled</code></a>: <a href="../../objects/nullbool/#not_set"><code>NullBoo.NOT_SET</code></a></li>
<li><a href="#extraplayerscount()"><code>extraPlayersCount</code></a>: <code>null</code></li>
<li><a href="#maxplayerscount()"><code>maxPlayersCount</code></a>: <code>null</code></li>
</ul>
returns: 'New ProfileEntry instance with empty/null values defined'
attributes:
- static
type:
name: 'ProfileEntry'
type: 'object'
- name: 'copy'
description: |
Creates a copy of this ProfileEntry instance.<br>
<br>
This is simply a convenience method to not have to call <a href="#builder()"><code>builder()</code></a><code>.</code><a href="./builder/#build()"><code>build()</code></a>.<br>
If you want to modify the ProfileEntry <a href="#builder()"><code>builder()</code></a> is preferred.
returns: 'A copy of this ProfileEntry instance.'
seealso:
- name: 'builder()'
link: '#builder()'
type:
name: 'ProfileEntry'
type: 'object'
- name: 'builder'
description: |
Creates a <a href="./builder/"><code>Builder</code> instance</a> with the values from this ProfileEntry set.<br>
Use this method if you would like to modify the ProfileEntry.
returns: 'A new <a href="./builder/"><code>Builder</code> instance</a> with the values of this ProfileEntry set.'
type:
name: 'Builder'
type: 'object'
link: './builder/'
- name: 'motd'
description: 'Gets the currently set MOTD of this ProfileEntry.'
returns: 'The current MOTD used by this ProfileEntry.'
type:
name: 'List<String>'
type: 'object'
- name: 'players'
description: 'Gets the currently set players of this ProfileEntry.'
returns: 'The current list of players used by this ProfileEntry.'
type:
name: 'List<String>'
type: 'object'
- name: 'playerCountText'
description: 'Gets the currently set player count text of this ProfileEntry.'
returns: 'The current player count text used by this ProfileEntry.'
type:
name: 'String'
type: 'object'
- name: 'favicon'
description: |
Gets the currently set favicon of this ProfileEntry.<br>
Note that the favicon usually is and supports one of the following options:
<ul>
<li>URL to a valid PNG file</li>
<li>File name (with <code>.png</code> extension) matching a file saved in the favicons folder of AdvancedServerList</li>
<li><code>${player uuid}</code> to display the avatar of the player</li>
</ul>
returns: 'The current favicon used by this ProfileEntry.'
type:
name: 'String'
type: 'object'
- name: 'hidePlayersEnabled'
description: |
Whether the player count should be hidden or not in this ProfileEntry.<br>
To get the actual boolean value, append <a href="../../objects/nullbool/#getordefault()"><code>getOrDefault(boolean)</code></a>.
returns: 'Whether the player count should be hidden or not in this ProfileEntry.'
type:
name: 'NullBool'
type: 'object'
link: '../../objects/nullbool/'
- name: 'extraPlayersEnabled'
description: |
Whether the extra players feature should be used or not in this ProfileEntry.<br>
To get the actual boolean value, append <a href="../../objects/nullbool/#getordefault()"><code>getOrDefault(boolean)</code></a>.
returns: 'Whether the extra players feature should be used or not in this ProfileEntry.'
type:
name: 'NullBool'
type: 'object'
link: '../../objects/nullbool/'
- name: 'maxPlayersEnabled'
description: |
Whether the max players feature should be used or not.<br>
To get the actual boolean value, append <a href="../../objects/nullbool/#getordefault()"><code>getOrDefault(boolean)</code></a>.
returns: 'Whether the max players feature should be used or not.'
type:
name: 'NullBool'
type: 'object'
link: '../../objects/nullbool/'
- name: 'extraPlayersCount'
description: 'Gets the currently set number of extra players to use by this ProfileEntry. May be <code>null</code>.'
returns: 'Possibly-null integer number of extra players used by this ProfileEntry.'
attributes:
- nullable
type:
name: 'Integer'
type: 'object'
- name: 'maxPlayersCount'
description: 'Gets the currently set number of max players of this ProfileEntry.'
returns: 'The current number of max players used by this ProfileEntry.'
attributes:
- nullable
type:
name: 'Integer'
type: 'object'
- name: 'isInvalid'
description: |
Whether this ProfileEntry is considered invalid or not.<br>
The ProfileEntry is considered invalid if all the following is true:
<ul>
<li><a href="#motd()"><code>motd()</code></a> is empty.</li>
<li><a href="#players()"><code>players()</code></a> is empty.</li>
<li><a href="#playercounttext()"><code>playerCountText()</code></a> is null/empty <b>and</b> <a href="#hideplayersenabled()"><code>hidePlayersEnabled()</code></a> is <code>false</code>.</li>
<li><a href="#favicon()"><code>favicon()</code></a> is null/empty.</li>
</ul>
As long as one of the above is <b>not</b> true is this ProfileEntry considered valid and <code>false</code> will be returned.
returns: 'Whether this ProfileEntry is invalid or not.'
type:
name: 'boolean'
type: 'primitive'
---
# <api__record></api__record> ProfileEntry
This record represents the content found in a server list profile YAML file.
The content may come from either the "profiles" list, the options in the file itself (global options) or a mix of both.
This class is immutable. Use [`builder()`](#builder()) to get a [`Builder` instance](builder.md) with the values of this class added.
+7
View File
@@ -0,0 +1,7 @@
# API Module
The `api` module is the main part of the AdvancedServerList API. It contains all necessary classes and methods you would want to use to interact with AdvancedServerList.
## Module Structure
{nav}
+12
View File
@@ -0,0 +1,12 @@
---
icon: octicons/file-code-24
---
# API Reference
This page contains the various classes and methods that the AdvancedServerList API provides to you for use.
Please note that while the nav and page content is auto-generated, the data used for the page content is not. So information may be out of date.
## API Structure
{nav}
@@ -0,0 +1,3 @@
nav:
- index.md
- ch.andre601.advancedserverlist.api.bukkit: ch.andre601.advancedserverlist.api.bukkit
@@ -0,0 +1,36 @@
---
template: api-doc.html
constructors:
- name: 'PreServerListSetEvent'
parameters:
- name: 'entry'
type: ProfileEntry
methods:
- name: 'getHandlerList'
returns: 'Static <code>HandlerList</code> instance.'
attributes:
- static
type:
name: 'HandlerList'
type: 'object'
inherits:
'ch.andre601.advancedserverlist.api.events.GenericServerListEvent':
link: '../../../../api/ch.andre601.advancedserverlist.api/events/genericserverlistevent/'
list:
- 'getEntry()'
- 'setEntry(ProfileEntry)'
- 'isCancelled()'
- 'setCancelled(boolean)'
'org.bukkit.event.Event':
link: 'https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/Event.html'
list:
- 'getHandlers()'
---
# <api__class></api__class> PreServerListSetEvent
Called **before** AdvancedServerList modifies the server list.
The provided [`ProfileEntry`](../../../api/ch.andre601.advancedserverlist.api/events/genericserverlistevent.md#getentry()) will be the one used for the server list.
@@ -0,0 +1,50 @@
---
template: api-doc.html
methods:
- name: 'getPlayer'
description: 'Gives the OfflinePlayer embedded in this BukkitPlayer.'
returns: 'OfflinePlayer instance'
type:
name: 'OfflinePlayer'
type: 'object'
- name: 'hasPlayedBefore'
description: |
Returns whether this player has played on the server before.<br>
<br>
The returned boolean may be inaccurate if AdvancedServerList was unable to obtain a valid OfflinePlayer instance.
returns: 'Boolean indicating whether this player has played on the server before.'
type:
name: 'boolean'
- name: 'isBanned'
description: |
Returns whether this player has been banned from the server.<br>
<br>
The returned boolean may be inaccurate if AdvancedServerList was unable to obtain a valid OfflinePlayer instance.
returns: 'Boolean indicating whether this player has been banned from the server.'
type:
name: 'boolean'
- name: 'isWhitelisted'
description: |
Returns whether this player is whitelisted on the server.<br>
<br>
The returned boolean may be inaccurate if AdvancedServerList was unable to obtain a valid OfflinePlayer instance.
returns: 'Boolean indicating whether this player is whitelisted on the server.'
type:
name: 'boolean'
inherits:
'ch.andre601.advancedserverlist.api.objects.GenericPlayer':
link: '../../../../api/ch.andre601.advancedserverlist.api/objects/genericplayer/'
list:
- 'getName()'
- 'getProtocol()'
- 'getUUID()'
---
# <api__interface></api__interface> BukkitPlayer
[`GenericPlayer` instance](../../../api/ch.andre601.advancedserverlist.api/objects/genericplayer.md) for the SpigotMC/Paper server implementation of AdvancedServerList.
This interface includes a [`OfflinePlayer` instance](#getplayer()) obtained from the server the plugin runs on alongside some getters to get if the player [has played on the server before](#hasplayedbefore()), [is banned](#isbanned()) or [is whitelisted](#iswhitelisted()). These options actually require a proper OfflinePlayer instance to be present or will otherwise default to `false`.
This class is useful for cases where you want to use the OfflinePlayer. Simply cast the GenericPlayer instance to a SpigotPlayer (Granted that it actually is an instance of it to begin with).
@@ -0,0 +1,26 @@
---
template: api-doc.html
methods:
- name: 'getWorlds'
description: 'Returns a <code>Map&lt;String, World&gt;</code> where the key is the name of the World and the value the world of the server.'
returns: 'Possibly-empty Map containing pairs of Strings and Worlds.'
type:
name: 'Map<String, World>'
type: 'object'
inherits:
'ch.andre601.advancedserverlist.api.objects.GenericServer':
link: '../../../../api/ch.andre601.advancedserverlist.api/objects/genericserver/'
list:
- 'getPlayersOnline()'
- 'getPlayersMax()'
- 'getHost()'
---
# <api__interface></api__interface> BukkitServer
Spigot/Paper specific instance of a [`GenericServer`](../../../api/ch.andre601.advancedserverlist.api/objects/genericserver.md).
This interface includes a [Map of Worlds](#getworlds()) the server currently has.
This interface is useful for cases where you want to get the worlds of the Server itself, by simply casting your GenericServer instance to a BukkitServer one. Make sure to do proper instanceof checks first before attempting to cast.
@@ -0,0 +1,7 @@
# Bukkit Module
The `platform-bukkit` module contains classes for platform-specific things such as Server events or a Server-specific CachedPlayer instance.
## Module Structure
{nav}
@@ -0,0 +1,3 @@
nav:
- index.md
- ch.andre601.advancedserverlist.api.bungeecord: ch.andre601.advancedserverlist.api.bungeecord
@@ -0,0 +1,24 @@
---
template: api-doc.html
constructors:
- name: 'PreServerListSetEvent'
parameters:
- name: 'entry'
type: ProfileEntry
inherits:
'ch.andre601.advancedserverlist.api.events.GenericServerListEvent':
link: '../../../../api/ch.andre601.advancedserverlist.api/events/genericserverlistevent/'
list:
- 'getEntry()'
- 'setEntry(ProfileEntry)'
- 'isCancelled()'
- 'setCancelled(boolean)'
---
# <api__class></api__class> PreServerListSetEvent
Called **before** AdvancedServerList modifies the server list.
The provided [`ProfileEntry`](../../../api/ch.andre601.advancedserverlist.api/events/genericserverlistevent.md#getentry()) will be the one used for the server list.
@@ -0,0 +1,17 @@
---
template: api-doc.html
inherits:
'ch.andre601.advancedserverlist.api.objects.GenericPlayer':
link: '../../../../api/ch.andre601.advancedserverlist.api/objects/genericplayer/'
list:
- 'getName()'
- 'getProtocol()'
- 'getUUID()'
---
# <api__interface></api__interface> BungeePlayer
[`GenericPlayer` instance](../../../api/ch.andre601.advancedserverlist.api/objects/genericplayer.md) for the BungeeCord proxy implementation of AdvancedServerList.
To get an instance of this class from a GenericPlayer instance, simply cast it to a BungeePlayer (Granted that the GenericPlayer instance actually is a BungeePlayer instance).
@@ -0,0 +1,21 @@
---
template: api-doc.html
methods:
- name: 'getServers'
description: 'Returns a <code>Map&lt;String, ServerInfo&gt;</code> where the key is the name of the server and the value the ServerInfo of the proxy.'
returns: 'Possibly-empty Map containing pairs of Strings and ServerInfos.'
type:
name: 'Map<String, ServerInfo>'
type: 'object'
inherits:
'ch.andre601.advancedserverlist.api.objects.GenericServer':
link: '../../../../api/ch.andre601.advancedserverlist.api/objects/genericserver/'
list:
- 'getPlayersOnline()'
- 'getPlayersMax()'
- 'getHost()'
---
# <api__interface></api__interface> BungeeProxy
@@ -0,0 +1,7 @@
# BungeeCord Module
The `platform-bungeecord` module contains classes for platform-specific things such as Proxy events or a Proxy-specific CachedPlayer instance.
## Module Structure
{nav}
@@ -0,0 +1,3 @@
nav:
- index.md
- ch.andre601.advancedserverlist.api.velocity: ch.andre601.advancedserverlist.api.velocity
@@ -0,0 +1,23 @@
---
template: api-doc.html
constructors:
- name: 'PreServerListSetEvent'
parameters:
- name: 'entry'
type: ProfileEntry
inherits:
'ch.andre601.advancedserverlist.api.events.GenericServerListEvent':
link: '../../../../api/ch.andre601.advancedserverlist.api/events/genericserverlistevent/'
list:
- 'getEntry()'
- 'setEntry(ProfileEntry)'
- 'isCancelled()'
- 'setCancelled(boolean)'
---
# <api__class></api__class> PreServerListSetEvent
Called **before** AdvancedServerList modifies the server list.
The provided [`ProfileEntry`](../../../api/ch.andre601.advancedserverlist.api/events/genericserverlistevent.md#getentry()) will be the one used for the server list.
@@ -0,0 +1,26 @@
---
template: api-doc.html
methods:
- name: 'getVersion'
description: 'Returns the <a href="../../../../api/ch.andre601.advancedserverlist.api/objects/genericplayer/#getprotocol()">protocol version</a> of the player in a readable MC version format (i.e. 1.19.3).'
returns: 'The readable MC version the player uses.'
type:
name: 'String'
type: 'object'
inherits:
'ch.andre601.advancedserverlist.api.objects.GenericPlayer':
link: '../../../../api/ch.andre601.advancedserverlist.api/objects/genericplayer/'
list:
- 'getName()'
- 'getProtocol()'
- 'getUUID()'
---
# <api__interface></api__interface> VelocityPlayer
[`GenericPlayer` instance](../../../api/ch.andre601.advancedserverlist.api/objects/genericplayer.md) for the Velocity proxy implementation of AdvancedServerList.
Provides a [`getVersion()` method](#getversion()) to get the MC version used as a readable String (i.e. 1.19.3) rather than just the protocol version.
To get an instance of this class from a GenericPlayer instance, simply cast it to a VelocityPlayer (Granted that the GenericPlayer instance actually is a VelocityPlayer instance).
@@ -0,0 +1,21 @@
---
template: api-doc.html
methods:
- name: 'getServers'
description: 'Returns a <code>Map&lt;String, RegisteredServer&gt;</code> where the key is the name of the server and the value the RegisteredServer of the proxy.'
returns: 'Possibly-empty Map containing pairs of Strings and RegisteredServers.'
type:
name: 'Map<String, RegisteredServer>'
type: 'object'
inherits:
'ch.andre601.advancedserverlist.api.objects.GenericServer':
link: '../../../api/objects/genericserver/'
list:
- 'getPlayersOnline()'
- 'getPlayersMax()'
- 'getHost()'
---
# <api__interface></api__interface> VelocityProxy
@@ -0,0 +1,7 @@
# Velocity Module
The `platform-velocity` module contains classes for platform-specific things such as Proxy events or a Proxy-specific CachedPlayer instance.
## Module Structure
{nav}
+204
View File
@@ -0,0 +1,204 @@
# API Reference Docs Structure
The Reference docs follow a specific mixture of manually created and auto-generated page content.
A page may look something like this:
```markdown
---
template: api-doc.html
constructors:
- name: 'Constructor'
description: 'Creates a new instance of this class.'
methods:
- name: 'getString'
description: 'Gets a String.'
type:
name: String
type: object
---
# <api__class></api__class> Constructor
An example class to show how the page structure may look like.
```
## custom HTML tags
There is a collection of custom HTML tags that are used to render specific text in certain styles.
Below is a list of all custom tags. Note that these tags only render on the actual site and not within the repository when viewing the source.
- `<api__class></api__class>`: <api__class></api__class>
- `<api__interface></api__interface>`: <api__interface></api__interface>
- `<api__enum></api__enum>`: <api__enum></api__enum>
- `<api__record></api__record>`: <api__record></api__record>
- `<api__abstract></api__abstract>`: <api__abstract></api__abstract>
- `<api__static></api__static>`: <api__static></api__static>
- `<api__final></api__final>`: <api__final></api__final>
- `<api__notnull></api__notnull>`: <api__notnull></api__notnull>
- `<api__nullable></api__nullable>`: <api__nullable></api__nullable>
- `<api__deprecated></api__deprecated>`: <api__deprecated></api__deprecated>
In addition are there two classes used within `span` tags to colour the text, to indicate their type:
- `<span class="api-type__object">Object</span>`: <span class="api-type__object">Object</span>
- `<span class="api-type__primitive">primitive</span>`: <span class="api-type__primitive">primitive</span>
## Auto-generated content
A page template is used to auto-generate the page content based on available YAML frontmatter.
Depending on the frontmatter available will the template call a jinja2 Macro to generate a Summary and Detailed info on the page for the respective frontmatter data.
There are 5 frontmatter options, each following a specific structure:
- [`Constructors`](#constructors)
- [`Nested Classes`](#nested-classes)
- [`Enum Constants`](#enum constants)
- [`Methods`](#methods)
- [`Inherits`](#inherits)
### Constructors
```yaml
constructors:
- name: '<string>'
description: '<string>'
parameters:
- name: '<string>'
description: '<string>'
type: '<string>'
attributes:
- '<string>'
deprecated: '<string>'
throws:
- name: '<string>'
description: '<string>'
seealso:
- name: '<string>'
link: '<string>'
```
**Options:**
- `name` - The name to display for the Constructor summary and detail. This should include any parameters the Constructor has, but without any parameter name.
- `description` - The description to display for the Constructor.
- `parameters` - List of parameters to display.
- `name` - Name of the parameter to display.
- `description` - Description of the parameter.
- `type` - The type this parameter is.
- `attributes` - List of attributes (i.e. nullability) to display. The provided values will be turned into `<api__{name}></api__{name}>` tags that will be prependet to the parameter name.
- `deprecated` - Adds a notice about the deprecation of this Constructor in the form of a deprecation label and a `deprecated` section with the provided `<string>` as explanation.
- `throws` - List of possible throws to display.
- `name` - Name of the throw to display.
- `description` - Description of the throw.
- `seealso` - List of "See also" text to display.
- `name` - Name of the See also link.
- `link` - Link (Relative, absolute or URL) to use for the See also text.
### Nested Classes
```yaml
classes:
- name: '<string>'
description: '<string>'
type: '<string>'
link: '<string>'
```
**Options:**
- `name` - The name to display for the Nested Classes Summary.
- `description` - The description of the nested class.
- `type` - Modifier and type of the nested class.
- `link` - Link to the nested class.
### Enum Constants
```yaml
enums:
- name: '<string>'
description: '<string>'
type: '<string>'
deprecated: '<string>'
seealso:
- name: '<string>'
link: '<string>'
```
**Options:**
- `name` - The name to display for the Enum summary and detail. This should include any parameters the Enum has, but without any parameter name.
- `description` - The description to display for the Enum.
- `type` - The return type to display. Will default to `{{ page.title }}` if not set.
- `deprecated` - Adds a notice about the deprecation of this Enum in the form of a deprecation label and a `deprecated` section with the provided `<string>` as explanation.
- `seealso` - List of "See also" text to display.
- `name` - Name of the See also link.
- `link` - Link (Relative, absolute or URL) to use for the See also text.
### Methods
```yaml
methods:
- name: '<string>'
description: '<string>'
type:
name: '<string>'
type: '<string>'
link: '<string>'
attributes:
- '<string>'
parameters:
- name: '<string>'
description: '<string>'
type: '<string>'
attributes:
- '<string>'
returns: '<string>'
deprecated: '<string>'
throws:
- name: '<string>'
description: '<string>'
seealos:
- name: '<string>'
link: '<string>'
```
**Options:**
- `name` - The name to display for the Method summary and detail. This should include any parameters the Method has, but without any parameter name.
- `description` - The description to display for the Method.
- `type` - Options for object type to display.
- `name` - Displayed name of the object.
- `type` - Object type. Can be either `object` or `primitive` which would be used in a class name for styling.
- `link` - Link (Relative, absolute or URL) to use for the type name.
- `attributes` - List of attributes (i.e. nullability) to display. The provided values will be turned into `<api__{name}></api__{name}>` tags that will be prependet to the name.
- `parameters` - List of parameters to display.
- `name` - Name of the parameter to display.
- `description` - Description of the parameter.
- `type` - The type this parameter is.
- `attributes` - List of attributes (i.e. nullability) to display. The provided values will be turned into `<api__{name}></api__{name}>` tags that will be prependet to the parameter name.
- `returns` - Possible return values.
- `deprecated` - Adds a notice about the deprecation of this Method in the form of a deprecation label and a `deprecated` section with the provided `<string>` as explanation.
- `throws` - List of possible throws to display.
- `name` - Name of the throw to display.
- `description` - Description of the throw.
- `seealso` - List of "See also" text to display.
- `name` - Name of the See also link.
- `link` - Link (Relative, absolute or URL) to use for the See also text.
### Inherits
```yaml
inherits:
'<string>':
link: '<string>'
methods:
- '<string>'
```
**Options:**
- `inherits.<string>` - Classpath used to display in the text `Methods inherited from <string>`
- `link` - Link to use for the classpath text.
- `methods` - List of strings to display. Each will be linked using `{link}#{method}`
+10
View File
@@ -0,0 +1,10 @@
---
template: redirect.html
location: https://github.com/Andre601/asl-api
title: Source Code
icon: octicons/mark-github-16
---
<!-- Comment to trigger proper build -->
+1
View File
@@ -0,0 +1 @@
hide: true
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

+93
View File
@@ -0,0 +1,93 @@
document$.subscribe(async () => {
const url = 'https://codeberg-stats-proxy.vercel.app/repo'
const repo_stats = document.querySelector('[data-md-component="source"] .md-source__repository');
function loadCodebergInfo(data) {
const facts = document.createElement("ul");
facts.className = "md-source__facts";
const version = document.createElement("li");
version.className = "md-source__fact md-source__fact--version";
const stars = document.createElement("li");
stars.className = "md-source__fact md-source__fact--stars";
const forks = document.createElement("li");
forks.className = "md-source__fact md-source__fact--forks";
version.innerText = data["version"];
stars.innerText = data["stars"];
forks.innerText = data["forks"];
facts.appendChild(version);
facts.appendChild(stars);
facts.appendChild(forks);
repo_stats.appendChild(facts);
}
function loadApiInfo(data) {
const version = data["version"];
const versionToken = '{apiVersion}';
const codeBlocks = document.querySelectorAll('.md-content pre code');
for(const codeBlock of codeBlocks) {
codeBlock.innerHTML = codeBlock.innerHTML.replace(new RegExp(versionToken, 'g'), version);
}
}
function loadPluginVersion(data) {
const version = data["version"];
const versionToken = '{version}'
const entries = document.querySelectorAll('.md-content code');
for(const entry of entries) {
entry.innerHTML = entry.innerHTML.replace(new RegExp(versionToken, 'g'), version);
}
}
async function fetchApiInfo() {
const tag = await fetch("https://api.github.com/repos/Andre601/asl-api/releases/latest").then(_ => _.json());
const data = {
"version": tag.tag_name
};
__md_set("__api_tag", data, sessionStorage);
loadApiInfo(data);
}
async function fetchInfo() {
const [release, repo] = await Promise.all([
fetch(`${url}/latest-release`).then(_ => _.json()),
fetch(`${url}/stats`).then(_ => _.json()),
]);
const data = {
"version": release.name,
"stars": repo.stars,
"forks": repo.forks
};
__md_set("__git_repo", data, sessionStorage);
loadCodebergInfo(data);
loadPluginVersion(data);
}
if(!document.querySelector('[data-md-component="source"] .md-source__facts')) {
const cached = __md_get("__git_repo", sessionStorage);
if((cached != null) && (cached["version"])) {
loadCodebergInfo(cached);
loadPluginVersion(cached);
} else {
fetchInfo();
}
}
if(location.href.includes('/api/')) {
const cachedApi = __md_get("__api_tag", sessionStorage);
if((cachedApi != null) && (cachedApi["version"])) {
loadApiInfo(cachedApi);
} else {
fetchApiInfo();
}
}
})
Loaded 100 of 167 files, more files were not shown because too many files have changed in this diff. Show more