Compare commits

...
1527 Commits
Author SHA1 Message Date
Andre601 9feb3dfac6 Bump version 2024-10-02 13:43:45 +02:00
Andre601 5961d0dca0 Don't log errors when fetching servers (+ misc changes) 2024-10-02 13:43:05 +02:00
Andre601 3d5d4fcab2 Fix wrong name for AdvancedBan in BanPlugins Addon 2024-10-01 19:58:11 +02:00
Andre601 0763a9b3b4 Fix wrong main class for Paper BanPluginsAddon 2024-10-01 02:26:14 +02:00
Andre601 2d67a89fc2 Merge pull request 'Update dependency mkdocs-material to v9.5.39' (#349) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/349
2024-09-29 12:07:56 +00:00
Andre601's Bot 4207d875f9 Update dependency mkdocs-material to v9.5.39 2024-09-29 12:03:17 +00:00
Andre601 5da420c6c6 Merge pull request 'feature/online-players-setting' (#348) from feature/online-players-setting into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/348
2024-09-27 14:27:47 +00:00
Andre601 1ffa4842c3 Update API docs and bump version to major v5 2024-09-26 16:47:28 +02:00
Andre601 819e194f27 Make Server placeholders return empty String instead of null. 2024-09-26 16:11:38 +02:00
Andre601 269e55b93f Merge branch 'master' into feature/online-players-setting 2024-09-26 15:54:50 +02:00
Andre601 04412f7138 Implement feature to set online player count 2024-09-26 15:54:28 +02:00
Andre601 0fce9d01e1 Merge pull request 'Update dependency mkdocs-material to v9.5.38' (#346) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/346
2024-09-26 13:50:41 +00:00
Andre601's Bot 1c29301635 Update dependency mkdocs-material to v9.5.38 2024-09-26 12:02:06 +00:00
Andre601 8bd7bbb5d7 Merge pull request 'Update dependency org.junit.jupiter:junit-jupiter-engine to v5.11.1' (#345) from renovate/org.junit.jupiter-junit-jupiter-engine-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/345
2024-09-25 12:04:33 +00:00
Andre601 1a99663b59 Merge pull request 'Update dependency mkdocs-material to v9.5.37' (#344) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/344
2024-09-25 12:04:14 +00:00
Andre601's Bot 36e31279b2 Update dependency org.junit.jupiter:junit-jupiter-engine to v5.11.1 2024-09-25 12:01:31 +00:00
Andre601's Bot 4aa7eba675 Update dependency mkdocs-material to v9.5.37 2024-09-25 12:01:21 +00:00
Andre601 3bbe2d26b8 Merge pull request 'Update dependency com.google.guava:guava to v33.3.1-jre' (#342) from renovate/com.google.guava-guava-33.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/342
2024-09-24 13:11:35 +00:00
Andre601 782ad838be Merge pull request 'Update dependency org.bstats:bstats-velocity to v3.1.0' (#343) from renovate/org.bstats-bstats-velocity-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/343
2024-09-24 13:11:22 +00:00
Andre601's Bot ceddb26137 Update dependency org.bstats:bstats-velocity to v3.1.0 2024-09-24 12:01:32 +00:00
Andre601's Bot ff044d75c7 Update dependency com.google.guava:guava to v33.3.1-jre 2024-09-24 12:01:25 +00:00
Andre601 8955df695d Merge pull request 'Update dependency org.bstats:bstats-bungeecord to v3.1.0' (#341) from renovate/org.bstats-bstats-bungeecord-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/341
2024-09-23 12:57:03 +00:00
Andre601 8ddcb208f5 Merge pull request 'Update dependency org.bstats:bstats-bukkit to v3.1.0' (#340) from renovate/org.bstats-bstats-bukkit-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/340
2024-09-23 12:56:27 +00:00
Andre601's Bot 95834df89f Update dependency org.bstats:bstats-bungeecord to v3.1.0 2024-09-23 12:01:58 +00:00
Andre601's Bot 2f67f26cbe Update dependency org.bstats:bstats-bukkit to v3.1.0 2024-09-23 12:01:52 +00:00
Andre601 00957f9458 Merge pull request 'Create ${proxy status ...} placeholder.' (#334) from feature/proxy-status-placeholder into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/334
2024-09-22 13:12:42 +00:00
Andre601 2e9e886c48 Merge pull request 'Update dependency mkdocs-material to v9.5.36' (#338) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/338
2024-09-21 12:24:01 +00:00
Andre601's Bot d2d4e48b73 Update dependency mkdocs-material to v9.5.36 2024-09-21 12:01:47 +00:00
Andre601 fe16df27f2 Merge pull request 'Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.4' (#337) from renovate/org.apache.httpcomponents.client5-httpclient5-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/337
2024-09-20 15:51:44 +00:00
Andre601's Bot cc29f70dff Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.4 2024-09-20 12:02:38 +00:00
Andre601 e136f7cfaf Merge pull request 'Update dependency mkdocs-material to v9.5.35' (#336) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/336
2024-09-18 12:05:57 +00:00
Andre601's Bot fd52f124fb Update dependency mkdocs-material to v9.5.35 2024-09-18 12:01:38 +00:00
Andre601 5a656cee39 Merge pull request 'Update alpine Docker tag to v3.20.3' (#335) from renovate/alpine-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/335
2024-09-17 14:39:09 +00:00
Andre601's Bot 21a89f9b14 Update alpine Docker tag to v3.20.3 2024-09-17 12:01:40 +00:00
Andre601 9ded4d2d57 Add more placeholders 2024-09-09 14:49:07 +02:00
Andre601 fb64d92879 Create Proxy Placeholder 2024-09-09 02:05:50 +02:00
Andre601 1a4bcae4d1 Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.8' (#331) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/331
2024-09-07 12:07:57 +00:00
Andre601's Bot 25ee4da4f4 Update dependency ch.qos.logback:logback-classic to v1.5.8 2024-09-07 12:01:12 +00:00
Andre601 35cb39c35e Merge pull request 'Update dependency mkdocs-material to v9.5.34' (#330) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/330
2024-09-01 14:09:33 +00:00
Andre601's Bot 3a5f232f92 Update dependency mkdocs-material to v9.5.34 2024-09-01 12:03:23 +00:00
Andre601 4ed201fba9 Bump version 2024-08-29 20:31:14 +02:00
Andre601 03835f71d9 Fix local favicon saving using non-lowercased names. 2024-08-29 20:30:44 +02:00
Andre601 480e50e71e .woodpecker/publish_assets.yml aktualisiert 2024-08-29 11:51:38 +00:00
Andre601 39110b2898 Merge pull request 'Update dependency mkdocs-material to v9.5.33' (#329) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/329
2024-08-23 13:08:17 +00:00
Andre601's Bot e8db70e319 Update dependency mkdocs-material to v9.5.33 2024-08-23 12:02:52 +00:00
Andre601 eb907988fb Merge pull request 'Update maven Docker tag to v3.9.9' (#328) from renovate/maven-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/328
2024-08-21 12:39:31 +00:00
Andre601's Bot 95935022b8 Update maven Docker tag to v3.9.9 2024-08-21 12:10:41 +00:00
Andre601 1e70cb0651 Merge pull request 'Update dependency org.bstats:bstats-velocity to v3.0.3' (#327) from renovate/org.bstats-bstats-velocity-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/327
2024-08-20 13:55:27 +00:00
Andre601 1594d062e5 Merge pull request 'Update dependency org.bstats:bstats-bungeecord to v3.0.3' (#326) from renovate/org.bstats-bstats-bungeecord-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/326
2024-08-20 13:55:11 +00:00
Andre601's Bot 04b266f558 Update dependency org.bstats:bstats-velocity to v3.0.3 2024-08-20 12:03:13 +00:00
Andre601's Bot 9989fec809 Update dependency org.bstats:bstats-bungeecord to v3.0.3 2024-08-20 12:03:06 +00:00
Andre601 ab8eabc348 Merge pull request 'Update dependency org.bstats:bstats-bukkit to v3.0.3' (#325) from renovate/org.bstats-bstats-bukkit-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/325
2024-08-19 13:54:53 +00:00
Andre601 931b8b5c36 Merge pull request 'Update dependency mkdocs-material to v9.5.32' (#324) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/324
2024-08-19 13:53:45 +00:00
Andre601's Bot 64957ba13c Update dependency org.bstats:bstats-bukkit to v3.0.3 2024-08-19 12:04:55 +00:00
Andre601's Bot a03be990ab Update dependency mkdocs-material to v9.5.32 2024-08-19 12:04:46 +00:00
Andre601 44729495f5 Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.7' (#322) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/322
2024-08-19 00:59:33 +00:00
Andre601 9e7500f0cd Merge pull request 'Update dependency com.google.guava:guava to v33.3.0-jre' (#323) from renovate/com.google.guava-guava-33.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/323
2024-08-17 12:06:21 +00:00
Andre601's Bot d10ff8bdbc Update dependency com.google.guava:guava to v33.3.0-jre 2024-08-17 12:04:11 +00:00
Andre601's Bot f91fc36365 Update dependency ch.qos.logback:logback-classic to v1.5.7 2024-08-16 12:02:51 +00:00
Andre601 84ddff07a2 Merge pull request 'Update dependency org.junit.jupiter:junit-jupiter-engine to v5.11.0' (#321) from renovate/org.junit.jupiter-junit-jupiter-engine-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/321
2024-08-14 12:46:12 +00:00
Andre601's Bot 4a89658cf4 Update dependency org.junit.jupiter:junit-jupiter-engine to v5.11.0 2024-08-14 12:31:56 +00:00
Andre601 5daef41031 Fix renovate.json 2024-08-14 12:22:44 +00:00
Andre601 07cc1e8160 Update registry URL for Libby 2024-08-13 12:45:02 +00:00
Andre601 8b2d763207 Adding Maintenance placeholders 2024-08-12 23:29:53 +02:00
Andre601 fb8c556e24 Merge pull request 'Update dependency net.william278:papiproxybridge to v1.6.2' (#320) from renovate/net.william278-papiproxybridge-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/320
2024-08-12 12:04:15 +00:00
Andre601's Bot 397fa12f12 Update dependency net.william278:papiproxybridge to v1.6.2 2024-08-12 12:03:25 +00:00
Andre601 d86ecf8d8b Merge pull request 'Update dependency com.viaversion:viaversion-api to v5.0.3' (#319) from renovate/com.viaversion-viaversion-api-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/319
2024-08-08 12:49:45 +00:00
Andre601's Bot 2882e9ecdf Update dependency com.viaversion:viaversion-api to v5.0.3 2024-08-08 12:03:10 +00:00
Andre601 69a4a05069 Merge pull request 'Update dependency net.kyori:adventure-platform-bungeecord to v4.3.4' (#318) from renovate/dependency.adventure-platform-bungeecord into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/318
2024-08-07 12:35:00 +00:00
Andre601's Bot 361a340ef1 Update dependency net.kyori:adventure-platform-bungeecord to v4.3.4 2024-08-07 12:03:12 +00:00
Andre601 ee7c0451af Merge pull request 'Update dependency mkdocs-material to v9.5.31' (#316) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/316
2024-08-02 12:11:44 +00:00
Andre601's Bot 200c7cbfea Update dependency mkdocs-material to v9.5.31 2024-08-02 12:03:08 +00:00
Andre601 9a665ddf26 Merge pull request 'Make various improvements to UpdateChecker' (#315) from feat/update-checker-improvements into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/315
2024-07-30 14:08:41 +00:00
Andre601 c4327ac238 Bump version and don't use lenient setting in Gson 2024-07-30 16:07:00 +02:00
Andre601 9f4b798848 Make various improvements to UpdateChecker 2024-07-29 23:42:10 +02:00
Andre601 3cc18f4dc0 Merge pull request 'Update dependency com.viaversion:viaversion-api to v5.0.2' (#313) from renovate/com.viaversion-viaversion-api-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/313
2024-07-29 12:21:52 +00:00
Andre601's Bot 9637308045 Update dependency com.viaversion:viaversion-api to v5.0.2 2024-07-29 12:02:59 +00:00
Andre601 772603e785 Merge pull request 'Update dependency dev.masecla:Modrinth4J to v2.2.0' (#312) from renovate/dev.masecla-modrinth4j-2.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/312
2024-07-26 14:30:44 +00:00
Andre601's Bot f9417ee2f7 Update dependency dev.masecla:Modrinth4J to v2.2.0 2024-07-26 12:03:04 +00:00
Andre601 2db85bff60 Merge pull request 'Update dependency mkdocs-material to v9.5.30' (#311) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/311
2024-07-23 12:06:48 +00:00
Andre601's Bot 527b5aa25c Update dependency mkdocs-material to v9.5.30 2024-07-23 12:03:04 +00:00
Andre601 5d9bb0dc4a Merge pull request 'Update dependency mkdocs-material to v9.5.29' (#310) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/310
2024-07-14 12:05:50 +00:00
Andre601's Bot cc51756f0d Update dependency mkdocs-material to v9.5.29 2024-07-14 12:01:13 +00:00
Andre601 5ff66adb0c Merge pull request 'Fix Paper PlayerSample deprecation.' (#309) from fix/paper-playersample-deprecation into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/309
2024-07-11 14:59:21 +00:00
Andre601 8e9cc98ded Update registry URLs for Renovate 2024-07-11 13:41:07 +00:00
Andre601 4387e78007 Update VersionUploader to list latest MC release as supported. 2024-07-11 15:33:27 +02:00
Andre601 4fff1e24cc Fix Paper PlayerSample deprecation. 2024-07-11 15:28:14 +02:00
Andre601 9791ed0cee Merge pull request 'Update dependency mkdocs-material to v9.5.28' (#308) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/308
2024-07-02 15:07:08 +00:00
Andre601's Bot e8e6f3a8fd Update dependency mkdocs-material to v9.5.28 2024-07-02 12:01:55 +00:00
Andre601 5e6da9b24e Merge pull request 'Use allorigins.win for fetching stats' (#307) from feat/docs-use-allorigins.win into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/307
2024-07-01 12:28:50 +00:00
Andre601 59bd9239b2 Use raw instead? 2024-07-01 12:24:52 +00:00
Andre601 08436a278c Fix wrong json keys 2024-07-01 12:11:14 +00:00
Andre601 5d512e5e89 Use allorigins.win for fetching stats 2024-07-01 12:02:11 +00:00
Andre601 ec1a367691 Merge pull request 'Update maven Docker tag to v3.9.8' (#306) from renovate/maven-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/306
2024-06-28 12:16:32 +00:00
Andre601 457450683b Merge pull request 'Update dependency org.junit.jupiter:junit-jupiter-engine to v5.10.3' (#305) from renovate/org.junit.jupiter-junit-jupiter-engine-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/305
2024-06-28 12:16:21 +00:00
Andre601's Bot a8d76d6b0f Update maven Docker tag to v3.9.8 2024-06-28 12:01:20 +00:00
Andre601's Bot 5036d62824 Update dependency org.junit.jupiter:junit-jupiter-engine to v5.10.3 2024-06-28 12:01:12 +00:00
Andre601 4f5f6e724f Merge pull request 'Update dependency com.viaversion:viaversion-api to v5.0.1' (#304) from renovate/com.viaversion-viaversion-api-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/304
2024-06-23 12:12:00 +00:00
Andre601's Bot 71f7532fe3 Update dependency com.viaversion:viaversion-api to v5.0.1 2024-06-23 12:01:14 +00:00
Andre601 9ea37af603 Merge pull request 'Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.2' (#303) from renovate/org.apache.maven.plugins-maven-jar-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/303
2024-06-20 18:35:21 +00:00
Andre601's Bot 1964a6b4e3 Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.2 2024-06-20 12:01:22 +00:00
Andre601 94a9ea31a0 Merge pull request 'Update dependency mkdocs-material to v9.5.27' (#301) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/301
2024-06-17 12:05:56 +00:00
Andre601 2855d268da Merge pull request 'Update dependency com.viaversion:viaversion-api to v5' (#302) from renovate/com.viaversion-viaversion-api-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/302
2024-06-17 12:05:27 +00:00
Andre601's Bot d6d576da20 Update dependency com.viaversion:viaversion-api to v5 2024-06-17 12:01:48 +00:00
Andre601's Bot 34ed832d79 Update dependency mkdocs-material to v9.5.27 2024-06-17 12:01:39 +00:00
Andre601 42ef8c0c39 Update getting-started guide 2024-06-10 13:07:57 +02:00
Andre601 1ce0c2db4e Merge pull request 'Update dependency mkdocs-material to v9.5.26' (#299) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/299
2024-06-06 12:06:19 +00:00
Andre601's Bot 028aaa1cf7 Update dependency mkdocs-material to v9.5.26 2024-06-06 12:03:07 +00:00
Andre601 66937916c4 Bump version 2024-06-06 02:32:46 +02:00
Andre601 82a053095e Display yt video thumbnail 2024-06-03 23:56:41 +00:00
Andre601 f24e62687d Merge pull request 'Update dependency net.kyori:adventure-platform-bungeecord to v4.3.3' (#298) from renovate/dependency.adventure-platform-bungeecord into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/298
2024-06-02 12:03:11 +00:00
Andre601's Bot 184cf8443c Update dependency net.kyori:adventure-platform-bungeecord to v4.3.3 2024-06-02 12:01:20 +00:00
Andre601 2b06bcc497 Merge pull request 'Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.6.0' (#297) from renovate/org.apache.maven.plugins-maven-shade-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/297
2024-06-01 12:32:39 +00:00
Andre601 743f4cc5eb Merge branch 'master' into renovate/org.apache.maven.plugins-maven-shade-plugin-3.x 2024-06-01 12:32:31 +00:00
Andre601 45ccb18133 Merge pull request 'Update dependency com.google.guava:guava to v33.2.1-jre' (#296) from renovate/com.google.guava-guava-33.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/296
2024-06-01 12:32:21 +00:00
Andre601's Bot 3812e11702 Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.6.0 2024-06-01 12:02:46 +00:00
Andre601's Bot c731cd3c87 Update dependency com.google.guava:guava to v33.2.1-jre 2024-06-01 12:02:34 +00:00
Andre601 466a24eea3 Bump ExpressionParser to 1.4.3 2024-05-29 15:05:31 +02:00
Andre601 d747a0c19a Merge pull request 'Update maven Docker tag to v3.9.7' (#295) from renovate/maven-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/295
2024-05-29 12:21:38 +00:00
Andre601's Bot 59a64620bf Update maven Docker tag to v3.9.7 2024-05-29 12:05:46 +00:00
Andre601 f36b4b4078 Merge pull request 'Update dependency mkdocs-material to v9.5.25' (#292) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/292
2024-05-27 12:03:05 +00:00
Andre601's Bot 9298b0270b Update dependency mkdocs-material to v9.5.25 2024-05-27 12:01:04 +00:00
Andre601 d8dc50ceec Make ProfileEntry nav consistent 2024-05-26 00:30:17 +00:00
Andre601 60be698c61 Upload command hover images 2024-05-25 22:17:57 +00:00
Andre601 0b37e92260 Update docs 2024-05-25 15:51:56 +02:00
Andre601 b7b1b63c4e Bump version 2024-05-25 15:43:54 +02:00
Andre601 98b923aa54 Redo command system and add profiles sub-command 2024-05-25 15:42:57 +02:00
Andre601 b24d7cb849 Simplify folder path retrieval 2024-05-23 14:57:24 +02:00
Andre601 7df7157d5f Fix another wrong folder name and bump version 2024-05-23 14:55:50 +02:00
Andre601 47263746db Merge pull request 'Add MiniMOTD migrator' (#291) from feat/minimotd-migrator into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/291
2024-05-23 12:52:32 +00:00
Andre601 ff06b06966 Fix wrong folder name on Velocity 2024-05-23 14:25:28 +02:00
Andre601 fe42d282d1 Update documentation 2024-05-23 14:19:16 +02:00
Andre601 12df4e49c6 Add serializations 2024-05-22 13:42:20 +02:00
Andre601 06812b2725 Add MiniMOTD migrator 2024-05-21 21:13:04 +02:00
Andre601 93e4ae7ca7 Merge pull request 'Update dependency me.clip:placeholderapi to v2.11.6' (#290) from renovate/me.clip-placeholderapi-2.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/290
2024-05-21 12:04:06 +00:00
Andre601's Bot d57f3f20e3 Update dependency me.clip:placeholderapi to v2.11.6 2024-05-21 12:02:46 +00:00
Andre601 f418fb961b Merge pull request 'Update dependency mkdocs-material to v9.5.24' (#288) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/288
2024-05-20 12:06:14 +00:00
Andre601 267af92ceb Merge pull request 'Update dependency com.google.code.gson:gson to v2.11.0' (#289) from renovate/com.google.code.gson-gson-2.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/289
2024-05-20 12:05:28 +00:00
Andre601's Bot 57448ddaf6 Update dependency com.google.code.gson:gson to v2.11.0 2024-05-20 12:02:53 +00:00
Andre601's Bot 9f40af4553 Update dependency mkdocs-material to v9.5.24 2024-05-20 12:02:42 +00:00
Andre601 e25da2c6c5 Remove unused GitHub Actions label 2024-05-20 11:51:38 +00:00
Andre601 897cccaa86 Update description in renovate.json 2024-05-20 11:50:27 +00:00
Andre601 512efd0efe Merge pull request 'Update dependency eu.kennytv.maintenance:maintenance-api to v4.2.1' (#287) from renovate/eu.kennytv.maintenance-maintenance-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/287
2024-05-19 12:07:28 +00:00
Andre601's Bot b67fa683c6 Update dependency eu.kennytv.maintenance:maintenance-api to v4.2.1 2024-05-19 12:01:19 +00:00
Andre601 34387925b8 Update docker image to temurin 21 2024-05-17 14:15:36 +02:00
Andre601 303dbc5ae9 Bump version 2024-05-17 14:02:50 +02:00
Andre601 ee565ff6f7 Update Paper API to 1.20.6 and use new BuildInfo class 2024-05-17 14:02:11 +02:00
Andre601 98baaab36a Add LiteBansAPI to jitpack lookup 2024-05-16 12:07:28 +00:00
Andre601 92e9d790a4 Merge pull request 'Update dependency mkdocs-material to v9.5.23' (#286) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/286
2024-05-16 12:05:26 +00:00
Andre601's Bot b8f2e2932b Update dependency mkdocs-material to v9.5.23 2024-05-16 12:02:13 +00:00
Andre601 45f9202bdd Use a normal h1 header here 2024-05-16 12:01:18 +00:00
Andre601 ffeffc70c3 Also update readme itself 2024-05-16 12:01:00 +00:00
Andre601 60080a5af6 Improve Modrinth page 2024-05-16 11:52:46 +00:00
Andre601 1191265c8c Fix missing muteDuration and banDuration placeholders in LiteBansPlaceholders
Also, make ban and mute return String instead of boolean.
2024-05-15 18:23:45 +02:00
Andre601 27dfeea12c Improve formatting page a bit 2024-05-15 16:17:18 +00:00
Andre601 e50ec1632d Add LiteBans support for BanPlugins addon 2024-05-15 17:06:09 +02:00
Andre601 a0d4dedc9d Merge pull request 'Update dependency mkdocs-material to v9.5.22' (#285) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/285
2024-05-13 12:07:09 +00:00
Andre601's Bot 9eda026738 Update dependency mkdocs-material to v9.5.22 2024-05-13 12:01:27 +00:00
Andre601 f3b81b7cb6 Fix a typo in the migration page of slp 2024-05-13 11:56:42 +00:00
Andre601 cf766ddd9a Bump version to 4.8.0 2024-05-13 13:38:11 +02:00
Andre601 12cd2f5e6b Use PAPIProxyBridge 1.6.1 2024-05-13 00:32:52 +02:00
Andre601 04ef50ea91 Use a unified Caching util 2024-05-12 14:41:28 +02:00
Andre601 d4c627fa79 Remove outdated info 2024-05-12 12:39:49 +02:00
Andre601 deffc28ab6 Implement workaround for 16 character limit on paper 2024-05-12 12:35:32 +02:00
Andre601 833f8f5dbb Fix PAPIProxyBridge breaking change 2024-05-11 15:30:04 +02:00
Andre601 5bdf2fa301 Merge pull request 'Update dependency net.william278:papiproxybridge to v1.6' (#284) from renovate/net.william278-papiproxybridge-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/284
2024-05-11 12:16:13 +00:00
Andre601's Bot d13607873c Update dependency net.william278:papiproxybridge to v1.6 2024-05-11 12:01:04 +00:00
Andre601 a1f11dac03 Update docs 2024-05-10 20:38:20 +02:00
Andre601 74f1805441 Merge pull request 'Limit character length to 16 for player entries' (#283) from fix/282-profile-name-limit into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/283
2024-05-10 17:48:53 +00:00
Andre601 21046d8eee Fix index out of bounds issue 2024-05-10 19:43:01 +02:00
Andre601 0c37e3bb35 Actually truncate text after serialization [SKIP CI] 2024-05-10 17:42:48 +02:00
Andre601 3f9ea7035f Add info box to docs 2024-05-10 17:35:59 +02:00
Andre601 b55c56af12 Add note to option description. 2024-05-10 17:30:28 +02:00
Andre601 498a948605 Limit character length to 16 for player entries 2024-05-10 17:23:37 +02:00
Andre601 76a1890bba Make the migrator not create a single profiles entry 2024-05-10 15:34:33 +02:00
Andre601 8899770518 Improve SLP Migration page 2024-05-10 15:28:30 +02:00
Andre601 a7d29d292f Merge pull request 'Update dependency com.viaversion:viaversion-api to v4.10.2' (#281) from renovate/com.viaversion-viaversion-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/281
2024-05-10 12:09:48 +00:00
Andre601's Bot a9ca388f4e Update dependency com.viaversion:viaversion-api to v4.10.2 2024-05-10 12:01:34 +00:00
Andre601 c42a88142c Include names for external dependencies 2024-05-09 15:14:53 +02:00
Andre601 9fe78d3e6e Slightly better error message. 2024-05-09 15:09:38 +02:00
Andre601 816a58493a Include response body in error 2024-05-09 14:47:50 +02:00
Andre601 bc84cd2ec9 Add SLP dependency to Hangar, Update MC version and bump version 2024-05-09 14:36:13 +02:00
Andre601 5f7fda250c Merge branch 'renovate/dependency.adventure-text-serializer-legacy' 2024-05-09 14:21:19 +02:00
Andre601 03b58da260 Improve migration messages 2024-05-09 14:19:20 +02:00
Andre601 238049b58c Merge pull request 'Update dependency net.kyori:adventure-text-minimessage to v4.17.0' (#279) from renovate/dependency.adventure-text-minimessage into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/279
2024-05-09 12:16:19 +00:00
Andre601's Bot 34a701cbe9 Update dependency net.kyori:adventure-text-serializer-legacy to v4.17.0 2024-05-09 12:01:37 +00:00
Andre601's Bot bdf42b3ef1 Update dependency net.kyori:adventure-text-minimessage to v4.17.0 2024-05-09 12:01:32 +00:00
Andre601 7b82fa17d0 Merge pull request 'ServerListPlus migration support' (#276) from feature/slp-migrator into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/276
2024-05-08 15:28:19 +00:00
Andre601 05f1f285d0 Add SLP as softdependency to plugin configurations 2024-05-08 17:23:36 +02:00
Andre601 12813a4a00 Add migration guide for SLP to docs 2024-05-08 15:34:46 +02:00
Andre601 176b02ebe3 Remove unused files 2024-05-08 14:58:36 +02:00
Andre601 bd53bf7eb2 Bump version to 4.8.0-b1 2024-05-08 14:51:56 +02:00
Andre601 ae17d965e6 Merge remote-tracking branch 'origin/feature/slp-migrator' into feature/slp-migrator 2024-05-08 14:49:53 +02:00
Andre601 17b69fd38c Make single method to apply content to builders 2024-05-08 14:49:29 +02:00
Andre601 ee9c6f77ec Merge branch 'refs/heads/master' into feature/slp-migrator 2024-05-08 14:42:19 +02:00
Andre601 ddeb523154 Merge pull request 'Update dependency net.kyori:adventure-api to v4.17.0' (#278) from renovate/net.kyori-adventure-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/278
2024-05-08 12:41:18 +00:00
Andre601 04ec8e1927 Merge pull request 'Update dependency net.kyori:adventure-api to v4.17.0' (#277) from renovate/dependency.adventure-api into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/277
2024-05-08 12:41:07 +00:00
Andre601's Bot f3f3cc7927 Update dependency net.kyori:adventure-api to v4.17.0 2024-05-08 12:01:37 +00:00
Andre601's Bot c7dd3f5344 Update dependency net.kyori:adventure-api to v4.17.0 2024-05-08 12:01:31 +00:00
Andre601 19f534845f Merge branch 'master' into feature/slp-migrator 2024-05-07 23:43:46 +00:00
Andre601 3c3110a3f8 Change command output. 2024-05-08 01:38:48 +02:00
Andre601 2aa551090c Use the SLP Internal API for migration 2024-05-08 01:31:40 +02:00
Andre601 57861e435c Merge pull request 'Update dependency mkdocs-glightbox to v0.4.0' (#275) from renovate/mkdocs-glightbox-0.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/275
2024-05-07 12:05:11 +00:00
Andre601's Bot 205e1e065d Update dependency mkdocs-glightbox to v0.4.0 2024-05-07 12:01:58 +00:00
Andre601 79ee776167 Merge pull request 'Update dependency com.viaversion:viaversion-api to v4.10.1' (#274) from renovate/com.viaversion-viaversion-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/274
2024-05-06 12:03:26 +00:00
Andre601's Bot 19869084e5 Update dependency com.viaversion:viaversion-api to v4.10.1 2024-05-06 12:01:35 +00:00
Andre601 f1bd608fca Merge branch 'refs/heads/master' into feature/slp-migrator
# Conflicts:
#	.woodpecker/pr_preview.yml
#	bungeecord/src/main/java/ch/andre601/advancedserverlist/bungeecord/BungeeCordCore.java
#	requirements.txt
2024-05-05 22:59:22 +02:00
Andre601 2474e390f7 Update config.yml comments 2024-05-05 01:57:00 +02:00
Andre601 ef737d5566 Revert "First steps on an SLP migrator"
This reverts commit cda72b3b3a.
2024-05-05 00:02:47 +02:00
Andre601 9c64d3521e Remove dependencies.maven file 2024-05-05 00:02:41 +02:00
Andre601 c7c8636720 Use file-based library loading 2024-05-04 23:59:40 +02:00
Andre601 cda72b3b3a First steps on an SLP migrator 2024-05-04 23:57:40 +02:00
Andre601 04a1101045 Merge pull request 'Update dependency mkdocs-material to v9.5.21' (#272) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/272
2024-05-04 12:07:23 +00:00
Andre601 44e3e51bbc Fix missing repo 2024-05-04 12:04:54 +00:00
Andre601 40f2c44b5d Forgot publish_docs.yml 2024-05-04 14:01:27 +02:00
Andre601 16c26af04e Without the {} I guess... 2024-05-04 14:01:26 +02:00
Andre601 85aa30f82c Set git user and name globally 2024-05-04 14:01:26 +02:00
Andre601 0ad119b6e0 Manually re-write all files 2024-05-04 14:01:26 +02:00
Andre601 a612e2216b Revert changes to old file format 2024-05-04 14:01:25 +02:00
Andre601 2c0d3db9f4 This step contained spaces in name 2024-05-04 14:01:25 +02:00
Andre601's Bot 8de820747a Update dependency com.google.guava:guava to v33.2.0-jre 2024-05-04 14:01:25 +02:00
Andre601 6469893b15 Final test 2024-05-04 14:01:24 +02:00
Andre601 a46feb5e03 Maybe this? 2024-05-04 14:01:24 +02:00
Andre601 2e39683687 ...and finally here. 2024-05-04 14:01:23 +02:00
Andre601 78464ac222 Change here too 2024-05-04 14:01:23 +02:00
Andre601 92b12fd612 Try without spaces in name. 2024-05-04 14:01:23 +02:00
Andre601 5e90191aa4 Change workflow file structures. 2024-05-04 14:01:23 +02:00
Andre601 1b4ee54b73 Bump version 2024-05-04 14:01:22 +02:00
Andre601 409c007759 Remove the temp fix from CodebergReleaseFetcher 2024-05-04 14:01:22 +02:00
Andre601 49cd7410cf Use a library loader system 2024-05-04 14:01:22 +02:00
Andre601 978b21360e Use - instead of / 2024-05-04 14:01:21 +02:00
Andre601 0d1fbc15ce Add preview-domains file 2024-05-04 14:01:21 +02:00
Andre601 1cf3ba543d Maybe this works... 2024-05-04 14:01:20 +02:00
Andre601 358830cbfb Remove source command 2024-05-04 14:01:20 +02:00
Andre601 ea193d7bd3 Set target branch env using reusable 2024-05-04 14:01:20 +02:00
Andre601 8e59336833 fixing missing closing brace 2024-05-04 14:01:19 +02:00
Andre601 5083f0a3d2 Comment (Trigger workflow) 2024-05-04 14:01:19 +02:00
Andre601 d20fdd3086 Use preview repository for PR previews. 2024-05-04 14:01:19 +02:00
Andre601's Bot e005d80192 Update dependency ch.andre601:expressionparser to v1.4.2 2024-05-04 14:01:18 +02:00
Andre601 afd791b808 Update e-mail to noreply one by codeberg 2024-05-04 14:01:18 +02:00
Andre601 0acdcba09b Change e-mail to noreply one by codeberg 2024-05-04 14:01:18 +02:00
Andre601 872078ff05 Stupid typo. -_- 2024-05-04 14:01:17 +02:00
Andre601 4bfb1ec29b Apply workaround for broken Tags ENV variable 2024-05-04 14:01:17 +02:00
Andre601 97f073685e Update ExpressionParser 2024-05-04 14:01:16 +02:00
Andre601's Bot 08ab52d7f0 Update dependency mkdocs-material to v9.5.20 2024-05-04 14:01:16 +02:00
Andre601's Bot e7b7c78b11 Update dependency com.viaversion:viaversion-api to v4.10.0 2024-05-04 14:01:16 +02:00
Andre601's Bot 7df02868ad Update dependency mkdocs-material to v9.5.19 2024-05-04 14:01:15 +02:00
Andre601's Bot 063b5f90e9 Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.3 2024-05-04 14:01:15 +02:00
Andre601's Bot dd700f99e2 Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.1 2024-05-04 14:01:10 +02:00
Andre601's Bot 7b9f418b23 Update dependency mkdocs-material to v9.5.21 2024-05-04 12:01:08 +00:00
Andre601 fa163e0593 Forgot publish_docs.yml 2024-05-03 17:39:38 +02:00
Andre601 8ba86bec71 Without the {} I guess... 2024-05-03 17:38:43 +02:00
Andre601 971f404f20 Set git user and name globally 2024-05-03 17:34:46 +02:00
Andre601 f378b1e10a Manually re-write all files 2024-05-03 17:31:43 +02:00
Andre601 13a281ebf7 Revert changes to old file format 2024-05-03 16:53:12 +02:00
Andre601 e7f210739f This step contained spaces in name 2024-05-03 16:50:58 +02:00
Andre601 addca59c39 Merge pull request 'Update dependency com.google.guava:guava to v33.2.0-jre' (#271) from renovate/com.google.guava-guava-33.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/271
2024-05-03 12:17:55 +00:00
Andre601's Bot f93880a0f5 Update dependency com.google.guava:guava to v33.2.0-jre 2024-05-03 12:01:09 +00:00
Andre601 489e8b60aa Final test 2024-05-02 21:56:09 +00:00
Andre601 bf418d8a9a Maybe this? 2024-05-02 21:55:39 +00:00
Andre601 1e1f11cde9 ...and finally here. 2024-05-02 21:33:34 +00:00
Andre601 34179eb850 Change here too 2024-05-02 21:32:22 +00:00
Andre601 cfcd488d44 Try without spaces in name. 2024-05-02 21:28:23 +00:00
Andre601 a49b838b83 Change workflow file structures. 2024-05-02 23:17:31 +02:00
Andre601 fdeec1e97c Bump version 2024-05-02 21:07:37 +02:00
Andre601 39ba75410e Remove the temp fix from CodebergReleaseFetcher 2024-05-02 21:07:13 +02:00
Andre601 c20d6be447 Use a library loader system 2024-05-02 20:40:31 +02:00
Andre601 d2f7f256d3 Merge pull request 'Use preview repository for PR previews.' (#267) from feature/use-preview-repo into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/267
2024-05-02 12:08:34 +00:00
Andre601 fb6abf7161 Merge pull request 'Update dependency ch.andre601:expressionparser to v1.4.2' (#270) from renovate/ch.andre601-expressionparser-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/270
2024-05-02 12:04:02 +00:00
Andre601's Bot 445bdac8a7 Update dependency ch.andre601:expressionparser to v1.4.2 2024-05-02 12:01:26 +00:00
Andre601 7bdabf93b8 Update e-mail to noreply one by codeberg 2024-05-01 15:03:01 +00:00
Andre601 8d9c0549b7 Change e-mail to noreply one by codeberg 2024-05-01 15:02:25 +00:00
Andre601 4d94a4879b Stupid typo. -_- 2024-04-29 21:11:47 +02:00
Andre601 924a72c537 Apply workaround for broken Tags ENV variable 2024-04-29 21:08:05 +02:00
Andre601 75abdccd06 Update ExpressionParser 2024-04-29 20:46:26 +02:00
Andre601 bb4b92e37e First steps on an SLP migrator 2024-04-29 20:32:47 +02:00
Andre601 880616135f Use - instead of / 2024-04-29 12:55:28 +00:00
Andre601 be72744651 Merge pull request 'Update dependency mkdocs-material to v9.5.20' (#269) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/269
2024-04-29 12:09:31 +00:00
Andre601's Bot c43090bdd8 Update dependency mkdocs-material to v9.5.20 2024-04-29 12:01:16 +00:00
Andre601 50143c2374 Merge pull request 'Update dependency com.viaversion:viaversion-api to v4.10.0' (#268) from renovate/com.viaversion-viaversion-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/268
2024-04-28 12:32:05 +00:00
Andre601's Bot 951f1853fc Update dependency com.viaversion:viaversion-api to v4.10.0 2024-04-28 12:00:58 +00:00
Andre601 a69962dd86 Add preview-domains file 2024-04-27 15:26:03 +02:00
Andre601 29e0bf8476 Maybe this works... 2024-04-27 13:20:59 +00:00
Andre601 ee41a234e8 Remove source command 2024-04-27 13:18:57 +00:00
Andre601 c8cf01319a Set target branch env using reusable 2024-04-27 13:18:15 +00:00
Andre601 3f4da7884f fixing missing closing brace 2024-04-27 13:11:15 +00:00
Andre601 965df44783 Comment (Trigger workflow) 2024-04-27 13:10:22 +00:00
Andre601 b9b8f8b36d Use preview repository for PR previews. 2024-04-27 13:05:07 +00:00
Andre601 d293cdfb39 Merge pull request 'Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.3' (#266) from renovate/org.apache.maven.plugins-maven-shade-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/266
2024-04-27 12:41:01 +00:00
Andre601 e3dc3ea548 Merge branch 'master' into renovate/org.apache.maven.plugins-maven-shade-plugin-3.x 2024-04-27 12:40:49 +00:00
Andre601 3037d3a742 Merge pull request 'Update dependency mkdocs-material to v9.5.19' (#265) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/265
2024-04-27 12:40:24 +00:00
Andre601's Bot 2230800deb Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.3 2024-04-27 12:35:30 +00:00
Andre601's Bot 1f0b8f783f Update dependency mkdocs-material to v9.5.19 2024-04-27 12:35:23 +00:00
Andre601 da8d4e93ab Merge pull request 'Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.1' (#264) from renovate/org.apache.maven.plugins-maven-jar-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/264
2024-04-20 12:10:35 +00:00
Andre601's Bot aa38567232 Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.1 2024-04-20 12:01:15 +00:00
Andre601 b6757b9622 Add PremiumVanishAPI to jitpack in packageRules 2024-04-18 12:05:17 +00:00
Andre601 ca288fdf75 Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.6' (#263) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/263
2024-04-18 12:03:15 +00:00
Andre601's Bot 8b74c29bbe Update dependency ch.qos.logback:logback-classic to v1.5.6 2024-04-18 12:01:14 +00:00
Andre601 5aae4a17ef Update title for Discord icon 2024-04-18 11:57:41 +00:00
Andre601 778212d48a Improve description of Discord Server 2024-04-17 22:46:26 +02:00
Andre601 8d126436ea Remove api_support.yml file 2024-04-17 22:26:42 +02:00
Andre601 ec40db1b26 Clean up repository files a bit 2024-04-17 22:19:17 +02:00
Andre601 263c197845 Update ExpressionParserTests 2024-04-17 22:16:04 +02:00
Andre601 7bdc14aa30 Merge pull request 'Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.0' (#262) from renovate/org.apache.maven.plugins-maven-jar-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/262
2024-04-16 12:26:38 +00:00
Andre601 7ba5209222 Merge pull request 'Update dependency mkdocs-material to v9.5.18' (#261) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/261
2024-04-16 12:26:13 +00:00
Andre601's Bot 71e62e0bae Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.0 2024-04-16 12:06:14 +00:00
Andre601's Bot 4a8029ec31 Update dependency mkdocs-material to v9.5.18 2024-04-16 12:06:07 +00:00
Andre601 382038b9a4 Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.5' (#259) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/259
2024-04-15 12:52:28 +00:00
Andre601 7f59851a3b Update ExpressionParser and ProfileConditionParser 2024-04-15 14:51:55 +02:00
Andre601's Bot 0ebcc449f8 Update dependency ch.qos.logback:logback-classic to v1.5.5 2024-04-15 12:05:32 +00:00
Andre601 323614d8c5 Only change cb_token. 2024-04-13 12:16:05 +00:00
Andre601 264dedca34 Remove useless secrets option 2024-04-13 12:13:29 +00:00
Andre601 ce26decb7d Use environment instead of secret 2024-04-13 12:08:50 +00:00
Andre601 37085e82f0 Merge pull request 'Add message on join for new versions' (#258) from feature/update-message-on-join into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/258
2024-04-13 11:58:23 +00:00
Andre601 041430e842 Bump version 2024-04-13 13:57:42 +02:00
Andre601 6762cbc245 Make delay for VersionCache 5 minutes (300k ms) 2024-04-12 22:45:18 +02:00
Andre601 917d3640f0 Add message on join for new versions 2024-04-12 22:37:10 +02:00
Andre601 0cece71f37 Include tag in release webhook message. 2024-04-10 17:30:58 +02:00
Andre601 d9c9f30cea Update invites to M.O.S.S. Discord. 2024-04-10 17:27:11 +02:00
Andre601 dcb119df96 Fix ${player protocol} using the protocol of the proxy. 2024-04-10 14:31:43 +02:00
Andre601 78ae7fbcb2 Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.4' (#257) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/257
2024-04-09 23:57:48 +00:00
Andre601's Bot 1545aad32d Update dependency ch.qos.logback:logback-classic to v1.5.4 2024-04-09 12:10:52 +00:00
Andre601 035d485561 Forgot a closing double quote... 2024-04-08 00:48:00 +00:00
Andre601 f34a1ad2e4 Add gap 2024-04-08 00:44:56 +00:00
Andre601 5ceef81927 Add basic condition example 2024-04-08 00:41:24 +00:00
Andre601 6315f74312 Fix wrong link 2024-04-06 23:43:56 +00:00
Andre601 086a45593b Put negate example into admonition box 2024-04-05 22:37:44 +00:00
Andre601 1095166155 Remove unused placeholder 2024-04-04 01:03:52 +00:00
Andre601 bf89a7cb12 Add comment on failure action 2024-04-02 22:56:40 +00:00
Andre601 729b671c5a Add <filename> 2024-04-02 15:50:13 +00:00
Andre601 380791cd45 Merge pull request 'Update dependency mkdocs-material to v9.5.17' (#256) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/256
2024-04-02 12:09:37 +00:00
Andre601's Bot ca80083414 Update dependency mkdocs-material to v9.5.17 2024-04-02 12:01:00 +00:00
Andre601 ee7fa16514 Merge pull request 'Update dependency mkdocs-material to v9.5.16' (#255) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/255
2024-03-31 12:03:36 +00:00
Andre601's Bot c86a3d4101 Update dependency mkdocs-material to v9.5.16 2024-03-31 12:00:58 +00:00
Andre601 6fd6a8fe38 Re-add Hangar badge 2024-03-30 12:14:57 +00:00
Andre601 b05b38e0e8 Merge pull request 'Update actions/configure-pages action to v5' (#254) from renovate/actions-configure-pages-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/254
2024-03-30 12:02:18 +00:00
Andre601's Bot d55298d61b Update actions/configure-pages action to v5 2024-03-30 12:01:09 +00:00
Andre601 37ccf7176c Fix wrong relative link 2024-03-29 00:44:59 +00:00
Andre601 868c93ac09 Update api index about events 2024-03-29 00:42:45 +00:00
Andre601 f927e836f5 Merge pull request 'Update dependency mkdocs-material to v9.5.15' (#253) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/253
2024-03-27 22:49:40 +00:00
Andre601's Bot 2172628985 Update dependency mkdocs-material to v9.5.15 2024-03-27 22:46:32 +00:00
Andre601 628b1763da Merge pull request 'Update docs' (#252) from docs/update-docs into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/252
2024-03-27 15:58:39 +00:00
Andre601 bbe5fea132 Update docs 2024-03-27 16:51:01 +01:00
Andre601 8b555a8f53 .woodpecker/publish_assets.yml aktualisiert 2024-03-27 15:30:53 +00:00
Andre601 a5ca6fb53e Bump version 2024-03-27 16:19:09 +01:00
Andre601 164a4823e8 Fix wrong regex for LibertyBansPlaceholders and limit to 2 results 2024-03-27 16:18:27 +01:00
Andre601 352191695a Merge pull request 'Remove dependencies section' (#251) from docs/remove-dependencies-section into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/251
2024-03-19 20:49:51 +00:00
Andre601 b2235e1d8b Fix formatting 2024-03-19 20:45:47 +00:00
Andre601 324b6d6f82 Try without remote branches 2024-03-19 20:39:29 +00:00
Andre601 fd6e2e736f Merge branch 'master' into docs/remove-dependencies-section 2024-03-19 20:34:26 +00:00
Andre601 efd5164b8e Add attr_list 2024-03-19 20:32:10 +00:00
Andre601 cdb86ae83f Use branch option for git clone 2024-03-19 20:30:11 +00:00
Andre601 90c02da02e Update default.yml and config.yml examples 2024-03-19 20:19:28 +00:00
Andre601 53d56c5891 Different wording 2024-03-19 20:16:07 +00:00
Andre601 7dd02fa0e5 Try without branch option 2024-03-19 20:15:06 +00:00
Andre601 e02b944181 revert 299eff1b0d
revert Try without branch
2024-03-19 20:14:42 +00:00
Andre601 299eff1b0d Try without branch 2024-03-19 20:14:10 +00:00
Andre601 aa24ab336b Remove .pages.yml file 2024-03-19 20:13:39 +00:00
Andre601 a8b9e69e30 Remove dependencies section 2024-03-19 20:11:42 +00:00
Andre601 065c9abf9c Try with just the branch option. 2024-03-19 20:09:49 +00:00
Andre601 bdc9668b29 Merge pull request 'Fix link' (#250) from docs/fix-link into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/250
2024-03-19 20:03:49 +00:00
Andre601 7d1abdd2b2 Fix link 2024-03-19 20:03:28 +00:00
Andre601 667c642708 Merge pull request 'Add "Available on Codeberg" badge' (#248) from docs/available-on-codeberg-badge into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/248
2024-03-19 19:56:12 +00:00
Andre601 79b13ceab6 Merge branch 'master' into docs/available-on-codeberg-badge 2024-03-19 19:55:45 +00:00
Andre601 169f560b2c Add mastodon posting 2024-03-19 15:26:56 +00:00
Andre601 7e8c41c27a Merge pull request 'Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.13.0' (#249) from renovate/org.apache.maven.plugins-maven-compiler-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/249
2024-03-19 12:03:54 +00:00
Andre601's Bot 973966c844 Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.13.0 2024-03-19 12:01:18 +00:00
Andre601 eee90cc02f Remove not needed content 2024-03-18 22:10:33 +00:00
Andre601 ecf052b955 Remove unused setting 2024-03-18 22:09:43 +00:00
Andre601 a791c86df0 Merge branch 'master' into docs/available-on-codeberg-badge 2024-03-18 22:06:38 +00:00
Andre601 63d0b0ac62 Fix wrong workflow file target 2024-03-18 22:06:26 +00:00
Andre601 c46bc37818 Merge branch 'master' into docs/available-on-codeberg-badge 2024-03-18 22:05:13 +00:00
Andre601 268d5b84c9 Add quotes 2024-03-18 22:05:05 +00:00
Andre601 0c63abfac8 Merge branch 'master' into docs/available-on-codeberg-badge 2024-03-18 22:02:59 +00:00
Andre601 35ca151424 Set default branch directly 2024-03-18 22:02:45 +00:00
Andre601 e28800f72f Add evaluate when check 2024-03-18 21:43:51 +00:00
Andre601 8232357aba Add "Available on Codeberg" badge 2024-03-18 21:35:28 +00:00
Andre601 eae7f1117c Merge pull request 'Create PR-preview' (#247) from feature/pr-preview into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/247
2024-03-18 21:26:11 +00:00
Andre601 d25053b285 Add switch and set-branches git commands 2024-03-18 21:25:54 +00:00
Andre601 57273bd265 Use bot token for docs publish 2024-03-18 20:44:11 +00:00
Andre601 9cf694a7d6 Use bot token 2024-03-18 20:43:38 +00:00
Andre601 5bc0c7b843 Create PR-preview 2024-03-18 20:35:45 +00:00
Andre601 1c48fd61bc Fix wrong target URL 2024-03-18 19:54:15 +00:00
Andre601 8e622b4038 Add woodpecker file to CI run 2024-03-18 19:51:37 +00:00
Andre601 35e37bca2e Move site to dedicated repository 2024-03-18 19:50:47 +00:00
Andre601 cdb508994f Improve default.yml file 2024-03-18 15:53:20 +01:00
Andre601 1113c41379 Merge pull request 'Update dependency mkdocs-material to v9.5.14' (#246) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/246
2024-03-18 12:05:24 +00:00
Andre601's Renovate Bot d186ca82a2 Update dependency mkdocs-material to v9.5.14 2024-03-18 12:01:09 +00:00
Andre601 5cda9e819b Add missing changelog entry 2024-03-17 01:30:19 +00:00
Andre601 fe5a73440b Update API Javadocs URL 2024-03-16 21:39:01 +00:00
Andre601 a91e839f8c Update API reference 2024-03-14 14:53:36 +01:00
Andre601 d4668e0e76 Add PostServerListSetEvent 2024-03-14 14:08:17 +01:00
Andre601 305f3452c4 Merge pull request 'Update dependency com.google.guava:guava to v33.1.0-jre' (#245) from renovate/com.google.guava-guava-33.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/245
2024-03-14 12:02:24 +00:00
Andre601's Renovate Bot fec3361fd7 Update dependency com.google.guava:guava to v33.1.0-jre 2024-03-14 12:01:22 +00:00
Andre601 f0861ffa6a Merge pull request 'Allow handling of options while Maintenance is active' (#244) from feature/configure-maintenance-support into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/244
2024-03-13 23:15:49 +00:00
Andre601 cfca3f72dc Fix ambigous method call getBoolean 2024-03-13 22:04:17 +01:00
Andre601 aca83e8350 Update priorities and bump version 2024-03-13 20:44:08 +01:00
Andre601 8383c8b97f Allow handling of options while Maintenance is active 2024-03-13 20:33:41 +01:00
Andre601 3d1ddaa782 Update Nav 2024-03-13 16:06:07 +01:00
Andre601 1d615e252f Update requirements.txt 2024-03-13 02:51:02 +01:00
Andre601 310e72d048 Don't use awesome-pages 2024-03-13 02:50:31 +01:00
Andre601 2754bf13aa Allow support for vanished players 2024-03-10 14:01:10 +01:00
Andre601 9ff5fcdaa7 Unify Placeholder parsing system. 2024-03-07 22:01:18 +01:00
Andre601 0ba7ed6ece Merge pull request 'Update dependency com.viaversion:viaversion-api to v4.9.3' (#241) from renovate/com.viaversion-viaversion-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/241
2024-03-06 12:46:39 +00:00
Andre601 2d8c774401 Merge pull request 'Update dependency mkdocs-material to v9.5.13' (#242) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/242
2024-03-06 12:46:23 +00:00
Andre601's Renovate Bot f68be63f64 Update dependency mkdocs-material to v9.5.13 2024-03-06 12:14:43 +00:00
Andre601's Renovate Bot 2695b393d8 Update dependency com.viaversion:viaversion-api to v4.9.3 2024-03-06 12:14:35 +00:00
Andre601 55821d2edf Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.3' (#240) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/240
2024-03-05 12:02:36 +00:00
Andre601's Renovate Bot b64e32503e Update dependency ch.qos.logback:logback-classic to v1.5.3 2024-03-05 12:01:13 +00:00
Andre601 c5ab9b118f Use code highlighting for expression examples 2024-03-05 02:11:01 +01:00
Andre601 6cc54349b5 Fix typo with fontawesome 2024-03-05 01:02:47 +00:00
Andre601 98d2de975e Add divider lines to optional dependencies 2024-03-05 00:59:59 +00:00
Andre601 6d1c118660 Remove unusued project.build.commit tag 2024-03-03 22:14:34 +01:00
Andre601 49e5b195ec Update way of reporting condition errors 2024-03-03 22:14:11 +01:00
Andre601 c92611e7f8 Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.2' (#238) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/238
2024-03-03 13:46:52 +00:00
Andre601's Renovate Bot 233414c45c Update dependency ch.qos.logback:logback-classic to v1.5.2 2024-03-03 12:01:19 +00:00
Andre601 c0629e10bc Add BanPlugins Addon to optional dependencies 2024-03-03 02:00:17 +00:00
Andre601 621eb7c489 Update API reference for ProfileEntry.Builder + changelog 2024-03-03 00:50:16 +01:00
Andre601 38e16f1d4b Bump version to 4.3.0 2024-03-03 00:14:42 +01:00
Andre601 2e61531079 Merge pull request 'Add LibertyBans' (#233) from feature/libertybans-addon into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/233
2024-03-02 23:12:05 +00:00
Andre601 5cf295d4c5 Merge branch 'master' into feature/libertybans-addon 2024-03-02 23:08:55 +00:00
Andre601 24d5865a57 Also add asl parent 2024-03-03 00:08:17 +01:00
Andre601 03c5e7d9d0 Add ExpressionParser to matchPackageNames 2024-03-03 00:08:17 +01:00
Andre601's Renovate Bot 7874fcf265 Update api.version to v3.2.1 2024-03-03 00:08:13 +01:00
Andre601 3e9070ebf9 Fix renovate.json 2024-03-03 00:06:12 +01:00
Andre601 478fa88a97 Also add asl parent 2024-03-02 12:10:33 +00:00
Andre601 346f94decc Add ExpressionParser to matchPackageNames 2024-03-02 12:09:06 +00:00
Andre601 f5e8a7e460 Merge pull request 'Update api.version to v3.2.1' (#237) from renovate/api.version into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/237
2024-03-02 12:06:58 +00:00
Andre601's Renovate Bot 3cb470a086 Update api.version to v3.2.1 2024-03-02 12:06:01 +00:00
Andre601 348ecce315 Fix renovate.json 2024-03-02 12:05:24 +00:00
Andre601 78463bca4f Merge branch 'master' into feature/libertybans-addon 2024-03-01 19:17:49 +00:00
Andre601 a6bde40f30 Update registry URL for asl API 2024-03-01 16:39:29 +00:00
Andre601 45fa7b5d69 Fix banExpiration placeholder using muteExpiration(player). 2024-03-01 16:18:34 +01:00
Andre601 1f52ff39d1 Update getting started guide 2024-02-29 16:06:42 +00:00
Andre601 bc66d925ff Merge pull request 'Update dependency mkdocs-material to v9.5.12' (#235) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/235
2024-02-29 12:25:20 +00:00
Andre601 41f8f6b29d Merge branch 'master' into renovate/mkdocs-material-9.x 2024-02-29 12:25:07 +00:00
Andre601 e032b2cc7f Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.1' (#234) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/234
2024-02-29 12:24:51 +00:00
Andre601's Renovate Bot 7c6d4a3840 Update dependency mkdocs-material to v9.5.12 2024-02-29 12:01:25 +00:00
Andre601's Renovate Bot 2f2095237d Update dependency ch.qos.logback:logback-classic to v1.5.1 2024-02-29 12:01:20 +00:00
Andre601 2a20af1f9a Update Javadoc link 2024-02-29 11:45:05 +01:00
Andre601 c424c5abd5 Use custom admonition for files 2024-02-28 15:55:31 +01:00
Andre601 101fc593d2 Update files 2024-02-28 15:50:41 +01:00
Andre601 cb9e65105e Add LibertyBans placeholder docs 2024-02-26 23:17:42 +01:00
Andre601 9b95bb1222 docs/api/index.md aktualisiert 2024-02-26 19:41:17 +00:00
Andre601 2b01ed9725 Use Collections.max and Update PlatformInfo 2024-02-26 20:29:45 +01:00
Andre601 9b77a1274d Update Link for api/source redirect 2024-02-26 17:49:01 +01:00
Andre601 18d5cca185 Update Repository URL for API 2024-02-26 17:48:32 +01:00
Andre601 d5b604c1d0 Add LibertyBans 2024-02-26 17:18:00 +01:00
Andre601 e9b4ccbb93 Merge pull request 'Update dependency mkdocs-material to v9.5.11' (#232) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/232
2024-02-24 12:03:07 +00:00
Andre601's Renovate Bot a14f8c961f Update dependency mkdocs-material to v9.5.11 2024-02-24 12:01:08 +00:00
Andre601 ba311f42c4 Use separated ExpressionParser system 2024-02-23 19:50:27 +01:00
Andre601 1b5379d54b Merge pull request 'Update dependency club.minnced:discord-webhooks to v0.8.4' (#231) from renovate/club.minnced-discord-webhooks-0.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/231
2024-02-23 12:02:14 +00:00
Andre601's Renovate Bot 03a1908ca6 Update dependency club.minnced:discord-webhooks to v0.8.4 2024-02-23 12:01:13 +00:00
Andre601 f9574d2f83 Add DISCORD_WEBHOOK_URL env variable to workflow 2024-02-22 13:42:41 +01:00
Andre601 7e45439dfe Merge pull request 'Make better local favicon handling' (#230) from feature/better-local-favicon-handling into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/230
2024-02-22 12:41:03 +00:00
Andre601 2a8b4ed640 Optimize Imports 2024-02-22 13:32:29 +01:00
Andre601 86c053e445 Remove unused createFavicon method in GenericEventWrapper 2024-02-22 13:29:39 +01:00
Andre601 7eba04bb9a Make better local favicon handling 2024-02-22 13:27:27 +01:00
Andre601 b4ac677f67 Merge pull request 'Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.2' (#228) from renovate/org.apache.maven.plugins-maven-shade-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/228
2024-02-21 12:15:13 +00:00
Andre601 989d44cc5e Merge pull request 'Update dependency net.kyori:adventure-text-serializer-legacy to v4.16.0' (#229) from renovate/net.kyori-adventure-text-serializer-legacy-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/229
2024-02-21 12:15:00 +00:00
Andre601's Renovate Bot 9821875e7a Update dependency net.kyori:adventure-text-serializer-legacy to v4.16.0 2024-02-21 12:01:15 +00:00
Andre601's Renovate Bot 07e3b6702b Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.2 2024-02-21 12:01:09 +00:00
Andre601 31889fbd9c Merge pull request 'Update dependency net.kyori:adventure-text-minimessage to v4.16.0' (#227) from renovate/net.kyori-adventure-text-minimessage-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/227
2024-02-20 12:12:40 +00:00
Andre601 87a089a0fa Merge pull request 'Update dependency net.kyori:adventure-api to v4.16.0' (#226) from renovate/net.kyori-adventure-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/226
2024-02-20 12:12:14 +00:00
Andre601 88b91e8859 Add AdvancedBan to special registry lookup 2024-02-20 12:09:55 +00:00
Andre601's Renovate Bot f8097e3c72 Update dependency net.kyori:adventure-text-minimessage to v4.16.0 2024-02-20 12:01:39 +00:00
Andre601's Renovate Bot e237c990d8 Update dependency net.kyori:adventure-api to v4.16.0 2024-02-20 12:01:33 +00:00
Andre601 21c0ba975c Merge pull request 'Update dependency mkdocs-material to v9.5.10' (#225) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/225
2024-02-19 12:02:37 +00:00
Andre601's Renovate Bot 642ce922c3 Update dependency mkdocs-material to v9.5.10 2024-02-19 12:01:15 +00:00
Andre601 6e5466aacf Use relativePath for pom.xml resolving 2024-02-18 23:47:09 +01:00
Andre601 e6635cd844 Fix wrong add-on name 2024-02-18 23:37:38 +01:00
Andre601 229ab60c57 Add ExpressionsWarnHelper for (hopefully) better warnings. 2024-02-18 23:23:06 +01:00
Andre601 483daee999 Merge pull request 'v4.0.0: AdvancedBan Addon' (#222) from feature/advanced-ban-addon into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/222
2024-02-18 20:45:42 +00:00
Andre601 31ffcd7f7b Add placeholders for mute and ban expiration dates 2024-02-18 17:44:16 +01:00
Andre601 e5139cc00d Slightly better wording for loaded placeholder sets 2024-02-18 15:35:55 +01:00
Andre601 9b1b95b27a Merge branch 'master' into feature/advanced-ban-addon 2024-02-18 14:33:37 +00:00
Andre601 88d3ceeaf3 Use PlatformInfo to store add-ons paths 2024-02-18 15:33:11 +01:00
Andre601 f74f2f337c Only supports 1.20+ on Paper 2024-02-18 15:22:53 +01:00
Andre601 87b35f240e Make the addon more generic and work on Paper too 2024-02-18 15:20:58 +01:00
Andre601 fc861ea304 Merge pull request 'Update api.version to v3.2.0' (#224) from renovate/api.version into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/224
2024-02-18 12:29:57 +00:00
Andre601's Renovate Bot 927971ca12 Update api.version to v3.2.0 2024-02-18 12:01:52 +00:00
Andre601 0ecb8383e3 Make the AdvancedBan Addon actually work. 2024-02-17 16:56:04 +01:00
Andre601 9c3b2220d5 Add some debug messages 2024-02-17 14:13:16 +01:00
Andre601 46e15441fd Merge pull request 'Update dependency ch.qos.logback:logback-classic to v1.5.0' (#223) from renovate/ch.qos.logback-logback-classic-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/223
2024-02-17 12:09:19 +00:00
Andre601's Renovate Bot 2d2a1ca805 Update dependency ch.qos.logback:logback-classic to v1.5.0 2024-02-17 12:01:07 +00:00
Andre601 c577264e1d Update documentation 2024-02-16 11:13:50 +01:00
Andre601 27c3972ab0 Bump to v4.0.0 and remove expressions 2024-02-16 11:03:48 +01:00
Andre601 e4c90730ba Add AdvancedBan Addon 2024-02-16 10:51:35 +01:00
Andre601 0694e08399 Remove unused import 2024-02-15 18:18:08 +01:00
Andre601 2fefa966dd Improve formatting page 2024-02-14 20:58:46 +01:00
Andre601 a57cf3df17 Update outdated info in get-started 2024-02-13 20:55:41 +00:00
Andre601 1ae7260cf3 Update Hangar status 2024-02-13 20:44:30 +00:00
Andre601 8459eee57d Fix wrong Modrinth ID. 2024-02-13 21:19:38 +01:00
Andre601 f5cebf42ab Change ~= to ~= 2024-02-13 21:05:52 +01:00
Andre601 731bdeba7d Change way of applying dependencies in ModrinthVersionUploader 2024-02-13 17:31:45 +01:00
Andre601 d14cda243a Bump mkdocs-material to 9.5.9 2024-02-10 14:23:29 +00:00
Andre601 0a98aad138 Use hook to remove backslash from | 2024-02-09 16:00:52 +01:00
Andre601 1249a08264 Make sure Anonymous is in double quotes. 2024-02-09 01:36:15 +00:00
Andre601 c0414a5962 Actually, starts with operator is better 2024-02-09 01:34:50 +00:00
Andre601 9cc4d4bb36 Add example for contains expression 2024-02-09 01:33:51 +00:00
Andre601 338358a2ab Why did it remove magiclink? 2024-02-09 01:23:41 +00:00
Andre601 805ba83bb6 fix typos and improve readme 2024-02-08 00:30:21 +00:00
Andre601 0f646a8f8d Merge pull request 'Update dependency mkdocs-material to v9.5.8' (#220) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/220
2024-02-07 12:31:20 +00:00
Andre601's Renovate Bot 2519f09f6f Update dependency mkdocs-material to v9.5.8 2024-02-07 12:01:04 +00:00
Andre601 60bca9e3d7 Redo getting started guide and migration page 2024-02-07 01:41:08 +01:00
Andre601 da8f72fc50 Update mkdocs.yml... I think 2024-02-07 01:06:06 +01:00
Andre601 c42d4b8967 Add operand examples and open original in new tab 2024-02-05 12:46:30 +00:00
Andre601 0110854ae4 Fix some typo 2024-02-04 19:20:01 +00:00
Andre601 d6d5952cbc Merge pull request 'Update dependency org.junit.jupiter:junit-jupiter-engine to v5.10.2' (#219) from renovate/org.junit.jupiter-junit-jupiter-engine-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/219
2024-02-04 12:54:07 +00:00
Andre601's Renovate Bot f9d961cae7 Update dependency org.junit.jupiter:junit-jupiter-engine to v5.10.2 2024-02-04 12:01:05 +00:00
Andre601 a387feea23 Fix wrong operand for contains in docs 2024-02-03 17:39:51 +01:00
Andre601 359c58163b Only add ViaVersion on paper platform. 2024-02-03 17:34:55 +01:00
Andre601 0892f5cd1d Use <_ for contains instead of <- 2024-02-03 17:21:54 +01:00
Andre601 452a7e6dcf Merge pull request 'Update dependency mkdocs-material to v9.5.7' (#218) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/218
2024-02-03 12:02:21 +00:00
Andre601's Renovate Bot 162dd10a73 Update dependency mkdocs-material to v9.5.7 2024-02-03 12:01:15 +00:00
Andre601 35120c5364 Bump version to 7.0.0 2024-01-31 21:42:24 +01:00
Andre601 6c828171d2 Add new operands to use 2024-01-31 21:41:22 +01:00
Andre601 dcc51f8458 [Docs] Improve profiles page 2024-01-30 17:32:10 +01:00
Andre601 1287ca62fe Fix platform for ${server host} 2024-01-29 23:24:18 +00:00
Andre601 1ff439fa95 Use Java's HttpClient for update checks 2024-01-29 16:37:49 +01:00
Andre601 ed0f832b2f Merge pull request 'Update dependency mkdocs-material to v9.5.6' (#217) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/217
2024-01-28 12:02:57 +00:00
Andre601's Renovate Bot b8e6b2acc6 Update dependency mkdocs-material to v9.5.6 2024-01-28 12:01:18 +00:00
Andre601 fba32c91c5 Add page about expressions 2024-01-28 00:20:52 +01:00
Andre601 6505ded12b Use assertEquals(...) for testing 2024-01-27 23:25:17 +01:00
Andre601 53088affcb docs/profiles/index.md aktualisiert 2024-01-27 22:23:00 +00:00
Andre601 9c030764fa Merge pull request 'Update dependency mkdocs-glightbox to v0.3.7' (#215) from renovate/mkdocs-glightbox-0.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/215
2024-01-25 12:06:08 +00:00
Andre601 d5d58f1eea Merge branch 'master' into renovate/mkdocs-glightbox-0.x 2024-01-25 12:05:53 +00:00
Andre601 7181092821 Merge pull request 'Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.3.1' (#216) from renovate/org.apache.httpcomponents.client5-httpclient5-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/216
2024-01-25 12:05:37 +00:00
Andre601's Renovate Bot fc5ee4f242 Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.3.1 2024-01-25 12:01:04 +00:00
Andre601's Renovate Bot 6e74c4fb14 Update dependency mkdocs-glightbox to v0.3.7 2024-01-25 12:00:59 +00:00
Andre601 f6a27342e6 Merge pull request 'Update dependency mkdocs-material to v9.5.5' (#214) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/214
2024-01-24 12:17:57 +00:00
Andre601's Renovate Bot 38b50df2c9 Update dependency mkdocs-material to v9.5.5 2024-01-24 12:00:49 +00:00
Andre601 db93816e55 Remove configurate relocation in Velocity 2024-01-23 15:40:49 +01:00
Andre601 244c2440fc Add migration for pre 3.7.0 files 2024-01-20 22:27:43 +01:00
Andre601 8e2c644669 Merge pull request 'Update dependency org.junit.jupiter:junit-jupiter-engine to v5.10.1' (#213) from renovate/org.junit.jupiter-junit-jupiter-engine-5.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/213
2024-01-20 12:04:27 +00:00
Andre601 a68809ab31 Merge pull request 'Update dependency net.md-5:bungeecord-api to v1.20-R0.2' (#212) from renovate/net.md-5-bungeecord-api-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/212
2024-01-20 12:03:07 +00:00
Andre601's Renovate Bot 4b4fd80abe Update dependency org.junit.jupiter:junit-jupiter-engine to v5.10.1 2024-01-20 12:01:07 +00:00
Andre601's Renovate Bot 48ea128267 Update dependency net.md-5:bungeecord-api to v1.20-R0.2 2024-01-20 12:01:00 +00:00
Andre601 68e5795618 Link to new condition option 2024-01-19 15:37:27 +00:00
Andre601 1aa20e4196 Bump version to 3.7.0-b1 2024-01-19 16:10:56 +01:00
Andre601 6db25c8f9c Merge pull request 'Use BungeeTabListPlus inspired Condition system' (#209) from feature/use-btlp-condition-system into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/209
2024-01-19 15:06:30 +00:00
Andre601 0ef3db752d Improve docs 2024-01-19 16:05:54 +01:00
Andre601 1a26f5ad34 Merge branch 'master' into feature/use-btlp-condition-system 2024-01-19 14:51:10 +00:00
Andre601 17a5574be7 Fix placeholder issue (I hope) 2024-01-18 22:33:36 +01:00
Andre601 c7bfb8a736 Update examples and bump version 2024-01-18 14:29:54 +01:00
Andre601 7a756c3b98 Merge pull request 'Update actions/cache action to v4' (#211) from renovate/actions-cache-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/211
2024-01-18 12:09:07 +00:00
Andre601's Renovate Bot 1539e1c3c0 Update actions/cache action to v4 2024-01-18 12:01:20 +00:00
Andre601 a86872c021 Remove unused applyStringToStringFunction 2024-01-17 16:53:07 +01:00
Andre601 7d12499f39 Update docs and add basic tests 2024-01-17 16:48:35 +01:00
Andre601 455434b5f3 Merge pull request 'Update dependency net.william278:papiproxybridge to v1.5' (#210) from renovate/net.william278-papiproxybridge-1.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/210
2024-01-17 12:02:54 +00:00
Andre601's Renovate Bot b66251ab20 Update dependency net.william278:papiproxybridge to v1.5 2024-01-17 12:01:18 +00:00
Andre601 4a1dfa5cb4 Use dedicated Template class for errors. 2024-01-16 22:58:06 +01:00
Andre601 1efd65e16c Merge branch 'master' into feature/use-btlp-condition-system 2024-01-16 21:48:26 +00:00
Andre601 908da9cd32 Add some logging messages 2024-01-16 22:47:53 +01:00
Andre601 e8a30c6ef7 Use BungeeTabListPlus inspired Condition system 2024-01-16 22:23:24 +01:00
Andre601 df164c104f Merge pull request 'Update dependency mkdocs-material to v9.5.4' (#208) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/208
2024-01-15 12:02:23 +00:00
Andre601's Renovate Bot acdf6f6e9a Update dependency mkdocs-material to v9.5.4 2024-01-15 12:01:07 +00:00
Andre601 f52a63a8f1 Merge pull request 'Update dependency mkdocs-glightbox to v0.3.6' (#207) from renovate/mkdocs-glightbox-0.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/207
2023-12-31 14:14:03 +00:00
Andre601's Renovate Bot 6a92cb3a16 Update dependency mkdocs-glightbox to v0.3.6 2023-12-31 12:01:29 +00:00
Andre601 1175451753 Merge pull request 'Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.12.1' (#206) from renovate/org.apache.maven.plugins-maven-compiler-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/206
2023-12-25 13:39:01 +00:00
Andre601's Renovate Bot 5c4130411b Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.12.1 2023-12-25 12:02:04 +00:00
Andre601 05727eeec5 Merge pull request 'Update dependency mkdocs-material to v9.5.3' (#205) from renovate/mkdocs-material-9.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/205
2023-12-24 13:02:23 +00:00
Andre601's Renovate Bot 10af949abc Update dependency mkdocs-material to v9.5.3 2023-12-24 12:01:33 +00:00
Andre601 9851347e74 Merge pull request 'Update dependency net.kyori:adventure-platform-bungeecord to v4.3.2' (#204) from renovate/net.kyori-adventure-platform-bungeecord-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/204
2023-12-22 12:06:31 +00:00
Andre601's Renovate Bot c3e01c8b9c Update dependency net.kyori:adventure-platform-bungeecord to v4.3.2 2023-12-22 12:01:07 +00:00
Andre601 a646d9e998 Merge pull request 'Update dependency com.google.guava:guava to v33' (#203) from renovate/com.google.guava-guava-33.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/203
2023-12-21 12:06:31 +00:00
Andre601's Renovate Bot 3c50a30d4a Update dependency com.google.guava:guava to v33 2023-12-21 12:01:11 +00:00
Andre601 4328ad6b44 Merge pull request 'Update actions/upload-pages-artifact action to v3' (#202) from renovate/actions-upload-pages-artifact-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/202
2023-12-20 12:18:17 +00:00
Andre601 34b0555508 Merge pull request 'Update actions/deploy-pages action to v4' (#201) from renovate/actions-deploy-pages-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/201
2023-12-20 12:18:04 +00:00
Andre601's Renovate Bot c92cd0058b Update actions/upload-pages-artifact action to v3 2023-12-20 12:01:05 +00:00
Andre601's Renovate Bot 2cfe8b8a27 Update actions/deploy-pages action to v4 2023-12-20 12:01:01 +00:00
Andre601 6530fed704 Merge pull request 'Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.12.0' (#200) from renovate/org.apache.maven.plugins-maven-compiler-plugin-3.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/200
2023-12-19 12:05:46 +00:00
Andre601 7efb203e7b Merge branch 'master' into renovate/org.apache.maven.plugins-maven-compiler-plugin-3.x 2023-12-19 12:05:24 +00:00
Andre601 1a34376100 Merge pull request 'Update dependency net.kyori:adventure-text-serializer-legacy to v4.15.0' (#199) from renovate/net.kyori-adventure-text-serializer-legacy-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/199
2023-12-19 12:05:00 +00:00
Andre601's Renovate Bot ec1aa5b393 Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.12.0 2023-12-19 12:01:42 +00:00
Andre601's Renovate Bot 9683d3c001 Update dependency net.kyori:adventure-text-serializer-legacy to v4.15.0 2023-12-19 12:01:30 +00:00
Andre601 db60545fcc Add 1.20.4 in ModrinthVersionUploader 2023-12-18 20:19:44 +01:00
Andre601 392495ef63 Merge pull request 'Update dependency net.kyori:adventure-text-minimessage to v4.15.0' (#198) from renovate/net.kyori-adventure-text-minimessage-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/198
2023-12-18 12:53:37 +00:00
Andre601 903764b234 Merge branch 'master' into renovate/net.kyori-adventure-text-minimessage-4.x 2023-12-18 12:53:18 +00:00
Andre601 72329ed1e4 Merge pull request 'Update dependency net.kyori:adventure-api to v4.15.0' (#197) from renovate/net.kyori-adventure-api-4.x into master
Reviewed-on: https://codeberg.org/Andre601/AdvancedServerList/pulls/197
2023-12-18 12:53:04 +00:00
Andre601's Renovate Bot c516b56053 Update dependency net.kyori:adventure-text-minimessage to v4.15.0 2023-12-18 12:44:29 +00:00
Andre601's Renovate Bot 5e4295fbfb Update dependency net.kyori:adventure-api to v4.15.0 2023-12-18 12:44:20 +00:00
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
Andre_601 38d6ac3972 Merge pull request #94 from Andre601/fix/81-noclassdeffoundexception-issue
Fix ProtocolLib component issue
2023-05-08 17:38:06 +02:00
Andre601 360b961221 Bump version 2023-05-08 17:34:57 +02:00
Andre601 ef22ede56d Fix ProtocolLib component issue 2023-05-08 17:03:09 +02:00
Andre601 afa18b81fe Add Server placeholder options 2023-05-08 17:00:35 +02:00
Andre_601 ec9ea799cf Merge pull request #93 from Andre601/dependabot/pip/mkdocs-material-9.1.9
Bump mkdocs-material from 9.1.8 to 9.1.9
2023-05-02 18:12:08 +02:00
dependabot[bot] 99f762ff18 Bump mkdocs-material from 9.1.8 to 9.1.9
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.8 to 9.1.9.
- [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.8...9.1.9)

---
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-02 16:04:19 +00:00
Andre601 2bd59ff554 Load JoinEvent properly on Paper 2023-04-26 23:21:07 +02:00
Andre601 53157a7c06 Bump version 2023-04-26 23:11:20 +02:00
Andre_601 bfc39ab172 Merge pull request #91 from Andre601/feature/plugin-improvements
Plugin improvements
2023-04-26 23:08:39 +02:00
Andre_601 fa44192bd3 Ignore non-code files 2023-04-26 18:30:58 +02:00
Andre_601 53fc434bdd Merge pull request #92 from Andre601/dependabot/pip/mkdocs-material-9.1.8
Bump mkdocs-material from 9.1.7 to 9.1.8
2023-04-26 18:28:42 +02:00
dependabot[bot] b6152372a8 Bump mkdocs-material from 9.1.7 to 9.1.8
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.7 to 9.1.8.
- [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.7...9.1.8)

---
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-04-26 16:03:16 +00:00
Andre_601 5441d2bd96 Merge pull request #88 from Andre601/dependabot/maven/velocity/com.squareup.okhttp3-okhttp-4.11.0
Bump okhttp from 4.10.0 to 4.11.0 in /velocity
2023-04-24 18:35:57 +02:00
Andre_601 2d358f76c0 Merge pull request #89 from Andre601/dependabot/maven/core/com.squareup.okhttp3-okhttp-4.11.0
Bump okhttp from 4.10.0 to 4.11.0 in /core
2023-04-24 18:34:34 +02:00
Andre_601 d1cbaa3ef6 Merge pull request #90 from Andre601/dependabot/pip/mkdocs-material-9.1.7
Bump mkdocs-material from 9.1.6 to 9.1.7
2023-04-24 18:34:05 +02:00
dependabot[bot] 29513d953d Bump mkdocs-material from 9.1.6 to 9.1.7
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.6 to 9.1.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.1.6...9.1.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-04-24 16:06:42 +00:00
dependabot[bot] 365ec3d6f5 Bump okhttp from 4.10.0 to 4.11.0 in /core
Bumps [okhttp](https://github.com/square/okhttp) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.10.0...parent-4.11.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 16:02:45 +00:00
dependabot[bot] d4babddc31 Bump okhttp from 4.10.0 to 4.11.0 in /velocity
Bumps [okhttp](https://github.com/square/okhttp) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.10.0...parent-4.11.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 16:02:17 +00:00
Andre601 648b656dd4 Reduce duplicate code. 2023-04-22 00:04:21 +02:00
Andre601 b2b71144d9 Improve plugin code... I guess? 2023-04-21 23:34:22 +02:00
Andre601 17357345ab Use old badge system + add template render 2023-04-17 00:09:30 +02:00
Andre601 f696fc2160 Add missing perms and command info 2023-04-16 23:35:39 +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
Andre_601 97a71958e1 Add permission 2023-04-14 23:32:19 +02:00
Andre_601 b15d5f0633 Add permissions 2023-04-14 23:32:03 +02:00
Andre601 b4e39ca985 Add examples to profiles page 2023-04-13 16:24:56 +02:00
Andre_601 5aae2cccdc Add comment info output 2023-04-11 21:48:11 +02:00
Andre_601 c7ccd48037 Add some info lines 2023-04-11 21:47:31 +02:00
Andre_601 2b6c904fbf Update pr-comment.yml 2023-04-11 21:36:16 +02:00
Andre_601 eeefea3f6a Make finding comment more precise 2023-04-11 21:33:45 +02:00
Andre_601 2840c29a90 Merge pull request #85 from Andre601/dependabot/pip/mkdocs-material-9.1.6
Bump mkdocs-material from 9.1.5 to 9.1.6
2023-04-10 18:07:20 +02:00
Andre_601 862e631405 Merge pull request #84 from Andre601/dependabot/maven/core/net.kyori-adventure-text-serializer-legacy-4.13.1
Bump adventure-text-serializer-legacy from 4.13.0 to 4.13.1 in /core
2023-04-10 18:06:45 +02:00
dependabot[bot] f00737b0f0 Bump mkdocs-material from 9.1.5 to 9.1.6
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.5 to 9.1.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.1.5...9.1.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-04-10 16:06:42 +00:00
Andre_601 2d4d1d3136 Merge pull request #83 from Andre601/dependabot/maven/core/net.kyori-adventure-api-4.13.1
Bump adventure-api from 4.13.0 to 4.13.1 in /core
2023-04-10 18:06:38 +02:00
Andre_601 04d255bb54 Merge pull request #82 from Andre601/dependabot/maven/core/net.kyori-adventure-text-minimessage-4.13.1
Bump adventure-text-minimessage from 4.13.0 to 4.13.1 in /core
2023-04-10 18:06:30 +02:00
dependabot[bot] f77db9c760 Bump adventure-text-serializer-legacy from 4.13.0 to 4.13.1 in /core
Bumps [adventure-text-serializer-legacy](https://github.com/KyoriPowered/adventure) from 4.13.0 to 4.13.1.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.13.0...v4.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 16:03:03 +00:00
dependabot[bot] 9cde35aa2f Bump adventure-api from 4.13.0 to 4.13.1 in /core
Bumps [adventure-api](https://github.com/KyoriPowered/adventure) from 4.13.0 to 4.13.1.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.13.0...v4.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 16:02:53 +00:00
dependabot[bot] 13ca53140c Bump adventure-text-minimessage from 4.13.0 to 4.13.1 in /core
Bumps [adventure-text-minimessage](https://github.com/KyoriPowered/adventure) from 4.13.0 to 4.13.1.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.13.0...v4.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 16:02:46 +00:00
Andre_601 bc1d0722fa Merge pull request #80 from Andre601/feature/gh-actions-include-commit
Include Commit SHA in PR builds
2023-04-08 02:12:09 +02:00
Andre601 6201342ca7 Trigger new workflow 2023-04-08 02:06:42 +02:00
Andre_601 801e0a2749 Use PR SHA 2023-04-08 02:04:22 +02:00
Andre601 10718e6d03 Include Commit SHA in PR builds 2023-04-08 01:52:31 +02:00
Andre601 03203345c0 Include commit SHA for PR builds 2023-04-08 01:49:23 +02:00
Andre601 3ade0952e2 Folia support 2023-04-06 21:22:33 +02:00
Andre_601 f0e30d47dc typo fixes 2023-04-05 19:37:11 +02:00
Andre_601 bb94510858 Update URL and add expire date 2023-04-05 19:33:03 +02:00
Andre_601 c9d94619dd Merge pull request #77 from Andre601/dependabot/github_actions/peter-evans/create-or-update-comment-3
Bump peter-evans/create-or-update-comment from 2 to 3
2023-04-05 18:59:21 +02:00
dependabot[bot] 7ab8749421 Bump peter-evans/create-or-update-comment from 2 to 3
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 2 to 3.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](https://github.com/peter-evans/create-or-update-comment/compare/v2...v3)

---
updated-dependencies:
- dependency-name: peter-evans/create-or-update-comment
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-05 16:00:47 +00:00
Andre_601 a9216cc82c Improve badges 2023-04-05 17:13:28 +02:00
Andre_601 f14ef643b8 Improve badge 2023-04-05 17:10:47 +02:00
Andre_601 cc876d2f21 Fix Java version 2023-04-05 16:57:20 +02:00
Andre_601 0f8693add2 typo fixes 2023-04-05 16:50:55 +02:00
Andre_601 dcc9d18dbe typo fixes 2023-04-05 16:50:29 +02:00
Andre_601 f579aa0088 Fix broken ref 2023-04-05 16:48:19 +02:00
Andre601 579b945fbd Update workflow 2023-04-04 15:55:28 +02:00
Andre601 664bea8109 Create actions for PR previews. 2023-04-04 15:53:13 +02:00
Andre601 73d94e99e4 Fix length check 2023-04-03 21:26:09 +02:00
Andre601 389ed1df53 Improve HangarUploader 2023-04-03 21:22:01 +02:00
Andre601 5f4a07cb71 Remove cache 2023-04-03 20:59:23 +02:00
Andre601 b16f5e193c fix wrong path (hopefully) 2023-04-03 20:56:58 +02:00
Andre601 1c423e6cfa Add debug workflow 2023-04-03 20:52:10 +02:00
Andre601 a27dcd5248 Fix workflow file 2023-04-03 20:42:08 +02:00
Andre601 17bd1782fb Remove Paper module 2023-04-03 20:33:52 +02:00
Andre_601 96c44dafe2 Merge pull request #75 from Andre601/feature/hangar-automation
Automate Hangar publishing
2023-04-03 20:30:24 +02:00
Andre601 d4d9a7e3c5 Temporarely disable pr-build action 2023-04-03 20:29:32 +02:00
Andre601 9f0f7297f0 Final touches 2023-04-03 20:20:16 +02:00
Andre601 691cb14c63 Merge actions 2023-04-03 18:37:44 +02:00
Andre601 8670ea026e Pretty-print date (Also temp remove ViaVersion) 2023-04-03 17:40:09 +02:00
Andre601 27c019c00d Remove posting of the JSON Body 2023-04-03 17:25:33 +02:00
Andre601 d34ea9c2ad Further reduce dependency sizes 2023-04-03 17:21:47 +02:00
Andre601 74a61f2e09 Don't include ViaVersion dependency. 2023-04-03 16:33:36 +02:00
Andre601 5e550d5a7f Add JSON body for debugging 2023-04-03 15:13:11 +02:00
Andre601 b1180c0a8e Make plugin run on Folia 2023-04-03 01:38:40 +02:00
Andre601 fc4253acce Include body in error logging 2023-04-03 01:37:48 +02:00
Andre601 a4e2cc29d5 Add more logging messages 2023-04-03 01:24:19 +02:00
Andre601 95097a581a Fix jar names and add logback.xml 2023-04-03 01:10:33 +02:00
Andre601 aff3aefb72 Add mainClass attribute 2023-04-03 01:04:22 +02:00
Andre_601 089e56be70 Set working-directory 2023-04-03 00:58:05 +02:00
Andre601 e7b8f1a0dc First attempt at hangar automation... 2023-04-03 00:54:17 +02:00
Andre_601 a2252f55c4 Update hangar.yml 2023-04-03 00:53:24 +02:00
Andre_601 dcd6a1e867 try with just one file 2023-04-02 23:04:46 +02:00
Andre_601 24bf5193ff fix file names 2023-04-02 22:50:14 +02:00
Andre_601 2e0068115d Create hangar.yml 2023-04-02 22:43:29 +02:00
Andre_601 1accbfb5f0 Merge pull request #73 from Andre601/dependabot/pip/mkdocs-material-9.1.5
Bump mkdocs-material from 9.1.4 to 9.1.5
2023-03-31 18:10:44 +02:00
dependabot[bot] f0f520d12b Bump mkdocs-material from 9.1.4 to 9.1.5
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.4 to 9.1.5.
- [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.4...9.1.5)

---
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-03-31 16:03:53 +00:00
Andre601 3edef1c2e4 Bump API and plugin version for release 2023-03-29 18:41:31 +02:00
Andre_601 0c835da51a Merge pull request #72 from Andre601/dependabot/maven/velocity/org.bstats-bstats-velocity-3.0.2
Bump bstats-velocity from 3.0.1 to 3.0.2 in /velocity
2023-03-29 18:31:46 +02:00
dependabot[bot] 1dc937e7b6 Bump bstats-velocity from 3.0.1 to 3.0.2 in /velocity
Bumps [bstats-velocity](https://github.com/Bastian/bStats-Metrics) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: org.bstats:bstats-velocity
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 16:10:44 +00:00
Andre_601 8d63d92ab0 Merge pull request #71 from Andre601/dependabot/maven/paper/org.bstats-bstats-bukkit-3.0.2
Bump bstats-bukkit from 3.0.1 to 3.0.2 in /paper
2023-03-29 18:02:40 +02:00
dependabot[bot] 2ade1c2506 Bump bstats-bukkit from 3.0.1 to 3.0.2 in /paper
Bumps [bstats-bukkit](https://github.com/Bastian/bStats-Metrics) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: org.bstats:bstats-bukkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 16:01:29 +00:00
Andre_601 c1b699aab7 Merge pull request #69 from Andre601/dependabot/maven/paper/com.viaversion-viaversion-api-4.6.2
Bump viaversion-api from 4.6.1 to 4.6.2 in /paper
2023-03-27 18:08:25 +02:00
dependabot[bot] 6d5fc7a697 Bump viaversion-api from 4.6.1 to 4.6.2 in /paper
Bumps viaversion-api from 4.6.1 to 4.6.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 16:07:49 +00:00
Andre_601 a5acd73482 Add "Available on SpigotMC" badge 2023-03-24 23:03:16 +01:00
Andre_601 f1afcc0fd8 Merge pull request #68 from Andre601/dependabot/pip/mkdocs-material-9.1.4
Bump mkdocs-material from 9.1.3 to 9.1.4
2023-03-24 17:23:02 +01:00
dependabot[bot] 9922485c34 Bump mkdocs-material from 9.1.3 to 9.1.4
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.1.3 to 9.1.4.
- [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.3...9.1.4)

---
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-03-24 16:13:48 +00:00
Andre601 9ee543fe28 Use old Command handling for Spigot 2023-03-23 20:11:30 +01:00
Andre_601 da4eccdfcc remove spigot 2023-03-23 20:00:45 +01:00
Andre_601 89f5a45809 Use own fork for hangar badge 2023-03-23 18:24:25 +01:00
Andre601 29664fde70 Fix wrong artifact name 2023-03-23 16:50:39 +01:00
Andre601 40f362f1de Fix some PAPI placeholder stuff 2023-03-23 16:41:08 +01:00
Andre_601 07cef34a37 Merge pull request #50 from Andre601/feature/paper-plugin-support
First steps towards paper-plugin support
2023-03-23 16:22:43 +01:00
Andre601 afa80581e5 Bump version to 3.0.0-b1 2023-03-23 16:22:15 +01:00
Andre601 db2366e2ce Merge branch 'master' into feature/paper-plugin-support 2023-03-23 16:18:46 +01:00
Andre601 b54151813f Update release action to allow beta-releases 2023-03-23 16:14:59 +01:00
Andre601 2be041a613 Fix wrong path (Also ignore other jobs for now 2023-03-23 16:04:33 +01:00
Andre601 86411571ef Test out pre-release detection 2023-03-23 15:52:32 +01:00
Andre_601 d80236fef8 Remove paper module 2023-03-21 02:59:32 +01:00
Andre601 fe6fae58e3 Add Profiles example and fix badges width 2023-03-21 02:54:36 +01:00
Andre_601 b2e2b18d33 Add Pip (Python) to dependabot checks 2023-03-21 02:20:51 +01:00
Andre_601 d8e54c7ff0 Remove mike from requirements.txt 2023-03-21 02:16:53 +01:00
Andre_601 f0743d691f Merge pull request #66 from Andre601/dependabot/maven/spigot/org.apache.maven.plugins-maven-shade-plugin-3.4.1
Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /spigot
2023-03-20 17:10:25 +01:00
Andre_601 4b68253c7d Merge pull request #65 from Andre601/dependabot/maven/spigot/org.apache.maven.plugins-maven-compiler-plugin-3.11.0
Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /spigot
2023-03-20 17:10:12 +01:00
Andre_601 d1cee68355 Merge pull request #64 from Andre601/dependabot/maven/spigot/me.clip-placeholderapi-2.11.3
Bump placeholderapi from 2.11.2 to 2.11.3 in /spigot
2023-03-20 17:09:38 +01:00
Andre_601 07d3ea088a Merge pull request #63 from Andre601/dependabot/maven/paper/me.clip-placeholderapi-2.11.3
Bump placeholderapi from 2.11.2 to 2.11.3 in /paper
2023-03-20 17:09:23 +01:00
dependabot[bot] 912fb967fb Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /spigot
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.0...maven-shade-plugin-3.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 16:07:52 +00:00
dependabot[bot] d960644cc1 Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /spigot
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 16:07:39 +00:00
dependabot[bot] 34908b4123 Bump placeholderapi from 2.11.2 to 2.11.3 in /spigot
Bumps placeholderapi from 2.11.2 to 2.11.3.

---
updated-dependencies:
- dependency-name: me.clip:placeholderapi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 16:07:31 +00:00
dependabot[bot] 00466f1ffb Bump placeholderapi from 2.11.2 to 2.11.3 in /paper
Bumps placeholderapi from 2.11.2 to 2.11.3.

---
updated-dependencies:
- dependency-name: me.clip:placeholderapi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 16:07:22 +00:00
Andre601 d05527634d Add clearCache subcommand.
Also, add convenience methods for sending prefixed messages.
2023-03-20 15:09:02 +01:00
Andre601 6e017219b4 Add ViaVersion as soft-depend 2023-03-20 14:33:31 +01:00
Andre601 8fa66867bc Load PaperPingEvent and also improve PAPI placeholders 2023-03-18 17:07:28 +01:00
Andre601 1df167b66a Merge branch 'master' into feature/paper-plugin-support 2023-03-18 16:13:51 +01:00
Andre601 ffee02095f Remove unused import 2023-03-18 16:07:48 +01:00
Andre601 0fc7c7f047 Bump ProtocolLib version 2023-03-18 15:58:07 +01:00
Andre_601 c8ae03da16 Merge pull request #62 from Andre601/dependabot/github_actions/actions/cache-3
Bump actions/cache from 2 to 3
2023-03-17 18:06:33 +01:00
dependabot[bot] dc4165465e Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-17 16:01:55 +00:00
Andre601 05c32cd721 [Docs] Update badges to v3 2023-03-17 14:43:36 +01:00
Andre601 ccd326f036 Add ViaVersion to dependencies list 2023-03-17 14:31:03 +01:00
Andre601 e9117c8040 Revert docs to MkDocs only
(Mike kinda sucks, ngl)
2023-03-17 14:24:43 +01:00
Andre601 116714f9a4 Try fixing page deploy. 2023-03-17 01:30:27 +01:00
Andre601 06f025c50e Add missing page to nav 2023-03-17 01:26:57 +01:00
Andre601 25787e8c51 Include 1.19.4 in supported versions 2023-03-17 01:22:40 +01:00
Andre601 741ca73c62 Add PlaceholderAPI placeholders 2023-03-17 01:22:02 +01:00
Andre601 50944717ea Merge docs update into releas action 2023-03-17 01:01:21 +01:00
Andre_601 89d2d04c12 Merge pull request #61 from Andre601/dependabot/maven/spigot/net.kyori-adventure-platform-bukkit-4.3.0
Bump adventure-platform-bukkit from 4.2.0 to 4.3.0 in /spigot
2023-03-16 17:07:19 +01:00
dependabot[bot] 2aa53c556a Bump adventure-platform-bukkit from 4.2.0 to 4.3.0 in /spigot
Bumps [adventure-platform-bukkit](https://github.com/KyoriPowered/adventure-platform) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/KyoriPowered/adventure-platform/releases)
- [Commits](https://github.com/KyoriPowered/adventure-platform/compare/v4.2.0...v4.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-16 16:05:18 +00:00
Andre_601 7eb67c1571 Merge pull request #58 from Andre601/dependabot/maven/core/net.kyori-adventure-api-4.13.0
Bump adventure-api from 4.12.0 to 4.13.0 in /core
2023-03-15 17:14:39 +01:00
Andre_601 e6ebf0964b Merge pull request #60 from Andre601/dependabot/maven/core/net.kyori-adventure-text-serializer-legacy-4.13.0
Bump adventure-text-serializer-legacy from 4.12.0 to 4.13.0 in /core
2023-03-15 17:05:33 +01:00
Andre_601 2f7bbe8bae Merge pull request #59 from Andre601/dependabot/maven/core/net.kyori-adventure-text-minimessage-4.13.0
Bump adventure-text-minimessage from 4.12.0 to 4.13.0 in /core
2023-03-15 17:05:15 +01:00
dependabot[bot] cc3e75f41b Bump adventure-text-serializer-legacy from 4.12.0 to 4.13.0 in /core
Bumps [adventure-text-serializer-legacy](https://github.com/KyoriPowered/adventure) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.12.0...v4.13.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-03-15 16:03:13 +00:00
dependabot[bot] 7706dd245f Bump adventure-text-minimessage from 4.12.0 to 4.13.0 in /core
Bumps [adventure-text-minimessage](https://github.com/KyoriPowered/adventure) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.12.0...v4.13.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-03-15 16:03:06 +00:00
dependabot[bot] d4018ff666 Bump adventure-api from 4.12.0 to 4.13.0 in /core
Bumps [adventure-api](https://github.com/KyoriPowered/adventure) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.12.0...v4.13.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-03-15 16:03:01 +00:00
Andre_601 4c7a2ca94d Update wiki links to link to latest 2023-03-13 01:35:17 +01:00
Andre_601 21632711ea Merge pull request #57 from Andre601/dependabot/maven/core/com.github.ben-manes.caffeine-caffeine-3.1.5
Bump caffeine from 3.1.4 to 3.1.5 in /core
2023-03-06 17:15:29 +01:00
dependabot[bot] e82ed84c11 Bump caffeine from 3.1.4 to 3.1.5 in /core
Bumps [caffeine](https://github.com/ben-manes/caffeine) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/ben-manes/caffeine/releases)
- [Commits](https://github.com/ben-manes/caffeine/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: com.github.ben-manes.caffeine:caffeine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 16:12:19 +00:00
Andre601 1f44b34dd2 Update workflow titles 2023-03-03 21:05:36 +01:00
Andre601 b7b6d8b82b Make dev a default for mkdocs-material 2023-03-03 20:56:50 +01:00
Andre601 53e270b183 Try dev build of Mike from GitHub 2023-03-03 17:28:49 +01:00
Andre601 f633bb393e Revert "Make fetch-depht 1"
This reverts commit 42907c7f74.
2023-03-03 17:27:49 +01:00
Andre601 41ac71e346 Revert "Make fetch-depth 1"
This reverts commit e04b9b4a09.
2023-03-03 17:27:35 +01:00
Andre_601 e04b9b4a09 Make fetch-depth 1 2023-03-02 01:19:56 +01:00
Andre_601 42907c7f74 Make fetch-depht 1 2023-03-02 01:19:33 +01:00
Andre_601 69bf90c20f Make dev the default branch 2023-03-01 13:58:27 +01:00
Andre601 b2f70b605c Update CSS stuff 2023-03-01 03:35:52 +01:00
Andre601 fb5e4b57bc Create versioned docs 2023-03-01 02:33:29 +01:00
Andre601 49c17d941a Fix wrong workflow file names 2023-03-01 00:05:42 +01:00
Andre601 ec6b852497 typo 2023-03-01 00:03:03 +01:00
Andre_601 9bd2c4b8d5 Merge pull request #54 from Andre601/feature/versioned-docs
Set up versioned docs
2023-02-28 23:01:11 +01:00
Andre_601 57bb677578 Merge pull request #56 from Andre601/dependabot/maven/velocity/org.apache.maven.plugins-maven-compiler-plugin-3.11.0
Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /velocity
2023-02-28 17:07:00 +01:00
Andre_601 40c4726fd6 Merge pull request #55 from Andre601/dependabot/maven/paper/org.apache.maven.plugins-maven-compiler-plugin-3.11.0
Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /paper
2023-02-28 17:06:48 +01:00
dependabot[bot] c1eefbe114 Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /velocity
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-28 16:04:25 +00:00
dependabot[bot] 082345fb66 Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /paper
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-28 16:04:19 +00:00
Andre601 1bedc472b3 Extend the theme 2023-02-28 03:06:18 +01:00
Andre601 aa9d6ff7d2 Set up versioned docs 2023-02-28 02:35:47 +01:00
Andre601 5e4fc3d69c Smaller typo fix in api docs 2023-02-28 02:13:10 +01:00
Andre_601 b429e75797 Merge pull request #53 from Andre601/dependabot/maven/bungeecord/org.apache.maven.plugins-maven-compiler-plugin-3.11.0
Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /bungeecord
2023-02-27 17:13:39 +01:00
Andre_601 c2eacf716f Merge pull request #52 from Andre601/dependabot/maven/core/org.apache.maven.plugins-maven-compiler-plugin-3.11.0
Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /core
2023-02-27 17:13:28 +01:00
dependabot[bot] aca52b528d Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /bungeecord
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 16:13:20 +00:00
dependabot[bot] cd1469c554 Bump maven-compiler-plugin from 3.10.1 to 3.11.0 in /core
Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 16:12:46 +00:00
Andre601 ce4347ca1e Improve CommandHandler 2023-02-23 01:51:04 +01:00
Andre601 acc59e0af7 Prepare docs for next ASL API. 2023-02-23 00:49:14 +01:00
Andre601 099abcda67 Make sure paper-plugin loads after PlaceholderAPI 2023-02-23 00:37:07 +01:00
Andre601 2ced4db199 Small formatting for actions 2023-02-22 22:27:18 +01:00
Andre601 4f7c16ae5a Use PaperMC Maven repo 2023-02-20 23:30:19 +01:00
Andre_601 06739bb68e Merge pull request #51 from Andre601/dependabot/maven/core/com.github.ben-manes.caffeine-caffeine-3.1.4
Bump caffeine from 3.1.3 to 3.1.4 in /core
2023-02-20 17:13:37 +01:00
dependabot[bot] d1c9ab5b82 Bump caffeine from 3.1.3 to 3.1.4 in /core
Bumps [caffeine](https://github.com/ben-manes/caffeine) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/ben-manes/caffeine/releases)
- [Commits](https://github.com/ben-manes/caffeine/compare/v3.1.3...v3.1.4)

---
updated-dependencies:
- dependency-name: com.github.ben-manes.caffeine:caffeine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 16:10:36 +00:00
Andre601 d06f767e51 Rename to BukkitPlayerPlaceholders for clarity 2023-02-20 14:10:58 +01:00
Andre601 02e0821bd0 Merge CmdAdvancedServerList instances into one 2023-02-20 14:07:25 +01:00
Andre601 981d4e8146 First steps towards paper-plugin support 2023-02-20 01:53:02 +01:00
Andre_601 05667c0f87 Update MODRINTH.md 2023-02-13 22:44:54 +01:00
Andre_601 54f0f59925 Updated badges to v3 2023-02-13 22:41:49 +01:00
Andre_601 de2c8a7547 Merge pull request #49 from Andre601/dependabot/maven/velocity/org.bstats-bstats-velocity-3.0.1
Bump bstats-velocity from 3.0.0 to 3.0.1 in /velocity
2023-02-13 17:14:04 +01:00
Andre_601 50c31a3348 Merge pull request #48 from Andre601/dependabot/maven/paper/org.bstats-bstats-bukkit-3.0.1
Bump bstats-bukkit from 3.0.0 to 3.0.1 in /paper
2023-02-13 17:13:54 +01:00
Andre_601 93e94aa9d3 Merge pull request #47 from Andre601/dependabot/maven/spigot/org.bstats-bstats-bukkit-3.0.1
Bump bstats-bukkit from 3.0.0 to 3.0.1 in /spigot
2023-02-13 17:13:42 +01:00
dependabot[bot] 1f71aeb7e5 Bump bstats-velocity from 3.0.0 to 3.0.1 in /velocity
Bumps [bstats-velocity](https://github.com/Bastian/bStats-Metrics) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: org.bstats:bstats-velocity
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 16:13:04 +00:00
dependabot[bot] 5d01adfa49 Bump bstats-bukkit from 3.0.0 to 3.0.1 in /paper
Bumps [bstats-bukkit](https://github.com/Bastian/bStats-Metrics) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: org.bstats:bstats-bukkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 16:13:02 +00:00
dependabot[bot] da7e3eca09 Bump bstats-bukkit from 3.0.0 to 3.0.1 in /spigot
Bumps [bstats-bukkit](https://github.com/Bastian/bStats-Metrics) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: org.bstats:bstats-bukkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 16:12:48 +00:00
Andre_601 66b305bbea Merge pull request #46 from Andre601/dependabot/maven/core/com.github.ben-manes.caffeine-caffeine-3.1.3
Bump caffeine from 3.1.2 to 3.1.3 in /core
2023-02-10 17:16:03 +01:00
dependabot[bot] 3c1abf4f3a Bump caffeine from 3.1.2 to 3.1.3 in /core
Bumps [caffeine](https://github.com/ben-manes/caffeine) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/ben-manes/caffeine/releases)
- [Commits](https://github.com/ben-manes/caffeine/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: com.github.ben-manes.caffeine:caffeine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-10 16:07:29 +00:00
Andre_601 856be1e32e Update index.md 2023-02-03 22:33:28 +01:00
Andre601 5303bb00a0 More docs corrections 2023-02-01 15:55:19 +01:00
Andre601 9b43428e5d Another fix for changelog... 2023-02-01 15:47:18 +01:00
Andre601 d34d926f9a Fix wrong version in api changelog 2023-02-01 15:46:57 +01:00
Andre601 844279b32d Rename the other Placeholder classes too. 2023-02-01 15:38:00 +01:00
Andre601 5916e9b495 Version was already bumped... whoops 2023-02-01 15:31:56 +01:00
Andre_601 72384488d8 Merge pull request #45 from Andre601/feature/events
Add PreServerListSetEvent
2023-02-01 15:29:38 +01:00
Andre601 11a8b07f32 Bump version 2023-02-01 15:24:13 +01:00
Andre601 cd7dfc9c15 Rename to resolve 2023-01-31 18:12:43 +01:00
Andre601 c715ed6163 Make values of Expression final 2023-01-31 18:12:21 +01:00
Andre601 5a35ebbef4 Trim left and right string to avoid comparison issues 2023-01-31 17:17:10 +01:00
Andre601 830eee5da3 Fix missing favicon from resolver. 2023-01-28 23:22:08 +01:00
Andre601 09b845e86e Changes 2023-01-28 23:13:41 +01:00
Andre601 a2bdd5c4e5 Add changelog file 2023-01-27 14:59:12 +01:00
Andre601 a72c0d326a Update to latest API changes 2023-01-27 00:59:29 +01:00
Andre601 40ef2e35d4 Make GenericPlayer.getVersion VelocityPlayer only 2023-01-25 22:13:39 +01:00
Andre601 8422d6d2de Minor doc improvements 2023-01-25 16:19:43 +01:00
Andre601 4683dab513 limit motd in ProfileEntry.Builder directly 2023-01-25 16:15:07 +01:00
Andre601 d5947b20e5 Update docs 2023-01-25 01:11:45 +01:00
Andre601 147f01dd1b Rename GenericProfileEntryEvent to GenericServerListEvent 2023-01-25 00:29:07 +01:00
Andre601 a6eddb3828 Remove unused method in ComponentParser 2023-01-25 00:05:09 +01:00
Andre601 41e11f79cc Move ProfileEntry completely. 2023-01-25 00:01:51 +01:00
Andre601 66597ce7fa Add PreServerListSetEvent 2023-01-24 23:38:23 +01:00
Andre_601 77f17b202c Update MODRINTH.md 2023-01-23 21:28:57 +01:00
Andre_601 d3673a79af Update README.md 2023-01-23 20:59:26 +01:00
Andre_601 29c6930ce1 Merge pull request #38 from Andre601/feature/add-api
Start with an API for custom placeholder support
2023-01-23 20:54:03 +01:00
Andre601 125e9c0918 Add missing files to git 2023-01-23 20:53:21 +01:00
Andre601 2ac6931f26 Remove unused files and add workflow 2023-01-23 20:52:37 +01:00
Andre601 e301ef38f0 Bump version + Docs 2023-01-23 20:36:28 +01:00
Andre_601 3f6ada4599 Create api_support.yml 2023-01-23 14:27:41 +01:00
Andre601 45d3f17faa Use a Constructor for PlaceholderProvider 2023-01-22 15:00:01 +01:00
Andre601 d8fca2ca03 Improve Javadocs and rename getUuid to getUUID 2023-01-21 00:14:06 +01:00
Andre601 730b2e3aa8 Get rid of <T> nonsense for GenericPlayer 2023-01-21 00:03:55 +01:00
Andre601 e4e3543b9b Check for null/empty before lowercasing identifier 2023-01-20 23:18:59 +01:00
Andre_601 a955109db5 Merge pull request #44 from Andre601/dependabot/maven/core/com.unascribed-flexver-java-1.1.0
Bump flexver-java from 1.0.2 to 1.1.0 in /core
2023-01-17 16:55:01 +01:00
dependabot[bot] d399c7df63 Bump flexver-java from 1.0.2 to 1.1.0 in /core
Bumps flexver-java from 1.0.2 to 1.1.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-17 15:11:31 +00:00
Andre601 973620925d fix wrong char position 2023-01-16 15:22:42 +01:00
Andre601 697e9e265d Update javadoc 2023-01-11 23:14:28 +01:00
Andre601 cabed6aa65 Update missing copyright headers 2023-01-11 23:10:00 +01:00
Andre601 b408658026 Apply fixes 2023-01-11 23:08:41 +01:00
Andre601 15f611445c Merge branch 'master' into feature/add-api
# Conflicts:
#	api/src/main/java/ch/andre601/advancedserverlist/api/exceptions/InvalidPlaceholderProviderException.java
#	bungeecord/src/main/java/ch/andre601/advancedserverlist/bungeecord/events/BungeeEventWrapper.java
#	core/src/main/java/ch/andre601/advancedserverlist/core/events/PingEventHandler.java
#	core/src/main/java/ch/andre601/advancedserverlist/core/interfaces/events/GenericEventWrapper.java
#	paper/src/main/java/ch/andre601/advancedserverlist/paper/events/PaperEventWrapper.java
#	paper/src/main/java/ch/andre601/advancedserverlist/paper/objects/PaperPlayer.java
#	paper/src/main/java/ch/andre601/advancedserverlist/paper/objects/PlayerPlaceholders.java
#	spigot/src/main/java/ch/andre601/advancedserverlist/spigot/events/ProtocolLibEventWrapper.java
#	spigot/src/main/java/ch/andre601/advancedserverlist/spigot/objects/SpigotPlayer.java
#	velocity/src/main/java/ch/andre601/advancedserverlist/velocity/events/VelocityEventWrapper.java
#	velocity/src/main/java/ch/andre601/advancedserverlist/velocity/objects/VelocityPlayer.java
2023-01-11 22:45:43 +01:00
Andre_601 3859f2970f Merge pull request #41 from Andre601/feature/uuid-usage
Improve player caching behaviour
2023-01-10 20:36:34 +01:00
Andre601 71079bf9d8 Bump version 2023-01-09 20:47:46 +01:00
Andre601 4fa7e92264 Make CachedPlayer its own class 2023-01-09 20:46:46 +01:00
Andre_601 828d907371 Merge branch 'master' into feature/uuid-usage 2023-01-09 20:37:36 +01:00
Andre601 986c36a334 tiny typo fix 2023-01-09 20:36:08 +01:00
Andre_601 8f9ae4a835 Merge pull request #43 from Andre601/fix/nullpointerexceptions
Fix some NullPointerExceptions
2023-01-09 20:32:01 +01:00
Andre601 0dccdaf7e4 Add a comment 2023-01-09 20:31:31 +01:00
Andre601 ec0dec8e7d Try to fix errors with OkHttpClient 2023-01-09 17:59:23 +01:00
Andre601 f399ed6886 Fix some NullPointerExceptions 2023-01-09 17:42:54 +01:00
Andre_601 f2737f2b19 Merge pull request #42 from Andre601/dependabot/maven/core/com.google.code.gson-gson-2.10.1
Bump gson from 2.10 to 2.10.1 in /core
2023-01-09 16:20:46 +01:00
dependabot[bot] 504e669ce7 Bump gson from 2.10 to 2.10.1 in /core
Bumps [gson](https://github.com/google/gson) from 2.10 to 2.10.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.10...gson-parent-2.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 15:16:41 +00:00
Andre601 0cae58c9b6 Update Copyright 2023-01-01 00:33:39 +01:00
Andre_601 a8d6fc48bf Merge branch 'master' into feature/add-api 2022-12-31 23:06:26 +01:00
Andre601 91dcb49e81 Update log messages 2022-12-31 16:40:57 +01:00
Andre601 c8a1224f53 Fix broken logic and make ${player uuid} always available 2022-12-31 16:21:26 +01:00
Andre601 5722700d20 Improve player caching behaviour 2022-12-31 01:25:57 +01:00
Andre_601 1effc2574a Update release.yml 2022-12-28 20:15:16 +01:00
Andre_601 eb7a7fa6c7 Delete prerelease.yml 2022-12-28 20:15:07 +01:00
Andre601 9f6bdea168 Add better Version check (+ tests) 2022-12-28 16:58:23 +01:00
Andre601 c964c942dc Implement latest changes from v1.10.0 2022-12-28 14:00:19 +01:00
Andre601 27c591d92c Merge branch 'master' into feature/add-api
# Conflicts:
#	core/src/main/java/ch/andre601/advancedserverlist/core/events/PingEventHandler.java
#	core/src/main/java/ch/andre601/advancedserverlist/core/profiles/ProfileManager.java
#	core/src/main/java/ch/andre601/advancedserverlist/core/profiles/ServerListProfile.java
2022-12-28 13:47:46 +01:00
Andre_601 d247d832e6 Update prerelease.yml 2022-12-27 22:02:32 +01:00
Andre_601 708037bb6b Update release.yml 2022-12-27 22:02:05 +01:00
Andre_601 7da88771b6 Update prerelease.yml 2022-12-27 21:27:01 +01:00
Andre_601 9ccfd4674c Add workflow for beta-releases 2022-12-27 21:26:16 +01:00
Andre_601 9054ebdb0c Merge pull request #40 from Andre601/feature/multi-profiles
Implement system for multiple profiles in profiles
2022-12-27 21:22:25 +01:00
Andre601 edfd77e891 Fix wrong hidePlayersEnabled call. 2022-12-27 21:19:01 +01:00
Andre601 94391a8aed Make booleans and int nullable + version bump 2022-12-27 21:16:23 +01:00
Andre601 5a1f343cc2 Update config.yml 2022-12-27 18:03:07 +01:00
Andre601 e718a5c766 Improve descriptions 2022-12-27 18:01:40 +01:00
Andre601 565644ccd5 Add profiles example 2022-12-27 17:51:07 +01:00
Andre601 9531af1fdd Don't use random on a single entry 2022-12-27 16:56:50 +01:00
Andre601 7c1d7aadbc Try a system with fallback to def profile 2022-12-27 16:46:02 +01:00
Andre601 f26f2ba269 Implement system for multiple profiles in profiles 2022-12-27 16:03:01 +01:00
Andre601 de2d43f01c fix methods and imports 2022-12-20 23:48:03 +01:00
Andre_601 3fde989eb5 Merge branch 'master' into feature/add-api 2022-12-20 23:44:28 +01:00
Andre_601 f5d2fd1534 Merge pull request #39 from Andre601/feature/multiple-motds
Add option to have multiple MOTDs.
2022-12-20 22:22:49 +01:00
Andre601 90537eb004 Bump Version for release 2022-12-20 22:22:14 +01:00
Andre601 ce6a9e3b0b Use a Builder class to make ServerListProfile immutable... I guess? 2022-12-18 21:32:35 +01:00
Andre601 4d29f9e45e Add option to have multiple MOTDs. 2022-12-18 17:45:38 +01:00
Andre601 c1fa8d0df1 Add maven-compiler-plugin + throws docs 2022-12-16 17:05:06 +01:00
Andre601 f0446fe8f4 Move API to own module 2022-12-16 16:55:21 +01:00
Andre601 5509fb4380 Add and improve javadoc comments 2022-12-11 23:46:26 +01:00
Andre601 d0f7bf9897 Start with an API for custom placeholder support 2022-12-11 23:26:54 +01:00
Andre601 bf49636d6a Update workflow 2022-12-09 22:27:44 +01:00
Andre601 4a6c9a55d4 Update required libraries 2022-12-09 22:26:44 +01:00
Andre601 a5bfc0b6e3 Smaller format correction + version bump 2022-12-09 22:23:24 +01:00
Andre_601 dff332a83a Merge pull request #37 from Andre601/dependabot/maven/spigot/net.kyori-adventure-platform-bukkit-4.2.0
Bump adventure-platform-bukkit from 4.1.2 to 4.2.0 in /spigot
2022-12-09 16:10:29 +01:00
dependabot[bot] 58a16baaab Bump adventure-platform-bukkit from 4.1.2 to 4.2.0 in /spigot
Bumps [adventure-platform-bukkit](https://github.com/KyoriPowered/adventure-platform) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/KyoriPowered/adventure-platform/releases)
- [Commits](https://github.com/KyoriPowered/adventure-platform/compare/v4.1.2...v4.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-09 15:08:40 +00:00
Andre_601 c8acb4d90a Merge pull request #36 from Andre601/feature/unified-eventhandler
Create unified EventHandler
2022-12-08 21:56:48 +01:00
Andre_601 5575243a79 Merge pull request #35 from Andre601/dependabot/maven/core/com.google.code.gson-gson-2.10
Bump gson from 2.9.1 to 2.10 in /core
2022-12-08 16:43:13 +01:00
Andre601 4cd4aeb12a Move Favicon creation and logging to PingEventHandler 2022-12-08 16:42:23 +01:00
Andre601 5922b2235e Bump version 2022-12-07 21:19:23 +01:00
Andre601 2fcef08f5a Wrap up (no pun intended) remaining platform events 2022-12-07 16:28:39 +01:00
Andre601 30c28b07a4 Smaller changes 2022-12-06 21:32:16 +01:00
Andre601 08b4f1029c Make Protocol and ServerPing final 2022-12-06 21:27:09 +01:00
Andre601 f5051022aa Create unified EventHandler 2022-12-06 21:24:43 +01:00
dependabot[bot] fe51e78764 Bump gson from 2.9.1 to 2.10 in /core
Bumps [gson](https://github.com/google/gson) from 2.9.1 to 2.10.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.9.1...gson-parent-2.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 15:11:07 +00:00
Andre_601 5b2d9d910f Use env variables 2022-12-06 14:17:34 +01:00
Andre_601 6f06c47de7 Merge pull request #34 from Andre601/feature/update-checker
Add Update Checker
2022-12-06 14:03:25 +01:00
Andre601 ad3ba0c8b3 Update config description 2022-12-06 00:49:52 +01:00
Andre601 12d8d930dd Use a ScheduledExecutorService instead of Timer 2022-12-06 00:26:55 +01:00
Andre601 9a30a6b679 Add info line 2022-12-06 00:01:24 +01:00
Andre601 b82cf69d43 Simplify more. 2022-12-05 23:58:05 +01:00
Andre601 fb6d93b455 Init timer only when UpdateChecker is used. 2022-12-05 23:55:54 +01:00
Andre601 a1276da68f Fix exceptions 2022-12-05 23:13:21 +01:00
Andre601 25c053d495 Use timer class from Java 2022-12-05 22:24:19 +01:00
Andre601 39c1fb5452 Better version comparison. 2022-12-05 21:26:24 +01:00
Andre601 48edebc043 Add config option 2022-12-03 20:29:45 +01:00
Andre601 3a672378ff Add Update Checker 2022-12-03 20:23:21 +01:00
Andre_601 9db9f2be7f Merge pull request #33 from Andre601/dependabot/maven/core/net.kyori-adventure-api-4.12.0
Bump adventure-api from 4.11.0 to 4.12.0 in /core
2022-11-28 16:31:53 +01:00
Andre_601 2cf47e351b Merge pull request #32 from Andre601/dependabot/maven/core/net.kyori-adventure-text-minimessage-4.12.0
Bump adventure-text-minimessage from 4.11.0 to 4.12.0 in /core
2022-11-28 16:31:39 +01:00
Andre_601 36abdb83cd Merge pull request #31 from Andre601/dependabot/maven/core/net.kyori-adventure-text-serializer-legacy-4.12.0
Bump adventure-text-serializer-legacy from 4.11.0 to 4.12.0 in /core
2022-11-28 16:31:21 +01:00
dependabot[bot] ad950bf330 Bump adventure-api from 4.11.0 to 4.12.0 in /core
Bumps [adventure-api](https://github.com/KyoriPowered/adventure) from 4.11.0 to 4.12.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.11.0...v4.12.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>
2022-11-28 15:12:17 +00:00
dependabot[bot] 143753d309 Bump adventure-text-minimessage from 4.11.0 to 4.12.0 in /core
Bumps [adventure-text-minimessage](https://github.com/KyoriPowered/adventure) from 4.11.0 to 4.12.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.11.0...v4.12.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>
2022-11-28 15:12:10 +00:00
dependabot[bot] 0c37c21650 Bump adventure-text-serializer-legacy from 4.11.0 to 4.12.0 in /core
Bumps [adventure-text-serializer-legacy](https://github.com/KyoriPowered/adventure) from 4.11.0 to 4.12.0.
- [Release notes](https://github.com/KyoriPowered/adventure/releases)
- [Commits](https://github.com/KyoriPowered/adventure/compare/v4.11.0...v4.12.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>
2022-11-28 15:12:04 +00:00
Andre_601 40a6b4f059 Merge pull request #30 from Andre601/dependabot/maven/core/com.github.ben-manes.caffeine-caffeine-3.1.2
Bump caffeine from 3.1.1 to 3.1.2 in /core
2022-11-24 16:24:36 +01:00
dependabot[bot] 965e87d71b Bump caffeine from 3.1.1 to 3.1.2 in /core
Bumps [caffeine](https://github.com/ben-manes/caffeine) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/ben-manes/caffeine/releases)
- [Commits](https://github.com/ben-manes/caffeine/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: com.github.ben-manes.caffeine:caffeine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-24 15:08:34 +00:00
Andre_601 202a22f33a Update README.md 2022-11-21 15:20:02 +01:00
Andre_601 a4b2a6c350 Update MODRINTH.md 2022-11-21 15:03:28 +01:00
Andre601 ba55f5299b Bump version 2022-11-07 22:29:04 +01:00
Andre_601 24fdf798cf Merge pull request #29 from Andre601/feature/disable-cache-option
Add option to disable Cache
2022-11-07 22:28:16 +01:00
Andre601 e208d181b7 Add option to disable Cache 2022-11-07 22:14:50 +01:00
Andre_601 6c15c7b259 Merge pull request #28 from Andre601/dependabot/maven/paper/org.apache.maven.plugins-maven-shade-plugin-3.4.1
Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /paper
2022-10-27 17:55:21 +02:00
Andre_601 dcd76a43f5 Merge pull request #27 from Andre601/dependabot/maven/bungeecord/org.apache.maven.plugins-maven-shade-plugin-3.4.1
Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /bungeecord
2022-10-27 17:55:10 +02:00
Andre_601 adc2060499 Merge pull request #26 from Andre601/dependabot/maven/velocity/org.apache.maven.plugins-maven-shade-plugin-3.4.1
Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /velocity
2022-10-27 17:55:01 +02:00
Andre_601 4d6befc857 Merge pull request #25 from Andre601/dependabot/maven/core/org.apache.maven.plugins-maven-shade-plugin-3.4.1
Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /core
2022-10-27 17:54:52 +02:00
dependabot[bot] 7cfb792471 Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /paper
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.0...maven-shade-plugin-3.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 15:41:21 +00:00
dependabot[bot] d46245eefa Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /bungeecord
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.0...maven-shade-plugin-3.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 15:41:17 +00:00
dependabot[bot] d5e0fd3d7a Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /velocity
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.0...maven-shade-plugin-3.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 15:41:11 +00:00
dependabot[bot] 496e246b9e Bump maven-shade-plugin from 3.4.0 to 3.4.1 in /core
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.0...maven-shade-plugin-3.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 15:41:11 +00:00
Andre_601 e263a45f1c width and not height 2022-10-05 17:40:40 +02:00
Andre_601 edfc977730 Update MODRINTH.md 2022-10-05 17:40:01 +02:00
Andre_601 5910c26b4b Add waterfall badge 2022-10-03 23:49:07 +02:00
Andre_601 5b9c506a89 Use jsdelivr url 2022-09-26 00:17:47 +02:00
Andre_601 913ddd7834 Create MODRINTH.md 2022-09-22 13:41:05 +02:00
Andre_601 397c7ea59a Merge pull request #23 from Andre601/feature/readme-new-badges
Prepare readme for new badges
2022-09-21 01:48:30 +02:00
Andre_601 6e7b2541e1 Update README.md 2022-09-21 01:48:22 +02:00
Andre_601 241c15a452 Update README.md 2022-09-20 22:07:40 +02:00
Andre_601 62c5d13aa2 Prepare readme for new badges 2022-09-20 22:05:33 +02:00
Andre601 3a73c5ce6b Fix wrong open-perms for certain OS 2022-09-20 00:41:33 +02:00
Andre_601 bf54e8eb0b Yes I update the README a lot today... 2022-09-18 01:45:46 +02:00
Andre_601 aa2cabedbf Update README.md 2022-09-18 01:09:01 +02:00
Andre_601 66878626e1 Update README.md 2022-09-17 23:35:34 +02:00
Andre_601 f6f3f3d8b6 Update README.md 2022-09-17 23:25:48 +02:00
Andre601 85e41b6c7e Fix wrong formatted messages in /asl reload 2022-09-17 22:51:33 +02:00
Andre_601 a220efc624 Update README.md 2022-09-17 17:58:49 +02:00
Andre_601 ea8871ce8f Update README.md 2022-09-17 17:50:32 +02:00
Andre_601 ea0fdc3798 Update README.md 2022-09-17 17:50:06 +02:00
Andre_601 1188ab0c9c Create config.yml 2022-09-15 01:52:30 +02:00
Andre_601 aaefd4c928 Create feature_request.yml 2022-09-15 01:50:28 +02:00
Andre_601 940bf2fb9d fix typo 2022-09-15 01:20:23 +02:00
Andre_601 0c24bf8d24 Update bug_report.yml 2022-09-15 01:19:36 +02:00
Andre_601 564ce7a820 Create bug_report.yml 2022-09-15 01:18:54 +02:00
Andre_601 bb8cd21b86 Merge pull request #22 from Andre601/dependabot/maven/velocity/org.apache.maven.plugins-maven-shade-plugin-3.4.0
Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /velocity
2022-09-14 18:33:57 +02:00
Andre_601 2d2d8a6175 Merge pull request #20 from Andre601/dependabot/maven/bungeecord/org.apache.maven.plugins-maven-shade-plugin-3.4.0
Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /bungeecord
2022-09-14 18:33:48 +02:00
Andre_601 fcd4bdbe14 Merge pull request #19 from Andre601/dependabot/maven/paper/org.apache.maven.plugins-maven-shade-plugin-3.4.0
Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /paper
2022-09-14 18:33:37 +02:00
Andre_601 3a9b2a7c5a Merge pull request #18 from Andre601/dependabot/maven/core/org.apache.maven.plugins-maven-shade-plugin-3.4.0
Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /core
2022-09-14 18:33:27 +02:00
dependabot[bot] 3b3793ab9a Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /velocity
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.3.0...maven-shade-plugin-3.4.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>
2022-09-14 16:33:17 +00:00
Andre_601 d679694d6e Merge pull request #21 from Andre601/dependabot/maven/spigot/org.apache.maven.plugins-maven-shade-plugin-3.4.0
Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /spigot
2022-09-14 18:33:09 +02:00
dependabot[bot] 47405f7492 Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /spigot
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.3.0...maven-shade-plugin-3.4.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>
2022-09-14 16:31:57 +00:00
dependabot[bot] af7408dcd5 Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /bungeecord
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.3.0...maven-shade-plugin-3.4.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>
2022-09-14 16:31:30 +00:00
dependabot[bot] 17d0930195 Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /paper
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.3.0...maven-shade-plugin-3.4.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>
2022-09-14 16:31:28 +00:00
dependabot[bot] 91cd3b6032 Bump maven-shade-plugin from 3.3.0 to 3.4.0 in /core
Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.3.0...maven-shade-plugin-3.4.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>
2022-09-14 16:31:26 +00:00
Andre601 2d67145ae5 Bump version 2022-09-09 23:33:22 +02:00
Andre601 ba1dd8a70d Fix clearFaviconCache() + expression error 2022-09-09 23:33:00 +02:00
Andre_601 4ea77f2907 Update README.md 2022-09-09 15:11:42 +02:00
Andre_601 7fdc23baa1 Update release.yml 2022-09-09 14:52:13 +02:00
Andre601 d630b472ca Simplify validation check 2022-09-09 01:39:15 +02:00
Andre_601 99509b538b Merge pull request #16 from Andre601/feature/improve-fakeplayers-creation
Improve handling of fake players
2022-09-08 15:27:17 +02:00
Andre601 4539fe4628 Bump version 2022-09-08 15:25:31 +02:00
Andre601 8c81f4f5c8 Rewrite server list profile 2022-09-08 15:19:25 +02:00
Andre601 f34ef3fbe4 Add missing getPlugin() call 2022-09-08 14:16:30 +02:00
Andre601 45f68294c1 Use methods from PluginCore 2022-09-07 21:49:05 +02:00
Andre601 f4056e51ef Rename getPath to getFolderPath 2022-09-07 21:36:35 +02:00
Andre601 7f38c0f224 Update FaviconHandler 2022-09-07 21:34:33 +02:00
Andre601 17a4ba0f8c Improve Fake player creation 2022-09-07 21:33:29 +02:00
Andre_601 5cb1245126 Update README.md 2022-09-05 21:27:42 +02:00
Andre_601 0963d9ffb4 Don't feature a release 2022-09-05 13:50:30 +02:00
Andre_601 6dedd9368f Use release-title 2022-09-05 13:33:55 +02:00
Andre601 f2df3727a7 Add getFaviconHandler to PluginCore
Also, make bStats rely on global config
2022-09-05 13:29:10 +02:00
Andre_601 2b7c24daa4 Create FUNDING.yml 2022-09-04 15:15:54 +02:00
Andre_601 1e042461ac Update README.md 2022-09-04 14:17:42 +02:00
Andre_601 599c2db2bc Re-add modrinth 2022-09-03 16:56:38 +02:00
Andre_601 87505f820c try upload/download artifact 2022-09-03 16:27:44 +02:00
Andre_601 28109c8b5b Add needs to second job 2022-09-03 16:02:45 +02:00
Andre_601 243854592d Merge pull request #15 from Andre601/feature/action-improvements
Make Jar build only happen once
2022-09-03 16:01:05 +02:00
Andre_601 4648bc30e9 test out with github only for now... 2022-09-03 16:00:57 +02:00
Andre_601 f9a96e5525 typo 2022-09-03 00:28:50 +02:00
Andre_601 d158fb852f Update release.yml 2022-09-03 00:14:11 +02:00
Andre_601 77f95900e2 Use cache 2022-09-03 00:10:00 +02:00
Andre_601 912fec1875 Make Jar build only happen once 2022-09-02 23:44:51 +02:00
Andre_601 dba9ca20a4 Merge pull request #14 from Andre601/dependabot/github_actions/Kir-Antipov/mc-publish-3.2
Bump Kir-Antipov/mc-publish from 3.1 to 3.2
2022-09-02 18:35:37 +02:00
dependabot[bot] 7b94ae52db Bump Kir-Antipov/mc-publish from 3.1 to 3.2
Bumps [Kir-Antipov/mc-publish](https://github.com/Kir-Antipov/mc-publish) from 3.1 to 3.2.
- [Release notes](https://github.com/Kir-Antipov/mc-publish/releases)
- [Commits](https://github.com/Kir-Antipov/mc-publish/compare/v3.1...v3.2)

---
updated-dependencies:
- dependency-name: Kir-Antipov/mc-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 15:40:17 +00:00
Andre601 6d3bf50278 Actually bump version -_- 2022-09-02 04:27:50 +02:00
Andre_601 8039088fb9 typo -_- 2022-09-02 03:43:39 +02:00
Andre601 ecaaf7bbf3 get rid of abstraction in ExpressionResult + better command output 2022-09-02 03:37:50 +02:00
Andre_601 dd970cfabf Merge pull request #13 from Andre601/feature/auto-publish-action
Create action for auto-publishing to Modrinth
2022-09-02 03:04:06 +02:00
Andre_601 a888481674 Use | definition for loaders. 2022-09-02 02:25:29 +02:00
Andre_601 ee68eafc63 Don't define changelog (Is added automatically) 2022-09-02 02:24:21 +02:00
Andre_601 f22313a5c8 Add proper credits 2022-09-02 02:01:14 +02:00
Andre_601 9603155722 Create action for auto-publishing to Modrinth 2022-09-02 01:57:53 +02:00
Andre_601 df938485b2 It's JDK 16 2022-08-30 21:32:25 +02:00
Andre_601 0ddda8bd78 Update README.md 2022-08-28 16:39:36 +02:00
Andre_601 56a83e88fb Add files via upload 2022-08-28 16:37:54 +02:00
Andre_601 1947f627ef Update README.md 2022-08-28 01:32:38 +02:00
Andre_601 3c344f9a5d Merge pull request #11 from Andre601/feature/improved-favicon-handling
Better Favicon handling
2022-08-27 21:32:01 +02:00
Andre601 8e2004cb81 Move relocations to platform modules 2022-08-27 21:29:57 +02:00
Andre601 004d723c81 Remove minimizeJar to fix ClassNotFoundExceptions 2022-08-27 21:08:24 +02:00
Andre601 90fb6a2654 Add clear favicon function and better favicon handling 2022-08-26 23:33:30 +02:00
Andre_601 0eb5daac81 Update README.md 2022-08-23 00:39:50 +02:00
Andre_601 f23f282ba9 Merge pull request #10 from Andre601/dependabot/maven/core/com.github.ben-manes.caffeine-caffeine-3.1.1
Bump caffeine from 1.3.3 to 3.1.1 in /core
2022-08-22 17:48:41 +02:00
dependabot[bot] df705c0c14 Bump caffeine from 1.3.3 to 3.1.1 in /core
Bumps [caffeine](https://github.com/ben-manes/caffeine) from 1.3.3 to 3.1.1.
- [Release notes](https://github.com/ben-manes/caffeine/releases)
- [Commits](https://github.com/ben-manes/caffeine/compare/v1.3.3...v3.1.1)

---
updated-dependencies:
- dependency-name: com.github.ben-manes.caffeine:caffeine
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 15:47:24 +00:00
Andre_601 f27202f2df Update README.md 2022-08-22 00:25:32 +02:00
Andre_601 0d84335db9 Merge pull request #9 from Andre601/feature/favicon-support
Add Favicon support for Server list profiles.
2022-08-21 23:32:46 +02:00
Andre601 50f878e39c Add assets 2022-08-21 23:30:59 +02:00
Andre601 b88ee87c96 Add notes to favicon setting 2022-08-21 23:28:11 +02:00
Andre601 a5f6e689f0 Shade in Caffeine 2022-08-21 01:31:20 +02:00
Andre601 dd0bc8a43a Cache the bytes array 2022-08-20 23:53:32 +02:00
Andre601 563362504f Use some kind of caching... I guess? 2022-08-20 23:43:55 +02:00
Andre601 bd95be080e Add missing profile comments 2022-08-18 16:11:04 +02:00
Andre601 2d02d48d3c Add Favicon support for Server list profiles. 2022-08-18 16:05:00 +02:00
Andre_601 15f7b5def3 Update README.md 2022-08-18 00:02:49 +02:00
Andre_601 f37813d5b7 Merge pull request #8 from Andre601/feature/xMore-option
Add xMore profile option
2022-08-17 21:26:17 +02:00
Andre601 93c2dda56b Add xMore profile option 2022-08-17 21:19:38 +02:00
229 changed files with 16086 additions and 2034 deletions

No files matched your search

+62
View File
@@ -0,0 +1,62 @@
name: Bug Report
description: Report an issue with the plugin
body:
- type: markdown
attributes:
value: |-
## Before opening
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+ supported.
- The issue happens with just AdvancedServerList installed.
- type: dropdown
attributes:
label: Platform
description: On what platform do you use the plugin?
options:
- BungeeCord
- Other (Please specify)
- Paper
- Purpur
- Spigot
- Velocity
- Waterfall
validations:
required: true
- type: input
attributes:
label: Other platform
description: |-
Please provide the name of the platform (Proxy/Server) you use, if you selected `Other (Please specify)` in the above section.
Leave empty otherwise.
placeholder: SomeProxy
- type: textarea
attributes:
label: What happened?
description: |-
Give a detailed description of what exactly happened.
You can provide screenshots to further explain the issues.
When sharing errors, make sure to use a site such as https://paste.helpch.at to do so.
placeholder: When I do ... does ... happen.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: Provide a detailed step-by-step explanation on how to reproduce this issue.
placeholder: |-
1. Do this
2. ...
3. Profit!
validations:
required: true
- type: textarea
attributes:
label: Server List Profiles
description: |-
**Optional**
Provide any Server List Profiles you use, if you believe those to be the cause of the issue.
This text field will automatically render the text as YAML code.
render: yaml
+11
View File
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: API Support
about: For API support, please create an issue in the `asl-api` repository.
url: https://codeberg.org/Andre601/asl-api
- name: Discord Server
about: Please ask questions in the `#asl-support` channel on the M.O.S.S. Discord Server.
url: https://discord.gg/MyPTjpsgGH
- name: Wiki
about: Check the Wiki for explanations about the features and examples.
url: https://asl.andre601.ch
+34
View File
@@ -0,0 +1,34 @@
name: Feature Request
description: Suggest a new feature for the plugin
body:
- type: markdown
attributes:
value: |-
## Before opening
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+ supported.
- The Feature you suggest hasn't been suggested before.
- type: dropdown
attributes:
label: Platforms
description: What platforms should this feature be usable on
multiple: true
options:
- Proxy (BungeeCord, Waterfall, ...)
- Proxy (Velocity)
- Server (Spigot, Paper, ...)
validations:
required: true
- type: textarea
attributes:
label: Feature
description: |-
Give a detailed description of what exactly should be added and/or changed in AdvancedServerList.
You can provide screenshots to further explain the idea.
When sharing code snippets, make sure to use a site such as https://paste.helpch.at to do so.
placeholder: AdvancedServerList should get ... because ...
validations:
required: true
+103
View File
@@ -0,0 +1,103 @@
<center><strong><u><font size="6">AdvancedServerList</font ></u></strong></center>
AdvancedServerList is a plugin designed to allow the largest possible customization for your server's appearance in a Player's multiplayer screen.
The plugin offers extensive customization including changing the MOTD, player count text, player count hover and favicon of your server. All while also allowing you to create multiple profiles with priorities and conditions to set when a specific profile should be displayed.
## Supported Platforms
<a href="https://papermc.io" target="_blank">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/paper_vector.svg&h=48" alt="platform-paper" title="Tested on Paper">
</a>
<br>
<a href="https://www.spigotmc.org" target="_blank">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/bungeecord_vector.svg&h=48" alt="platform-bungeecord" title="Tested on BungeeCord">
</a>
<br>
<a href="https://www.papermc.io" target="_blank">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/waterfall_vector.svg&h=48" alt="platform-waterfall" title="Tested on Waterfall">
</a>
<br>
<a href="https://velocitypowered.com" target="_blank">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/velocity_vector.svg&h=48" alt="platform-velocity" title="Tested on Velocity">
</a>
## Server List Profiles
A Server List Profile is a single YAML file located in the plugin's `profiles` folder. It contains settings that allow you to modify the server's appearance within a Player's multiplayer screen.
### Priority and Conditions
Each file has a priority and optional condition. The priority is used to determine what file AdvancedServerList should use first - starting from highest number to lowest - with conditions being used to set when the profile should be used.
Once a profile has been found with a condition returning true - which is the default should there be no condition - will AdvancedServerList use said profile.
> *Read more about [Priority](https://asl.andre601.ch/profiles/#priority) and [Conditions](https://asl.andre601.ch/profiles/#condition)*
### Placeholders
AdvancedServerList supports two sets of placeholders. The first one being its own placeholders using the `${<type> <values>}` format adobted from BungeeTabListPlus and the second one being placeholders from PlaceholderAPI using its `%<identifier>_<values>%` placeholder format.
Note that internal placeholders can be used in all text-based options of a profile, while PlaceholderAPI placeholders can be used in all text-based options except the `condition` one.
As a final note can plugins provide their own placeholders to use within AdvancedServerList by using its API.
> *Read more about [Placeholders](https://asl.andre601.ch/profiles/placeholders/)*
### Formatting
AdvancedServerList utilizes the MiniMessage formatting to handle colors and formatting of text. This option was chosen over legacy formatting - using `&` character - for being more clear and readable in its design, not to mention having an easier way for more complex features such as RGB gradients.
> *Read more about [Formatting](https://asl.andre601.ch/profiles/formatting/)*
## Dependencies
AdvancedServerList soft-depends on the following plugins, meaning their inclusion is not required.
| Plugin | Supported Platforms |
|-------------------------------------------------------------------------|----------------------------------------|
| [PlaceholderAPI](https://hangar.papermc.io/HelpChat/PlaceholderAPI) | Paper |
| [ViaVersion](https://hangar.papermc.io/ViaVersion/ViaVersion) | Paper |
| [PAPIProxyBridge](https://hangar.papermc.io/William278/PAPIProxyBridge) | BungeeCord, Waterfall, Velocity |
| [Maintenance](https://hangar.papermc.io/kennytv/Maintenance) | Paper, BungeeCord, Waterfall, Velocity |
## Statistics
The plugin sends statistics to [bStats](https://bstats.org) to show.
You can disable the sending of statistics in the global bStats config located inside `/plugins/bstats/`.
You can find the bStats pages of the plugin for the following platforms:
- [Paper](https://bstats.org/plugin/bungeecord/AdvancedServerList/15584)
- [BungeeCord, Waterfall](https://bstats.org/plugin/bungeecord/AdvancedServerList/15585)
- [Velocity](https://bstats.org/plugin/velocity/AdvancedServerList/15587)
## Videos
Below can you find a collection of videos made for my plugin. If you made a video and it isn't shown here, let me know and I'll add it.
<details><summary>Click to show/hide Videos</summary>
<p>
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>
</p>
</details>
## Screenshots
<a href="https://modrinth.com/plugin/advancedserverlist/gallery" target="_blank">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/documentation/modrinth-gallery_vector.svg&h=48" alt="gallery" title="Check out the Gallery">
</a>
## Support
<a href="https://discord.gg/MyPTjpsgGH" target="_blank">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/social/discord-singular_vector.svg&h=48" alt="discord" title="Join the M.O.S.S. Discord Server">
</a>
<br>
<a href="https://app.revolt.chat/invite/74TpERXA" target="_blank">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/social/revolt-singular_vector.svg&h=48" alt="revolt" title="Join my Revolt Server">
</a>
<br>
<a href="https://blobfox.coffee/@andre_601" target="_blank">
<img src="https://wsrv.nl/?url=https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/social/mastodon-singular_vector.svg&h=48" alt="revolt" title="Chat with me on Mastodon">
</a>
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 876 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+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==
Binary file not shown.

After

Width:  |  Height:  |  Size: 877 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

+37
View File
@@ -0,0 +1,37 @@
name: Pull Request
description: Create a new Pull request
body:
- type: markdown
attributes:
value: |-
Thank you for creating a Pull request!
Please be sure to fill out this template with all requested information to ensure it being valid and not being closed unmerged.
- type: dropdown
attributes:
label: Type
description: What kind of Pull request is this?
options:
- Enhancement
- Bugfix
- Documentation
validations:
required: true
- type: dropdown
attributes:
label: Breaking Change?
description: |-
Is this a breaking change?
A breaking change means that it becomes incompatible with previous server/proxy versions or plugin versions.
options:
- Yes
- No
validations:
required: true
- type: textarea
attributes:
label: Description
description: Provide a detailed description of what this Pull request is doing. Link any issues this Pull request may fix/close.
validations:
required: true
-50
View File
@@ -1,50 +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'
-23
View File
@@ -1,23 +0,0 @@
name: Build Jars
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '16'
- name: Build jar
run: mvn clean install
- name: Upload jar
uses: AButler/upload-release-assets@v2.0
with:
files: 'bungeecord/target/AdvancedServerList-*.jar;paper/target/AdvancedServerList-*.jar;spigot/target/AdvancedServerList-*.jar;velocity/target/AdvancedServerList-*.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}
+1
View File
@@ -2,3 +2,4 @@
/.idea/
/**/dependency-reduced-pom.xml
/**/target/
/**/__pycache__/
+64
View File
@@ -0,0 +1,64 @@
when:
- event: pull_request
path:
include: [".woodpecker/pr_preview.yml", "docs/**", "mkdocs.yml", "requirements.txt"]
variables:
setup_git: &setup_git
- apk add git
- git config --global user.email "andre_601-bot@noreply.codeberg.org"
- git config --global user.name "PR Docs Preview Builder"
steps:
- name: "Clone Preview Repository"
image: alpine:3.20.3
commands:
- chmod -R a+w .
- <<: *setup_git
- git clone https://codeberg.org/Andre601/preview.git site
- chmod -R a+w site
- cd site
- git switch ${CI_REPO_NAME,,}/${CI_COMMIT_PULL_REQUEST} 2>/dev/null || git switch -c ${CI_REPO_NAME,,}/${CI_COMMIT_PULL_REQUEST}
- name: "Build Docs"
image: woodpeckerci/plugin-mkdocs:latest
settings:
pip_install_file: requirements.txt
- name: "Commit and Push"
image: alpine:3.20.3
secrets:
- bot_token
commands:
- <<: *setup_git
- mv preview-domains site/.domains
- cd site
- git remote add upstream https://$BOT_TOKEN@codeberg.org/Andre601/preview.git
- git add --all
- git commit -m "Update Preview for ${CI_REPO_NAME}/${CI_COMMIT_PULL_REQUEST} ($( env TZ=Europe/Zurich date +"%d.%m.%Y %Z" )) [SKIP CI]"
- git push --set-upstream upstream ${CI_REPO_NAME,,}/${CI_COMMIT_PULL_REQUEST} -f
- name: "Comment on Success"
image: mcs94/gitea-comment
when:
- status: ["success"]
settings:
gitea_address: https://codeberg.org
gitea_token:
from_secret: BOT_TOKEN
comment: |-
Pull request Preview Ready!
| Name | Value |
|--------|--------------------------------------------------------------------------|
| Commit | ${CI_COMMIT_SHA} |
| Link | https://preview.andre601.ch/@${CI_REPO_NAME,,}~${CI_COMMIT_PULL_REQUEST} |
- name: "Comment on Failure"
image: mcs94/gitea-comment
when:
- status: ["failure"]
settings:
gitea_address: https://codeberg.org
gitea_token:
from_secret: BOT_TOKEN
comment: |-
Pull request Preview **failed**!
Please check the CI logs for details: ${CI_PIPELINE_URL}
+46
View File
@@ -0,0 +1,46 @@
when:
- event: tag
branch: ${CI_REPO_DEFAULT_BRANCH}
steps:
- name: "Build Jar and Upload"
image: maven:3.9.9-eclipse-temurin-21
secrets:
- modrinth_api_token
- hangar_api_token
- discord_webhook_url
environment:
CODEBERG_API_TOKEN:
from_secret: cb_token
commands:
- mvn clean install
- cd version-uploader/target
- mv VersionUploader.jar ../../
- cd ../../
- java -jar VersionUploader.jar --all
- name: "Upload Jars to Codeber"
image: woodpeckerci/plugin-gitea-release
settings:
base_url: https://codeberg.org
files:
- "bungeecord/target/AdvancedServerList-*.jar"
- "paper/target/AdvancedServerList-*.jar"
- "velocity/target/AdvancedServerList-*.jar"
- "addons/banplugins/target/AdvancedServerList-*.jar"
api_key:
from_secret: cb_token
- name: "Create Post on Mastodon"
image: woodpeckerci/plugin-mastodon-post
when:
- status: ["success"]
settings:
server_url: https://swiss.social
access_token:
from_secret: mastodon_token
status: |-
#AdvancedServerList was updated to ${CI_COMMIT_TAG} and can be downloaded from #Modrinth, #Hangar and #Codeberg!
Modrinth - https://modrinth.com/plugin/advancedserverlist
Hangar - https://hangar.papermc.io/Andre_601/AdvancedServerList
Codeberg - https://codeberg.org/Andre601/AdvancedServerList
visibility: public
+36
View File
@@ -0,0 +1,36 @@
when:
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
path:
include: [".woodpecker/publish_docs.yml", "docs/**", "mkdocs.yml", "requirements.txt"]
variables:
setup_git: &setup_git
- apk add git
- git config --global user.email "andre_601-bot@noreply.codeberg.org"
- git config --global user.name "ASL Docs Builder"
steps:
- name: "Clone target Repository"
image: alpine:3.20.3
commands:
- chmod -R a+w .
- <<: *setup_git
- git clone -b pages https://codeberg.org/Andre601/asl-docs.git site
- chmod -R a+w site
- name: "Build Docs"
image: woodpeckerci/plugin-mkdocs:latest
settings:
pip_install_file: requirements.txt
- name: "Commit and Push"
image: alpine:3.20.3
secrets:
- bot_token
commands:
- <<: *setup_git
- mv domains site/.domains
- cd site
- git remote set-url origin https://$BOT_TOKEN@codeberg.org/Andre601/asl-docs.git
- git add --all
- git commit -m "Update AdvancedServerList Docs ($( env TZ=Europe/Zurich date +"%d.%m.%Y %Z" )) [SKIP CI]"
- git push
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 Andre_601
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
+103 -57
View File
@@ -1,67 +1,113 @@
# AdvancedServerList
![platform] ![tested]
AdvancedServerList is a plugin made for SpigotMC, PaperMC, BungeeCord/Waterfall and Velocity. It allows you to create server list profiles to display based on priority and conditions.
## What is a Server List Profile?
A Server List Profile is a YAML file located in the plugin’s profiles folder having a priority, conditions (Optional), MOTD, Player count text, hover for player count and hiding the player count completely (Changing it to ???)
> [*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 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 value.
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 using its %<identifier>_<values>% 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.
Depending on the option you use can you use more advanced formatting options such as HEX colours and gradients (Only available for the motd option).
> [Read More][minimessage]
AdvancedServerList is a plugin designed to allow the largest possible customization for your server's appearance in a Player's multiplayer screen.
The plugin offers extensive customization including changing the MOTD, player count text, player count hover and favicon of your server. All while also allowing you to create multiple profiles with priorities and conditions to set when a specific profile should be displayed.
## Downloads
AdvancedServerList can be downloaded from the following places:
[![dl-modrinth]][modrinth] [![dl-spigot]][spigot] [![dl-hangar]][hangar]
<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="48" 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="48" alt="hangar" title="Available on Hangar">
</a>
## Supported Platforms
<a href="https://papermc.io" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/paper_vector.svg" height="48" alt="platform-paper" title="Tested on Paper">
</a>
<br>
<a href="https://www.spigotmc.org" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/bungeecord_vector.svg" height="48" alt="platform-bungeecord" title="Tested on BungeeCord">
</a>
<br>
<a href="https://www.papermc.io" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/waterfall_vector.svg" height="48" alt="platform-waterfall" title="Tested on Waterfall">
</a>
<br>
<a href="https://velocitypowered.com" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/supported/velocity_vector.svg" height="48" alt="platform-velocity" title="Tested on Velocity">
</a>
## Server List Profiles
A Server List Profile is a single YAML file located in the plugin's `profiles` folder. It contains settings that allow you to modify the server's appearance within a Player's multiplayer screen.
### Priority and Conditions
Each file has a priority and optional condition. The priority is used to determine what file AdvancedServerList should use first - starting from highest number to lowest - with conditions being used to set when the profile should be used.
Once a profile has been found with a condition returning true - which is the default should there be no condition - will AdvancedServerList use said profile.
> *Read more about [Priority](https://asl.andre601.ch/profiles/#priority) and [Conditions](https://asl.andre601.ch/profiles/#condition)*
### Placeholders
AdvancedServerList supports two sets of placeholders. The first one being its own placeholders using the `${<type> <values>}` format adobted from BungeeTabListPlus and the second one being placeholders from PlaceholderAPI using its `%<identifier>_<values>%` placeholder format.
Note that internal placeholders can be used in all text-based options of a profile, while PlaceholderAPI placeholders can be used in all text-based options except the `condition` one.
As a final note can plugins provide their own placeholders to use within AdvancedServerList by using its API.
> *Read more about [Placeholders](https://asl.andre601.ch/profiles/placeholders/)*
### Formatting
AdvancedServerList utilizes the MiniMessage formatting to handle colors and formatting of text. This option was chosen over legacy formatting - using `&` character - for being more clear and readable in its design, not to mention having an easier way for more complex features such as RGB gradients.
> *Read more about [Formatting](https://asl.andre601.ch/profiles/formatting/)*
## Dependencies
AdvancedServerList soft-depends on the following plugins, meaning their inclusion is not required.
| Plugin | Supported Platforms |
|-------------------------------------------------------------------------|----------------------------------------|
| [PlaceholderAPI](https://hangar.papermc.io/HelpChat/PlaceholderAPI) | Paper |
| [ViaVersion](https://hangar.papermc.io/ViaVersion/ViaVersion) | Paper |
| [PAPIProxyBridge](https://hangar.papermc.io/William278/PAPIProxyBridge) | BungeeCord, Waterfall, Velocity |
| [Maintenance](https://hangar.papermc.io/kennytv/Maintenance) | Paper, BungeeCord, Waterfall, Velocity |
## Statistics
The plugin sends statistics to [bStats](https://bstats.org) to show.
You can disable the sending of statistics in the global bStats config located inside `/plugins/bstats/`.
You can find the bStats pages of the plugin for the following platforms:
- [Paper](https://bstats.org/plugin/bungeecord/AdvancedServerList/15584)
- [BungeeCord, Waterfall](https://bstats.org/plugin/bungeecord/AdvancedServerList/15585)
- [Velocity](https://bstats.org/plugin/velocity/AdvancedServerList/15587)
## Videos
Below can you find a collection of videos made for my plugin. If you made a video and it isn't shown here, let me know and I'll add it.
<details><summary>Click to show/hide Videos</summary>
<p>
Spanish Video by Ajneb97
[![video thumbnail](https://img.youtube.com/vi/rIbljm_4HVI/0.jpg)](https://youtube.com/watch?v=rIbljm_4HVI)
</p>
</details>
## Screenshots
Here are screenshots showing the plugin in action. Do you have your own screenshots that you would like to share? Let me know and I may add them here with proper credit.
![showcase]
<a href="https://modrinth.com/plugin/advancedserverlist/gallery" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/documentation/modrinth-gallery_vector.svg" height="48" alt="gallery" title="Check out the Gallery">
</a>
![features]
## Support
<!-- Links -->
[profiles]: https://github.com/Andre601/AdvancedServerList/wiki/Profiles
[conditions]: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#conditions
[placeholders]: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#placeholders
[minimessage]: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#minimessage
[modrinth]: https://modrinth.com/mod/advancedserverlist
[spigot]: https://www.spigotmc.org/resources/102910/
[hangar]: https://hangar.benndorf.dev/Andre_601/AdvancedServerList
<!-- images -->
[showcase]: https://cdn.discordapp.com/attachments/417019799365746690/990379003250626580/unknown.png
[features]: https://cdn.discordapp.com/attachments/990389158944055366/1004042735973568522/2022-08-02_17.03.40.jpg
<!-- Badges -->
[platform]: https://img.shields.io/badge/Platforms-Spigot%20%7C%20PaperMC%20%7C%20BungeeCord%20%7C%20Velocity-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTEuMDYzIDEuNDU2YTEuNzUgMS43NSAwIDAxMS44NzQgMGw4LjM4MyA1LjMxNmExLjc1IDEuNzUgMCAwMTAgMi45NTZsLTguMzgzIDUuMzE2YTEuNzUgMS43NSAwIDAxLTEuODc0IDBMMi42OCA5LjcyOGExLjc1IDEuNzUgMCAwMTAtMi45NTZsOC4zODMtNS4zMTZ6bTEuMDcxIDEuMjY3YS4yNS4yNSAwIDAwLS4yNjggMEwzLjQ4MyA4LjAzOWEuMjUuMjUgMCAwMDAgLjQyMmw4LjM4MyA1LjMxNmEuMjUuMjUgMCAwMC4yNjggMGw4LjM4My01LjMxNmEuMjUuMjUgMCAwMDAtLjQyMmwtOC4zODMtNS4zMTZ6Ij48L3BhdGg+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMS44NjcgMTIuMzI0YS43NS43NSAwIDAxMS4wMzUtLjIzMmw4Ljk2NCA1LjY4NWEuMjUuMjUgMCAwMC4yNjggMGw4Ljk2NC01LjY4NWEuNzUuNzUgMCAwMS44MDQgMS4yNjdsLTguOTY1IDUuNjg1YTEuNzUgMS43NSAwIDAxLTEuODc0IDBsLTguOTY1LTUuNjg1YS43NS43NSAwIDAxLS4yMzEtMS4wMzV6Ij48L3BhdGg+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMS44NjcgMTYuMzI0YS43NS43NSAwIDAxMS4wMzUtLjIzMmw4Ljk2NCA1LjY4NWEuMjUuMjUgMCAwMC4yNjggMGw4Ljk2NC01LjY4NWEuNzUuNzUgMCAwMS44MDQgMS4yNjdsLTguOTY1IDUuNjg1YTEuNzUgMS43NSAwIDAxLTEuODc0IDBsLTguOTY1LTUuNjg1YS43NS43NSAwIDAxLS4yMzEtMS4wMzV6Ij48L3BhdGg+PC9zdmc+
[tested]: https://img.shields.io/badge/Tested%20Versions-1.19%20%7C%201.19.1%20%7C%201.19.2-blue?style=for-the-badge&logo=image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSI+PHBhdGggZD0iTTE3LjI4IDkuMjhhLjc1Ljc1IDAgMDAtMS4wNi0xLjA2bC01Ljk3IDUuOTctMi40Ny0yLjQ3YS43NS43NSAwIDAwLTEuMDYgMS4wNmwzIDNhLjc1Ljc1IDAgMDAxLjA2IDBsNi41LTYuNXoiPjwvcGF0aD48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjc1IDJBMS43NSAxLjc1IDAgMDAyIDMuNzV2MTYuNWMwIC45NjYuNzg0IDEuNzUgMS43NSAxLjc1aDE2LjVBMS43NSAxLjc1IDAgMDAyMiAyMC4yNVYzLjc1QTEuNzUgMS43NSAwIDAwMjAuMjUgMkgzLjc1ek0zLjUgMy43NWEuMjUuMjUgMCAwMS4yNS0uMjVoMTYuNWEuMjUuMjUgMCAwMS4yNS4yNXYxNi41YS4yNS4yNSAwIDAxLS4yNS4yNUgzLjc1YS4yNS4yNSAwIDAxLS4yNS0uMjVWMy43NXoiPjwvcGF0aD48L3N2Zz4=
[dl-modrinth]: https://img.shields.io/badge/Modrinth-30b27b?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEuNSIgY2xpcC1ydWxlPSJldmVub2RkIiB2aWV3Qm94PSIwIDAgNjggNjgiPjxwYXRoIGZpbGw9Im5vbmUiIGQ9Ik0uMDUgMGg2NnY2NmgtNjZ6Ii8+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBkPSJNLjA1IDBoNjZ2NjZoLTY2eiIvPjwvY2xpcFBhdGg+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48Y2xpcFBhdGggaWQ9ImIiPjxjaXJjbGUgY3g9IjMzLjA1IiBjeT0iMzMiIHI9IjMzIi8+PC9jbGlwUGF0aD48ZyBjbGlwLXBhdGg9InVybCgjYikiPjxjbGlwUGF0aCBpZD0iYyI+PHBhdGggZD0iTTgzLjA1LTE3aC0xMDBWODNoMTAwVi0xN1pNMjkuMDUxIDMyLjI5NWwuMDc3IDEuNzU3IDguODI5IDMyLjk2MyA3Ljg0NC0yLjEwMi04LjU5Ny0zMi4wOTRMNDMuMDA5LS4xMTNsLTcuOTk3LTEuNDEtNS45NjEgMzMuODE4WiIvPjwvY2xpcFBhdGg+PGcgY2xpcC1wYXRoPSJ1cmwoI2MpIj48cGF0aCBmaWxsPSIjRkZGIiBkPSJNMzMuMDUgMGMxOC4yMDYgMCAzMi45ODggMTQuNzg3IDMyLjk4OCAzM1M1MS4yNTYgNjYgMzMuMDUgNjZDMTQuODQzIDY2IC4wNjEgNTEuMjEzLjA2MSAzM1MxNC44NDMgMCAzMy4wNSAwWm0wIDljMTMuMjQgMCAyMy45ODggMTAuNzU1IDIzLjk4OCAyNFM0Ni4yOSA1NyAzMy4wNSA1N0MxOS44MDkgNTcgOS4wNjEgNDYuMjQ1IDkuMDYxIDMzUzE5LjgwOSA5IDMzLjA1IDlaIi8+PC9nPjxjbGlwUGF0aCBpZD0iZCI+PHBhdGggZD0iTS0xNi45NS0xN3Y0Nmg1MGwxLjM2OC4yNDFMODIuMDUgNDYuNTc4bC0yLjczNyA3LjUxN0wzMi4zNDQgMzdILTE2Ljk1djQ2aDEwMFYtMTdoLTEwMFoiLz48L2NsaXBQYXRoPjxnIGNsaXAtcGF0aD0idXJsKCNkKSI+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTMzLjA1LTE3YzI3LjU5NSAwIDUwIDIyLjQwNCA1MCA1MHMtMjIuNDA1IDUwLTUwIDUwYy0yNy41OTYgMC01MC0yMi40MDQtNTAtNTBzMjIuNDA0LTUwIDUwLTUwWm0wIDljMjIuNjI4IDAgNDEgMTguMzcxIDQxIDQxcy0xOC4zNzIgNDEtNDEgNDFjLTIyLjYyOSAwLTQxLTE4LjM3MS00MS00MXMxOC4zNzEtNDEgNDEtNDFaIi8+PC9nPjxjbGlwUGF0aCBpZD0iZSI+PHBhdGggZD0iTTMzLjA1LTE3YzI3LjU5NSAwIDUwIDIyLjQwNCA1MCA1MHMtMjIuNDA1IDUwLTUwIDUwYy0yNy41OTYgMC01MC0yMi40MDQtNTAtNTBzMjIuNDA0LTUwIDUwLTUwWm0wIDM5LjU0OWM1Ljc2NyAwIDEwLjQ1IDQuNjgzIDEwLjQ1IDEwLjQ1MSAwIDUuNzY4LTQuNjgzIDEwLjQ1MS0xMC40NSAxMC40NTEtNS43NjggMC0xMC40NTEtNC42ODMtMTAuNDUxLTEwLjQ1MSAwLTUuNzY4IDQuNjgzLTEwLjQ1MSAxMC40NTEtMTAuNDUxWiIvPjwvY2xpcFBhdGg+PGcgY2xpcC1wYXRoPSJ1cmwoI2UpIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iOSIgZD0ibTMzLjA1IDMzLTQ0LjgyOSAyNS44ODIiLz48L2c+PGNsaXBQYXRoIGlkPSJmIj48cGF0aCBkPSJNMzMuMDUtMTdjMjcuNTk1IDAgNTAgMjIuNDA0IDUwIDUwcy0yMi40MDUgNTAtNTAgNTBjLTI3LjU5NiAwLTUwLTIyLjQwNC01MC01MHMyMi40MDQtNTAgNTAtNTBabTAgMjUuMzZjMTMuNTk5IDAgMjQuNjQgMTEuMDQxIDI0LjY0IDI0LjY0UzQ2LjY0OSA1Ny42NCAzMy4wNSA1Ny42NEMxOS40NSA1Ny42NCA4LjQwOSA0Ni41OTkgOC40MDkgMzNTMTkuNDUgOC4zNiAzMy4wNSA4LjM2WiIvPjwvY2xpcFBhdGg+PGcgY2xpcC1wYXRoPSJ1cmwoI2YpIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNGRkYiIHN0cm9rZS13aWR0aD0iOSIgZD0ibTMzLjA1IDMzIDUwLTEzLjM5NyIvPjwvZz48cGF0aCBmaWxsPSIjRkZGIiBkPSJNMjAuMjkzIDM1Ljc0NiAxOC4wNSAyOGw4LTkgMTEtMyA0IDQtNiA2LTQgMS0zIDQgMS4xMiA0LjI0IDMuMTEyIDMuMDkgNC45NjQtLjU5OCAyLjg2Ni0yLjk2NCA4LjE5Ni0yLjE5NiAxLjQ2NCA1LjQ2NC04LjA5OCA4LjAyNkwyOS44OCA0OC40OWwtNS41ODctNS44MTUtNC02LjkyOVoiLz48L2c+PC9nPjwvc3ZnPg==
[dl-spigot]: https://img.shields.io/badge/Spigot-ed8106?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBmaWxsPSIjRkZGIj48cGF0aCBkPSJNNDE2IDQ4MGMwIDE3LjYyIDE0LjM4IDMyIDMyIDMyczMyLTE0LjM4IDMyLTMycy0zMi02NC0zMi02NFM0MTYgNDYyLjQgNDE2IDQ4MHpNMzUyIDE5MmgtMzguNTRDMjk3LjcgMTc4LjUgMjc3LjkgMTY4LjkgMjU2IDE2NFYxMTYuNUwyMjQgMTEzTDE5MiAxMTYuNVYxNjRDMTcwLjEgMTY5IDE1MC4zIDE3OC42IDEzNC41IDE5MkgxNkM3LjEyNSAxOTIgMCAxOTkuMSAwIDIwOHY5NkMwIDMxMi45IDcuMTI1IDMyMCAxNiAzMjBoOTIuNzhDMTI5LjQgMzU3LjggMTczIDM4NCAyMjQgMzg0czk0LjU5LTI2LjI1IDExNS4yLTY0SDM1MmMxNy42MiAwIDMyIDE0LjI5IDMyIDMxLjkxUzM5OC40IDM4NCA0MTYgMzg0aDY0YzE3LjYyIDAgMzItMTQuMzggMzItMzJDNTEyIDI2My42IDQ0MC40IDE5MiAzNTIgMTkyek04MS42MyA5NS44OEwyMjQgODAuODhsMTQyLjQgMTVDMzc1LjkgOTYuODggMzg0IDg5LjEyIDM4NCA3OS4xMlY0OC44OWMwLTEwLTguMTI1LTE3Ljc0LTE3LjYyLTE2Ljc0TDI1NiA0My43NVYxNkMyNTYgNy4xMjUgMjQ4LjkgMCAyNDAgMGgtMzJDMTk5LjEgMCAxOTIgNy4xMjUgMTkyIDE2djI3Ljc1TDgxLjYzIDMyLjE0QzcyLjEzIDMxLjE0IDY0IDM4Ljg5IDY0IDQ4Ljg5Vjc5LjEyQzY0IDg5LjEyIDcyLjEzIDk2Ljg4IDgxLjYzIDk1Ljg4eiIvPjwvc3ZnPg==
[dl-hangar]: https://img.shields.io/badge/Hangar%20(Beta)-444?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNDEgMjI0LjUiPjxkZWZzPjxzdHlsZT4uYXtmaWxsOm5vbmU7fS5iLC5se2ZpbGw6I2ZmZjt9LmIsLmMsLmQsLmUsLmYsLmcsLmgsLmksLmp7ZmlsbC1ydWxlOmV2ZW5vZGQ7fS5je2ZpbGw6I2ZhMDt9LmR7ZmlsbDojYWFhO30uZXtmaWxsOiM1NWY7fS5me2ZpbGw6IzVmNTt9Lmd7ZmlsbDojNjdjYmRmO30uaHtmaWxsOiNmNTU7fS5pe2ZpbGw6I2Y1Zjt9Lmp7ZmlsbDojZmY1O30ua3tmaWxsOiM0NDQ7fTwvc3R5bGU+PC9kZWZzPjxyZWN0IGNsYXNzPSJhIiB4PSIyMS4yIiB5PSIxMy42IiB3aWR0aD0iMjE0LjciIGhlaWdodD0iMTk5Ljk0Ii8+PHBhdGggY2xhc3M9ImIiIGQ9Ik01NTAuOCwzOTkuNSwzOTEuMiw0NzUuMyw0NzIuNSw2MjRsMTU5LjYtNzUuOEw1NTAuOCwzOTkuNVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zOTEuMiAtMzk5LjUpIi8+PHBhdGggY2xhc3M9ImMiIGQ9Ik01NTcsNDAxLjYsMzkzLjQsNDY5LjVsNzIuOCwxNTIuNEw2MjkuOSw1NTRaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzkxLjIgLTM5OS41KSIvPjxwYXRoIGNsYXNzPSJkIiBkPSJNNTYzLjIsNDA0LDM5NS45LDQ2My44bDY0LjIsMTU1LjgsMTY3LjMtNTkuOFoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zOTEuMiAtMzk5LjUpIi8+PHBhdGggY2xhc3M9ImUiIGQ9Ik01NjkuMiw0MDYuNiwzOTguOCw0NTguMmw1NS4zLDE1OC43LDE3MC40LTUxLjZMNTY5LjIsNDA2LjZaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzkxLjIgLTM5OS41KSIvPjxwYXRoIGNsYXNzPSJmIiBkPSJNNTc1LDQwOS42LDQwMiw0NTIuOGw0Ni4zLDE2MS4xLDE3My4xLTQzLjFaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMzkxLjIgLTM5OS41KSIvPjxwYXRoIGNsYXNzPSJnIiBkPSJNNTgxLjEsNDEyLjVsLTE3NS41LDM1TDQ0My4yLDYxMWwxNzUuNS0zNUw1ODEuMSw0MTIuNVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zOTEuMiAtMzk5LjUpIi8+PHBhdGggY2xhc3M9ImgiIGQ9Ik01ODYuMSw0MTYuMyw0MDkuMiw0NDIuNGwyOCwxNjQuOCwxNzYuOS0yNi4xLTI4LTE2NC44WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM5MS4yIC0zOTkuNSkiLz48cGF0aCBjbGFzcz0iaSIgZD0iTTU5MS40LDQyMC4xLDQxMy4yLDQzNy41bDE4LjcsMTY2TDYxMC4xLDU4Niw1OTEuNCw0MjAuMVoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zOTEuMiAtMzk5LjUpIi8+PHBhdGggY2xhc3M9ImoiIGQ9Ik01OTYuNCw0MjQuMWwtMTc4LjksOC43LDkuNCwxNjYuNiwxNzguOS04LjctOS40LTE2Ni42WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM5MS4yIC0zOTkuNSkiLz48cmVjdCBjbGFzcz0iayIgeD0iMzAuOSIgeT0iMjguOCIgd2lkdGg9IjE3OS4yIiBoZWlnaHQ9IjE2Ni44OCIvPjxwYXRoIGNsYXNzPSJsIiBkPSJNNTU0LjcsNTAyLjdjLTkuNy0zLjYtMjQsMTAuMi0zMSwzMS40YTgzLjksODMuOSwwLDAsMC0zLjUsMzUuOWwtNC41LTEuOWMtOC42LTI2LjctMy44LTU1LjksMTEuMS03N1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zOTEuMiAtMzk5LjUpIi8+PHBhdGggY2xhc3M9ImwiIGQ9Ik01NjEsNTQ4LjNsLTMzLjItMTMuN2M2LjEtMTguNSwxNy40LTI5LjYsMjQuNy0yOS42YTcuOCw3LjgsMCwwLDEsMi4yLjRsLjYuM2MyLjYsMS4yLDEwLjUsOCw1LjcsNDIuNiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM5MS4yIC0zOTkuNSkiLz48cGF0aCBjbGFzcz0ibCIgZD0iTTU0OS4xLDQ2Ni4yYTczLjQsNzMuNCwwLDAsMC0yNS44LDIzLjRjLTE0LjYsMjEuMi0xOS42LDQ5LjktMTIsNzYuN2E4Mi4yLDgyLjIsMCwwLDAsMy4zLDkuNWwtNDQuNS0xOC40Yy0xNi44LTQxLjItMS40LTkwLjMsMzQuNS0xMDkuN1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zOTEuMiAtMzk5LjUpIi8+PC9zdmc+Cg==
<a href="https://discord.gg/MyPTjpsgGH" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/social/discord-singular_vector.svg" height="48" alt="discord" title="Join the M.O.S.S. Discord Server">
</a>
<br>
<a href="https://app.revolt.chat/invite/74TpERXA" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/social/revolt-singular_vector.svg" height="48" alt="revolt" title="Join my Revolt Server">
</a>
<br>
<a href="https://blobfox.coffee/@andre_601" target="_blank">
<img src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/compact/social/mastodon-singular_vector.svg" height="48" alt="revolt" title="Chat with me on Mastodon">
</a>
+135
View File
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ MIT License
~
~ Copyright (c) 2022-2024 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.
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>parent</artifactId>
<groupId>ch.andre601.advancedserverlist</groupId>
<version>parent</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>banplugins</artifactId>
<packaging>jar</packaging>
<version>${plugin.version}</version>
<properties>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>libertybans</id>
<url>https://mvn-repo.arim.space/affero-gpl3/</url>
</repository>
</repositories>
<dependencies>
<!-- Proxy/Server -->
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.20-R0.2</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.20-R0.2</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.velocitypowered</groupId>
<artifactId>velocity-api</artifactId>
<version>3.3.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- Plugin APIs -->
<dependency>
<groupId>com.github.DevLeoko</groupId>
<artifactId>AdvancedBan</artifactId>
<version>v2.3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>space.arim.libertybans</groupId>
<artifactId>bans-api</artifactId>
<version>1.1.0-RC1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.gitlab.ruany</groupId>
<artifactId>LiteBansAPI</artifactId>
<version>0.5.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>api</artifactId>
<version>${api.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>AdvancedServerList-BanPlugins-Addon-${plugin.version}</finalName>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,70 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.banplugins.placeholders.AdvancedBanPlaceholders;
import ch.andre601.advancedserverlist.banplugins.placeholders.LibertyBansPlaceholders;
import ch.andre601.advancedserverlist.banplugins.placeholders.LiteBansPlaceholders;
public enum BanPluginsList{
ADVANCED_BAN("AdvancedBan", new AdvancedBanPlaceholders(), true, true, false),
LIBERTY_BANS("LibertyBans", new LibertyBansPlaceholders(), true, true, true),
LITE_BANS("LiteBans", new LiteBansPlaceholders(), true, true, true);
private final String name;
private final PlaceholderProvider placeholderProvider;
private final boolean paper, bungeecord, velocity;
BanPluginsList(String name, PlaceholderProvider placeholderProvider, boolean paper, boolean bungeecord, boolean velocity){
this.name = name;
this.placeholderProvider = placeholderProvider;
this.paper = paper;
this.bungeecord = bungeecord;
this.velocity = velocity;
}
public String getName(){
return name;
}
public PlaceholderProvider getPlaceholderProvider(){
return placeholderProvider;
}
public boolean supportsPaper(){
return paper;
}
public boolean supportsBungeeCord(){
return bungeecord;
}
public boolean supportsVelocity(){
return velocity;
}
}
@@ -0,0 +1,68 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.bungeecord;
import ch.andre601.advancedserverlist.api.AdvancedServerListAPI;
import ch.andre601.advancedserverlist.banplugins.BanPluginsList;
import net.md_5.bungee.api.plugin.Plugin;
public class BungeeCordBanPluginsAddon extends Plugin{
@Override
public void onEnable(){
if(getProxy().getPluginManager().getPlugin("AdvancedServerList") == null){
getLogger().warning("AdvancedServerList is not enabled. This plugin requires it to function!");
return;
}
int loadedPlaceholders = loadPlaceholderProviders();
if(loadedPlaceholders == 0){
getLogger().warning("No compatible Ban plugin was found to register placeholders for.");
}else{
getLogger().info("Loaded " + loadedPlaceholders + " Placeholder Set(s) for AdvancedServerList!");
}
}
private int loadPlaceholderProviders(){
int loaded = 0;
AdvancedServerListAPI api = AdvancedServerListAPI.get();
for(BanPluginsList entry : BanPluginsList.values()){
if(!entry.supportsBungeeCord())
continue;
if(getProxy().getPluginManager().getPlugin(entry.getName()) != null){
getLogger().info("Registering Placeholders for " + entry.getName() + "...");
api.addPlaceholderProvider(entry.getPlaceholderProvider());
getLogger().info("Placeholders successfully registered!");
loaded++;
}
}
return loaded;
}
}
@@ -0,0 +1,71 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.paper;
import ch.andre601.advancedserverlist.api.AdvancedServerListAPI;
import ch.andre601.advancedserverlist.banplugins.BanPluginsList;
import org.bukkit.plugin.java.JavaPlugin;
public class PaperBanPluginsAddon extends JavaPlugin{
@Override
public void onEnable(){
if(!getServer().getPluginManager().isPluginEnabled("AdvancedServerList")){
getLogger().warning("AdvancedServerList is not enabled. This plugin requires it to function!");
getServer().getPluginManager().disablePlugin(this);
return;
}
int loadedPlaceholders = loadPlaceholderProviders();
if(loadedPlaceholders == 0){
getLogger().warning("No compatible Ban plugin was found to register placeholders for. Disabling plugin...");
getServer().getPluginManager().disablePlugin(this);
}else{
getLogger().info("Loaded " + loadedPlaceholders + " Placeholder Set(s) for AdvancedServerList!");
}
}
private int loadPlaceholderProviders(){
int loaded = 0;
AdvancedServerListAPI api = AdvancedServerListAPI.get();
for(BanPluginsList entry : BanPluginsList.values()){
if(!entry.supportsPaper())
continue;
if(getServer().getPluginManager().isPluginEnabled(entry.getName())){
getLogger().info("Registering Placeholders for " + entry.getName() + "...");
api.addPlaceholderProvider(entry.getPlaceholderProvider());
getLogger().info("Placeholders successfully registered!");
loaded++;
}
}
return loaded;
}
}
@@ -0,0 +1,87 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.placeholders;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.banplugins.providers.AdvancedBanProvider;
public class AdvancedBanPlaceholders extends PlaceholderProvider{
private AdvancedBanProvider provider = null;
public AdvancedBanPlaceholders(){
super("advancedban");
}
@Override
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server){
if(provider == null)
provider = new AdvancedBanProvider();
String[] args = placeholder.split("\\s", 2);
return switch(args[0]) {
// Mute-related placeholders
case "isMuted" -> provider.muted(player);
case "muteReason" -> provider.muteReason(player);
case "muteDuration" -> {
if(args.length == 1)
yield provider.muteDuration(player);
boolean fromStart = Boolean.getBoolean(args[1]);
yield provider.muteDuration(player, fromStart);
}
case "muteExpiration" -> {
if(args.length == 1)
yield provider.muteExpirationDate(player);
yield provider.banExpirationDate(player, args[1]);
}
// Ban-related placeholders
case "isBanned" -> provider.banned(player);
case "banReason" -> provider.banReason(player);
case "banDuration" -> {
if(args.length == 1)
yield provider.banDuration(player);
boolean fromStart = Boolean.getBoolean(args[1]);
yield provider.banDuration(player, fromStart);
}
case "banExpiration" -> {
if(args.length == 1)
yield provider.banExpirationDate(player);
yield provider.banExpirationDate(player, args[1]);
}
// Unknown/Invalid placeholder.
default -> null;
};
}
}
@@ -0,0 +1,73 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.placeholders;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.banplugins.providers.LibertyBansProvider;
public class LibertyBansPlaceholders extends PlaceholderProvider{
private LibertyBansProvider provider = null;
public LibertyBansPlaceholders(){
super("libertybans");
}
@Override
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server){
if(provider == null)
provider = LibertyBansProvider.create();
String[] args = placeholder.split("\\s", 2);
return switch(args[0]){
// Mute-related placeholders
case "isMuted" -> provider.muted(player);
case "muteReason" -> provider.muteReason(player);
case "muteExpiration" -> {
if(args.length == 1)
yield provider.muteExpirationDate(player);
yield provider.muteExpirationDate(player, args[1]);
}
// Ban-related placeholders
case "isBanned" -> provider.banned(player);
case "banReason" -> provider.banReason(player);
case "banExpiration" -> {
if(args.length == 1)
yield provider.banExpirationDate(player);
yield provider.banExpirationDate(player, args[1]);
}
// Unknown/Invalid placeholder
default -> null;
};
}
}
@@ -0,0 +1,87 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.placeholders;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.banplugins.providers.LiteBansProvider;
import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
public class LiteBansPlaceholders extends PlaceholderProvider{
private LiteBansProvider provider = null;
public LiteBansPlaceholders(){
super("litebans");
}
@Override
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server){
if(provider == null)
provider = new LiteBansProvider();
String[] args = placeholder.split("\\s", 2);
CompletableFuture<String> future = CompletableFuture.supplyAsync(() ->
switch(args[0]){
// Mute-related placeholders
case "isMuted" -> provider.muted(player);
case "muteReason" -> provider.muteReason(player);
case "muteDuration" -> provider.muteDuration(player);
case "muteExpiration" -> {
if(args.length == 1)
yield provider.muteExpirationDate(player);
yield provider.muteExpirationDate(player, args[1]);
}
// Ban-related placeholders
case "isBanned" -> provider.banned(player);
case "banReason" -> provider.banReason(player);
case "banDuration" -> provider.banDuration(player);
case "banExpiration" -> {
if(args.length == 1)
yield provider.banExpirationDate(player);
yield provider.banExpirationDate(player, args[1]);
}
//Unknown/Invalid placeholder
default -> null;
}
);
try{
return future.join();
}catch(CancellationException | CompletionException ex){
return null;
}
}
}
@@ -0,0 +1,139 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.providers;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import com.google.common.base.Strings;
import com.google.common.primitives.UnsignedLongs;
import me.leoko.advancedban.manager.PunishmentManager;
import me.leoko.advancedban.utils.Punishment;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
public class AdvancedBanProvider implements PunishmentProvider{
private static PunishmentManager getAPI(){
return PunishmentManager.get();
}
private static String noDashesUUID(UUID uuid){
return hexString(uuid.getMostSignificantBits()) + hexString(uuid.getLeastSignificantBits());
}
private static Punishment mute(GenericPlayer player){
return getAPI().getMute(noDashesUUID(player.getUUID()));
}
private static Punishment ban(GenericPlayer player){
return getAPI().getBan(noDashesUUID(player.getUUID()));
}
private static String hexString(long unsigned){
return Strings.padStart(UnsignedLongs.toString(unsigned, 16), 16, '0');
}
@Override
public String muted(GenericPlayer player){
return String.valueOf(getAPI().isMuted(noDashesUUID(player.getUUID())));
}
@Override
public String banned(GenericPlayer player){
return String.valueOf(getAPI().isBanned(noDashesUUID(player.getUUID())));
}
@Override
public String muteReason(GenericPlayer player){
Punishment mute = mute(player);
if(mute == null)
return null;
return mute.getReason();
}
@Override
public String banReason(GenericPlayer player){
Punishment ban = ban(player);
if(ban == null)
return null;
return ban.getReason();
}
@Override
public String muteDuration(GenericPlayer player){
return muteDuration(player, false);
}
@Override
public String banDuration(GenericPlayer player){
return banDuration(player, false);
}
@Override
public String muteExpirationDate(GenericPlayer player, String pattern){
Punishment mute = mute(player);
if(mute == null)
return null;
long end = mute.getEnd();
if(end < 0L)
return "never";
return this.returnDate(pattern, end);
}
@Override
public String banExpirationDate(GenericPlayer player, String pattern){
Punishment ban = ban(player);
if(ban == null)
return null;
long end = ban.getEnd();
if(end < 0L)
return "never";
return this.returnDate(pattern, end);
}
public String muteDuration(GenericPlayer player, boolean fromStart){
Punishment mute = mute(player);
if(mute == null)
return null;
return mute.getDuration(fromStart);
}
public String banDuration(GenericPlayer player, boolean fromStart){
Punishment ban = ban(player);
if(ban == null)
return null;
return ban.getDuration(fromStart);
}
}
@@ -0,0 +1,136 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.providers;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import space.arim.libertybans.api.LibertyBans;
import space.arim.libertybans.api.PunishmentType;
import space.arim.libertybans.api.punish.Punishment;
import space.arim.libertybans.api.user.KnownAccount;
import space.arim.omnibus.Omnibus;
import space.arim.omnibus.OmnibusProvider;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.UUID;
public class LibertyBansProvider implements PunishmentProvider{
private final LibertyBans libertyBans;
private LibertyBansProvider(LibertyBans libertyBans){
this.libertyBans = libertyBans;
}
public static LibertyBansProvider create(){
Omnibus omnibus = OmnibusProvider.getOmnibus();
LibertyBans libertyBans = omnibus.getRegistry().getProvider(LibertyBans.class).orElseThrow();
return new LibertyBansProvider(libertyBans);
}
@Override
public String muted(GenericPlayer player){
return String.valueOf(punishment(player.getUUID(), PunishmentType.MUTE) != null);
}
@Override
public String banned(GenericPlayer player){
return String.valueOf(punishment(player.getUUID(), PunishmentType.BAN) != null);
}
@Override
public String muteReason(GenericPlayer player){
Punishment mute = punishment(player.getUUID(), PunishmentType.MUTE);
if(mute == null)
return null;
return mute.getReason();
}
@Override
public String banReason(GenericPlayer player){
Punishment ban = punishment(player.getUUID(), PunishmentType.BAN);
if(ban == null)
return null;
return ban.getReason();
}
@Override
public String muteDuration(GenericPlayer player){
return null;
}
@Override
public String banDuration(GenericPlayer player){
return null;
}
@Override
public String muteExpirationDate(GenericPlayer player, String pattern){
Punishment mute = punishment(player.getUUID(), PunishmentType.MUTE);
if(mute == null)
return null;
if(mute.isPermanent())
return "never";
return this.returnDate(pattern, mute.getEndDate().toEpochMilli());
}
@Override
public String banExpirationDate(GenericPlayer player, String pattern){
Punishment ban = punishment(player.getUUID(), PunishmentType.BAN);
if(ban == null)
return null;
if(ban.isPermanent())
return "never";
return this.returnDate(pattern, ban.getEndDate().toEpochMilli());
}
private Punishment punishment(UUID uuid, PunishmentType type){
List<? extends KnownAccount> accounts = libertyBans.getAccountSupervisor()
.findAccountsMatching(uuid)
.join();
if(accounts.isEmpty())
return null;
KnownAccount sorted = Collections.max(accounts, Comparator.comparing(KnownAccount::recorded));
return libertyBans.getSelector()
.selectionByApplicabilityBuilder(sorted.uuid(), sorted.address())
.type(type)
.build()
.getFirstSpecificPunishment()
.toCompletableFuture()
.join()
.orElse(null);
}
}
@@ -0,0 +1,103 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.providers;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import litebans.api.Database;
import litebans.api.Entry;
public class LiteBansProvider implements PunishmentProvider{
@Override
public String muted(GenericPlayer player){
return String.valueOf(Database.get().isPlayerMuted(player.getUUID(), null));
}
@Override
public String banned(GenericPlayer player){
return String.valueOf(Database.get().isPlayerBanned(player.getUUID(), null));
}
@Override
public String muteReason(GenericPlayer player){
Entry mute = Database.get().getMute(player.getUUID(), null, null);
if(mute == null)
return null;
return mute.getReason();
}
@Override
public String banReason(GenericPlayer player){
Entry ban = Database.get().getBan(player.getUUID(), null, null);
if(ban == null)
return null;
return ban.getReason();
}
@Override
public String muteDuration(GenericPlayer player){
Entry mute = Database.get().getMute(player.getUUID(), null, null);
if(mute == null)
return null;
return mute.getDurationString();
}
@Override
public String banDuration(GenericPlayer player){
Entry ban = Database.get().getBan(player.getUUID(), null, null);
if(ban == null)
return null;
return ban.getDurationString();
}
@Override
public String muteExpirationDate(GenericPlayer player, String pattern){
Entry mute = Database.get().getMute(player.getUUID(), null, null);
if(mute == null)
return null;
if(mute.isPermanent())
return "never";
return this.returnDate(pattern, mute.getDateEnd());
}
@Override
public String banExpirationDate(GenericPlayer player, String pattern){
Entry ban = Database.get().getBan(player.getUUID(), null, null);
if(ban == null)
return null;
if(ban.isPermanent())
return "never";
return this.returnDate(pattern, ban.getDateEnd());
}
}
@@ -0,0 +1,68 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.providers;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import java.text.SimpleDateFormat;
import java.util.Date;
public interface PunishmentProvider{
String muted(GenericPlayer player);
String banned(GenericPlayer player);
String muteReason(GenericPlayer player);
String banReason(GenericPlayer player);
String muteDuration(GenericPlayer player);
String banDuration(GenericPlayer player);
default String muteExpirationDate(GenericPlayer player){
return muteExpirationDate(player, "dd, MMM yyyy HH:mm:ss");
}
String muteExpirationDate(GenericPlayer player, String pattern);
default String banExpirationDate(GenericPlayer player){
return banExpirationDate(player, "dd, MMM yyyy HH:mm:ss");
}
String banExpirationDate(GenericPlayer player, String pattern);
default String returnDate(String pattern, long end){
Date date = new Date(end);
try{
return new SimpleDateFormat(pattern).format(date);
}catch(IllegalArgumentException ex){
return new SimpleDateFormat("dd, MMM yyyy HH:mm:ss").format(date);
}
}
}
@@ -0,0 +1,84 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.banplugins.velocity;
import ch.andre601.advancedserverlist.api.AdvancedServerListAPI;
import ch.andre601.advancedserverlist.banplugins.BanPluginsList;
import com.google.inject.Inject;
import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
import com.velocitypowered.api.proxy.ProxyServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Locale;
public class VelocityBanPluginsAddon{
private final Logger logger = LoggerFactory.getLogger("ASLBanPluginsAddon");
private final ProxyServer proxy;
@Inject
public VelocityBanPluginsAddon(ProxyServer proxy){
this.proxy = proxy;
}
@Subscribe
public void init(ProxyInitializeEvent event){
if(!proxy.getPluginManager().isLoaded("advancedserverlist")){
logger.warn("AdvancedServerList is not enabled. This plugin requires it to function!");
return;
}
int loadedPlaceholders = loadPlaceholderProviders();
if(loadedPlaceholders == 0){
logger.warn("No compatible Ban plugin was found to register placeholders for.");
}else{
logger.info("Loaded {} Placeholder Set(s) for AdvancedServerList!", loadedPlaceholders);
}
}
private int loadPlaceholderProviders(){
int loaded = 0;
AdvancedServerListAPI api = AdvancedServerListAPI.get();
for(BanPluginsList entry : BanPluginsList.values()){
if(!entry.supportsVelocity())
continue;
if(proxy.getPluginManager().isLoaded(entry.getName().toLowerCase(Locale.ROOT))){
logger.info("Registering Placeholders for " + entry.getName() + "...");
api.addPlaceholderProvider(entry.getPlaceholderProvider());
logger.info("Placeholders successfully registered!");
loaded++;
}
}
return loaded;
}
}
@@ -0,0 +1,12 @@
name: 'ASLBanPluginsAddon'
author: 'Andre_601'
version: '${plugin.version}'
description: 'AdvancedBan Add-on for AdvancedServerList to add placeholders to use.'
softDepends:
- AdvancedServerList
- AdvancedBan
- LibertyBans
- LiteBans
main: 'ch.andre601.advancedserverlist.banplugins.bungeecord.BungeeCordBanPluginsAddon'
@@ -0,0 +1,22 @@
name: 'ASLBanPluginsAddon'
author: 'Andre_601'
version: '${plugin.version}'
main: 'ch.andre601.advancedserverlist.banplugins.paper.PaperBanPluginsAddon'
api-version: '1.19'
dependencies:
server:
AdvancedServerList:
required: false
load: BEFORE
AdvancedBan:
required: false
load: BEFORE
LibertyBans:
required: false
load: BEFORE
LiteBans:
required: false
load: BEFORE
@@ -0,0 +1,24 @@
{
"id": "aslbanpluginsaddon",
"name": "ASLBanPluginsAddon",
"version": "${plugin.version}",
"description": "${plugin.description}",
"authors": [
"Andre_601"
],
"dependencies": [
{
"id": "advancedserverlist",
"optional": true
},
{
"id": "libertybans",
"optional": true
},
{
"id": "litebans",
"optional": true
}
],
"main": "ch.andre601.advancedserverlist.banplugins.velocity.VelocityBanPluginsAddon"
}
+62 -17
View File
@@ -2,7 +2,7 @@
<!--
~ MIT License
~
~ Copyright (c) 2022 Andre_601
~ 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
@@ -58,30 +58,78 @@
<version>${plugin.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>platform-bungeecord</artifactId>
<version>${api.version}</version>
<scope>compile</scope>
</dependency>
<!-- BungeeCord API -->
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.20-R0.2</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.2</version>
<type>javadoc</type>
<scope>provided</scope>
</dependency>
<!-- Adventure Library -->
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
<version>${dependency.adventure-api}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>${dependency.adventure-text-minimessage}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bungeecord</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
<version>${dependency.adventure-platform-bungeecord}</version>
<scope>provided</scope>
</dependency>
<!-- Metrics -->
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bungeecord</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
<scope>compile</scope>
</dependency>
<!-- Configurate -->
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>configurate-yaml</artifactId>
<version>${dependency.configurate-yaml}</version>
<scope>provided</scope>
</dependency>
<!-- Plugins -->
<dependency>
<groupId>com.github.LeonMangler</groupId>
<artifactId>PremiumVanishAPI</artifactId>
<version>2.9.0-4</version>
<scope>provided</scope>
</dependency>
<!-- Other -->
<dependency>
<groupId>com.alessiodp.libby</groupId>
<artifactId>libby-bungee</artifactId>
<version>2.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -98,33 +146,30 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.0</version>
<configuration>
<minimizeJar>true</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>org.spongepowered.configurate</pattern>
<shadedPattern>ch.andre601.advancedserverlist.bungeecord.depends.configurate</shadedPattern>
</relocation>
<relocation>
<pattern>net.kyori.adventure</pattern>
<shadedPattern>ch.andre601.advancedserverlist.bungeecord.depends.adventure</shadedPattern>
</relocation>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>ch.andre601.advancedserverlist.bungeecord.depends.bstats</shadedPattern>
</relocation>
<relocation>
<pattern>net.byteflux.libby</pattern>
<shadedPattern>ch.andre601.advancedserverlist.bungeecord.depends.libby</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -26,31 +26,77 @@
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.placeholders.BungeePlayerPlaceholders;
import ch.andre601.advancedserverlist.bungeecord.objects.placeholders.BungeeProxyPlaceholders;
import ch.andre601.advancedserverlist.bungeecord.objects.placeholders.BungeeServerPlaceholders;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginCore;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
import ch.andre601.advancedserverlist.core.profiles.handlers.FaviconHandler;
import com.alessiodp.libby.BungeeLibraryManager;
import com.alessiodp.libby.Library;
import de.myzelyam.api.vanish.BungeeVanishAPI;
import net.kyori.adventure.platform.bungeecord.BungeeAudiences;
import net.md_5.bungee.api.Favicon;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Plugin;
import org.bstats.bungeecord.Metrics;
import org.bstats.charts.SimplePie;
import java.awt.image.BufferedImage;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
public class BungeeCordCore extends Plugin implements PluginCore{
public class BungeeCordCore extends Plugin implements PluginCore<Favicon>{
private AdvancedServerList core;
private final PluginLogger logger = new BungeeLogger(getLogger());
private final PluginLogger logger = new BungeeLogger(this);
private final Map<String, ServerPing> fetchedServers = new ConcurrentHashMap<>();
private boolean successfulLoad = false;
private AdvancedServerList<Favicon> core;
private FaviconHandler<Favicon> faviconHandler = null;
private BungeeAudiences audiences = null;
private BungeeLibraryManager libraryManager = null;
@Override
public void onLoad(){
logger.info("Loading libraries. This may take a while...");
successfulLoad = loadLibs();
if(successfulLoad){
logger.info("Library loading completed successfully!");
}else{
logger.warn("Library loading completed with errors!");
}
}
@Override
public void onEnable(){
this.core = new AdvancedServerList(this);
if(!successfulLoad){
logger.warn("There were issues during the plugins Loading-phase! Please see the console for possible reasons.");
logger.warn("The plugin won't be enabled to avoid problems.");
return;
}
this.audiences = BungeeAudiences.create(this);
this.core = AdvancedServerList.init(this,
BungeePlayerPlaceholders.init(), BungeeServerPlaceholders.init(this), BungeeProxyPlaceholders.init(this));
}
@Override
public void onDisable(){
core.disable();
getProxy().getScheduler().cancel(this);
}
@Override
@@ -73,12 +119,47 @@ public class BungeeCordCore extends Plugin implements PluginCore{
}
@Override
public AdvancedServerList getCore(){
public void loadFaviconHandler(AdvancedServerList<Favicon> core){
faviconHandler = new FaviconHandler<>(core);
}
@Override
public void clearFaviconCache(){
if(faviconHandler == null)
return;
faviconHandler.cleanCache();
}
@Override
public void downloadLibrary(String groupId, String artifactId, String version){
if(libraryManager == null){
libraryManager = new BungeeLibraryManager(this);
libraryManager.addRepository("https://repo.papermc.io/repository/maven-public");
}
Library lib = Library.builder()
.groupId(groupId)
.artifactId(artifactId)
.version(version)
.resolveTransitiveDependencies(true)
.build();
libraryManager.loadLibrary(lib);
}
@Override
public void startScheduler(){
getProxy().getScheduler().schedule(this, this::fetchServers, 0, 10, TimeUnit.SECONDS);
}
@Override
public AdvancedServerList<Favicon> getCore(){
return core;
}
@Override
public Path getPath(){
public Path getFolderPath(){
return getDataFolder().toPath();
}
@@ -88,12 +169,75 @@ public class BungeeCordCore extends Plugin implements PluginCore{
}
@Override
public String getPlatformName(){
return getProxy().getName();
public FaviconHandler<Favicon> getFaviconHandler(){
if(faviconHandler == null)
faviconHandler = new FaviconHandler<>(core);
return faviconHandler;
}
@Override
public String getPlatformVersion(){
return getProxy().getVersion();
public String getPlatformInfo(){
return getProxy().getName() + " " + getProxy().getVersion();
}
@Override
public String getLoader(){
return "bungeecord";
}
@Override
public boolean isPluginEnabled(String plugin){
return getProxy().getPluginManager().getPlugin(plugin) != null;
}
@Override
public Favicon createFavicon(BufferedImage image) throws IllegalArgumentException{
return Favicon.create(image);
}
public BungeeAudiences getAudiences(){
return audiences;
}
public int getOnlinePlayers(ServerInfo server){
List<ProxiedPlayer> players = new ArrayList<>(server == null ? getProxy().getPlayers() : server.getPlayers());
// Exclude players when PremiumVanish is enabled and player is hidden.
if(getProxy().getPluginManager().getPlugin("PremiumVanish") != null){
players.removeIf(BungeeVanishAPI::isInvisible);
}
return players.size();
}
public Map<String, ServerPing> getFetchedServers(){
return fetchedServers;
}
private boolean loadLibs(){
try{
if(libraryManager == null){
libraryManager = new BungeeLibraryManager(this);
libraryManager.addRepository("https://repo.papermc.io/repository/maven-public");
}
libraryManager.configureFromJSON("dependencies.json");
return true;
}catch(Exception ex){
logger.warn("Encountered an Exception while trying to load dependencies.", ex);
return false;
}
}
private void fetchServers(){
fetchedServers.clear();
getProxy().getServers().forEach((name, server) -> server.ping((ping, throwable) -> {
if(throwable != null)
return;
fetchedServers.put(name, ping);
}));
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -25,7 +25,7 @@
package ch.andre601.advancedserverlist.bungeecord.commands;
import ch.andre601.advancedserverlist.core.interfaces.CmdSender;
import ch.andre601.advancedserverlist.core.interfaces.commands.CmdSender;
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
import net.kyori.adventure.platform.bungeecord.BungeeAudiences;
import net.md_5.bungee.api.CommandSender;
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -33,16 +33,14 @@ import net.md_5.bungee.api.plugin.Command;
public class CmdAdvancedServerList extends Command{
private final BungeeCordCore plugin;
private final BungeeAudiences audiences;
public CmdAdvancedServerList(BungeeCordCore plugin){
super("advancedserverlist", "advancedserverlist.command.asl", "asl");
this.plugin = plugin;
this.audiences = BungeeAudiences.create(plugin);
}
@Override
public void execute(CommandSender sender, String[] args){
plugin.getCore().getCommandHandler().handle(new BungeeCmdSender(sender, audiences), args);
plugin.getCore().getCommandHandler().handle(new BungeeCmdSender(sender, plugin.getAudiences()), args);
}
}
@@ -1,137 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022 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.events;
import ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import ch.andre601.advancedserverlist.bungeecord.BungeePlayer;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
import ch.andre601.advancedserverlist.core.profiles.ProfileManager;
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
import ch.andre601.advancedserverlist.core.profiles.replacer.placeholders.PlayerPlaceholders;
import ch.andre601.advancedserverlist.core.profiles.replacer.placeholders.ServerPlaceholders;
import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.event.ProxyPingEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
import net.md_5.bungee.event.EventPriority;
import java.net.InetSocketAddress;
public class PingEvent implements Listener{
private final BungeeCordCore plugin;
public PingEvent(BungeeCordCore plugin){
this.plugin = plugin;
plugin.getProxy().getPluginManager().registerListener(plugin, this);
}
@EventHandler(priority = EventPriority.LOW)
public void onProxyPing(ProxyPingEvent event){
ServerPing ping = event.getResponse();
ServerPing.Protocol protocol = ping.getVersion();
if(protocol == null)
return;
InetSocketAddress address = (InetSocketAddress)event.getConnection().getSocketAddress();
InetSocketAddress host = event.getConnection().getVirtualHost();
int online = ping.getPlayers().getOnline();
int max = ping.getPlayers().getMax();
PlayerPlaceholders playerPlaceholders = new PlayerPlaceholders(
new BungeePlayer(plugin.getCore().getPlayerHandler().getPlayerByIp(address.getHostString()), protocol.getProtocol())
);
ServerPlaceholders serverPlaceholders = new ServerPlaceholders(online, max, host == null ? null : host.getHostString());
ServerListProfile profile = ProfileManager.get(plugin.getCore())
.replacements(playerPlaceholders)
.replacements(serverPlaceholders)
.getProfile();
if(profile == null)
return;
if(profile.isOneMore()){
max = online + 1;
ping.getPlayers().setMax(max);
}
serverPlaceholders = new ServerPlaceholders(online, max, host == null ? null : host.getHostString());
if(!profile.getMotd().isEmpty()){
TextComponent component = new TextComponent(BungeeComponentSerializer.get().serialize(
ComponentParser.list(profile.getMotd())
.replacements(playerPlaceholders)
.replacements(serverPlaceholders)
.toComponent()
));
ping.setDescriptionComponent(component);
}
if(profile.shouldHidePlayers()){
ping.setPlayers(null);
ping.setFavicon(ping.getFaviconObject());
ping.setVersion(protocol);
event.setResponse(ping);
return;
}
if(!profile.getPlayerCount().isEmpty()){
protocol.setName(ComponentParser.text(profile.getPlayerCount())
.replacements(playerPlaceholders)
.replacements(serverPlaceholders)
.toString()
);
protocol.setProtocol(-1);
}
if(!profile.getPlayers().isEmpty()){
String players = ComponentParser.list(profile.getPlayers())
.replacements(playerPlaceholders)
.replacements(serverPlaceholders)
.toString();
ServerPing.PlayerInfo[] playerInfos = AdvancedServerList.getPlayers(ServerPing.PlayerInfo.class, players)
.toArray(new ServerPing.PlayerInfo[0]);
if(playerInfos.length > 0)
ping.getPlayers().setSample(playerInfos);
}
ping.setFavicon(ping.getFaviconObject());
ping.setVersion(protocol);
event.setResponse(ping);
}
}
@@ -0,0 +1,213 @@
/*
* 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.listeners;
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.bungeecord.BungeeCordCore;
import ch.andre601.advancedserverlist.bungeecord.objects.impl.BungeePlayerImpl;
import ch.andre601.advancedserverlist.bungeecord.objects.impl.BungeeProxyImpl;
import ch.andre601.advancedserverlist.core.compat.maintenance.MaintenanceUtil;
import ch.andre601.advancedserverlist.core.compat.papi.PAPIUtil;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
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 net.kyori.adventure.text.Component;
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.net.InetSocketAddress;
import java.util.List;
import java.util.Map;
import java.util.UUID;
public class BungeeEventWrapper implements GenericEventWrapper<Favicon, BungeePlayerImpl>{
private final BungeeCordCore plugin;
private final ProxyPingEvent event;
private final ServerPing.Protocol protocol;
private final ServerPing ping;
public BungeeEventWrapper(BungeeCordCore plugin, ProxyPingEvent event){
this.plugin = plugin;
this.event = event;
this.protocol = event.getResponse().getVersion();
this.ping = event.getResponse();
}
@Override
public GenericServerListEvent callEvent(ProfileEntry entry){
PreServerListSetEventImpl event = new PreServerListSetEventImpl(entry);
plugin.getProxy().getPluginManager().callEvent(event);
return event;
}
@Override
public void setMaxPlayers(int maxPlayers){
ping.getPlayers().setMax(maxPlayers);
}
@Override
public void setOnlinePlayers(int onlinePlayers){
ping.getPlayers().setOnline(onlinePlayers);
}
@Override
public void setMotd(Component component){
ping.setDescriptionComponent(new TextComponent(BungeeComponentSerializer.get().serialize(component)));
}
@Override
public void hidePlayers(){
ping.setPlayers(null);
}
@Override
public void setPlayerCount(String name){
protocol.setName(name);
protocol.setProtocol(-1);
}
@Override
public void setPlayers(List<String> lines, BungeePlayerImpl player, GenericServer server){
ServerPing.PlayerInfo[] players = new ServerPing.PlayerInfo[lines.size()];
for(int i = 0; i < players.length; i++){
String parsed = ComponentParser.text(lines.get(i))
.modifyText(text -> StringReplacer.replace(text, player, server))
.toString();
ServerPing.PlayerInfo pi = new ServerPing.PlayerInfo(parsed, UUID.randomUUID());
players[i] = pi;
}
if(players.length > 0)
ping.getPlayers().setSample(players);
}
@Override
public void setFavicon(Favicon favicon){
ping.setFavicon(favicon);
}
@Override
public void setDefaultFavicon(){
ping.setFavicon(ping.getFaviconObject());
}
@Override
public void updateEvent(){
this.ping.setVersion(this.protocol);
this.event.setResponse(this.ping);
}
@Override
public boolean isInvalidProtocol(){
return protocol == null;
}
@Override
public boolean isMaintenanceModeActive(){
if(plugin.getProxy().getPluginManager().getPlugin("Maintenance") == null)
return false;
return MaintenanceUtil.get().isMaintenanceEnabled();
}
@Override
public int getProtocolVersion(){
return event.getConnection().getVersion();
}
@Override
public int getOnlinePlayers(){
return plugin.getOnlinePlayers(null);
}
@Override
public int getMaxPlayers(){
return ping.getPlayers().getMax();
}
@Override
public String getPlayerIP(){
return ((InetSocketAddress)event.getConnection().getSocketAddress()).getHostString();
}
@Override
public String parsePAPIPlaceholders(String text, BungeePlayerImpl player){
if(plugin.getProxy().getPluginManager().getPlugin("PAPIProxyBridge") == null)
return text;
if(!PAPIUtil.get().isCompatible())
return text;
String server = PAPIUtil.get().getServer();
if(server == null || server.isEmpty())
return text;
ServerInfo serverInfo = plugin.getProxy().getServerInfo(server);
if(serverInfo == null || serverInfo.getPlayers().isEmpty())
return text;
ProxiedPlayer carrier = PAPIUtil.get().getPlayer(serverInfo.getPlayers());
if(carrier == null)
return text;
return PAPIUtil.get().parse(text, carrier.getUniqueId(), player.getUUID());
}
@Override
public String getVirtualHost(){
return this.resolveHost(event.getConnection().getVirtualHost());
}
@Override
public PluginCore<Favicon> getPlugin(){
return plugin;
}
@Override
public BungeePlayerImpl createPlayer(CachedPlayer player, int protocol){
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);
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -23,9 +23,11 @@
*
*/
package ch.andre601.advancedserverlist.bungeecord.events;
package ch.andre601.advancedserverlist.bungeecord.listeners;
import ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import ch.andre601.advancedserverlist.bungeecord.commands.BungeeCmdSender;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PostLoginEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
@@ -33,7 +35,6 @@ import net.md_5.bungee.event.EventHandler;
import java.net.InetSocketAddress;
public class JoinEvent implements Listener{
private final BungeeCordCore plugin;
public JoinEvent(BungeeCordCore plugin){
@@ -44,6 +45,17 @@ public class JoinEvent implements Listener{
@EventHandler
public void onJoin(PostLoginEvent event){
InetSocketAddress address = (InetSocketAddress)event.getPlayer().getPendingConnection().getSocketAddress();
plugin.getCore().getPlayerHandler().addPlayer(event.getPlayer().getName(), address.getHostString());
ProxiedPlayer player = event.getPlayer();
plugin.getCore().getPlayerHandler().addPlayer(address.getHostString(), player.getName(), player.getUniqueId());
if(player.hasPermission("advancedserverlist.admin") || player.hasPermission("advancedserverlist.updatecheck")){
if(plugin.getAudiences() == null || plugin.getCore().getUpdateChecker() == null)
return;
BungeeCmdSender sender = new BungeeCmdSender(player, plugin.getAudiences());
plugin.getCore().getUpdateChecker().performCachedUpdateCheck(sender);
}
}
}
@@ -0,0 +1,51 @@
/*
* 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.listeners;
import ch.andre601.advancedserverlist.api.bungeecord.events.PostServerListSetEvent;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import ch.andre601.advancedserverlist.core.events.PingEventHandler;
import net.md_5.bungee.api.event.ProxyPingEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
public class PingEvent implements Listener{
private final BungeeCordCore plugin;
public PingEvent(BungeeCordCore plugin){
this.plugin = plugin;
plugin.getProxy().getPluginManager().registerListener(plugin, this);
}
@EventHandler(priority = 90) // Maintenance has Event Priority 80, so we need to be AFTER it.
public void onProxyPing(ProxyPingEvent event){
ProfileEntry entry = PingEventHandler.handleEvent(new BungeeEventWrapper(plugin, event));
plugin.getProxy().getPluginManager().callEvent(new PostServerListSetEvent(entry));
}
}
@@ -0,0 +1,36 @@
/*
* 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.listeners;
import ch.andre601.advancedserverlist.api.bungeecord.events.PreServerListSetEvent;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
public class PreServerListSetEventImpl extends PreServerListSetEvent{
public PreServerListSetEventImpl(ProfileEntry entry){
super(entry);
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -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
@@ -52,4 +67,9 @@ public class BungeeLogger implements PluginLogger{
public void warn(String msg, Throwable throwable){
logger.log(Level.WARNING, msg, throwable);
}
@Override
public void warn(String msg, Throwable throwable, Object... args){
logger.log(Level.WARNING, String.format(msg, args), throwable);
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* Copyright (c) 2022-2024 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
@@ -23,25 +23,37 @@
*
*/
package ch.andre601.advancedserverlist.paper;
package ch.andre601.advancedserverlist.bungeecord.objects.impl;
import ch.andre601.advancedserverlist.core.profiles.players.GenericPlayer;
import org.bukkit.OfflinePlayer;
import ch.andre601.advancedserverlist.api.bungeecord.objects.BungeePlayer;
import ch.andre601.advancedserverlist.core.objects.CachedPlayer;
public class PaperPlayer extends GenericPlayer<OfflinePlayer>{
import java.util.UUID;
public class BungeePlayerImpl implements BungeePlayer{
public PaperPlayer(OfflinePlayer player, String name, int protocol){
this.player = player;
this.name = player == null ? name : player.getName();
private final String name;
private final int protocol;
private final UUID uuid;
public BungeePlayerImpl(CachedPlayer player, int protocol){
this.name = player.name();
this.protocol = protocol;
if(player == null)
return;
this.playedBefore = player.hasPlayedBefore();
this.banned = player.isBanned();
this.whitelisted = player.isWhitelisted();
this.uuid = player.getUniqueId();
this.uuid = player.uuid();
}
@Override
public String getName(){
return name;
}
@Override
public int getProtocol(){
return protocol;
}
@Override
public UUID getUUID(){
return uuid;
}
}
@@ -0,0 +1,53 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.impl;
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;
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* Copyright (c) 2022-2024 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
@@ -23,30 +23,31 @@
*
*/
package ch.andre601.advancedserverlist.spigot.commands;
package ch.andre601.advancedserverlist.bungeecord.objects.placeholders;
import ch.andre601.advancedserverlist.core.interfaces.CmdSender;
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
import org.bukkit.command.CommandSender;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
public class SpigotCmdSender implements CmdSender{
import java.util.Locale;
public class BungeePlayerPlaceholders extends PlaceholderProvider{
private final CommandSender sender;
private final BukkitAudiences bukkitAudiences;
private BungeePlayerPlaceholders(){
super("player");
}
public SpigotCmdSender(CommandSender sender, BukkitAudiences bukkitAudiences){
this.sender = sender;
this.bukkitAudiences = bukkitAudiences;
public static BungeePlayerPlaceholders init(){
return new BungeePlayerPlaceholders();
}
@Override
public boolean hasPermission(String permission){
return sender.hasPermission(permission) || sender.hasPermission("advancedserverlist.admin");
}
@Override
public void sendMsg(String msg, Object... args){
bukkitAudiences.sender(sender).sendMessage(ComponentParser.text(String.format(msg, args)).toComponent());
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server){
return switch(placeholder.toLowerCase(Locale.ROOT)){
case "name" -> player.getName();
case "protocol" -> String.valueOf(player.getProtocol());
case "uuid" -> String.valueOf(player.getUUID());
default -> null;
};
}
}
@@ -0,0 +1,61 @@
package ch.andre601.advancedserverlist.bungeecord.objects.placeholders;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.chat.BaseComponent;
public class BungeeProxyPlaceholders extends PlaceholderProvider{
private final BungeeCordCore plugin;
private BungeeProxyPlaceholders(BungeeCordCore plugin){
super("proxy");
this.plugin = plugin;
}
public static BungeeProxyPlaceholders init(BungeeCordCore plugin){
return new BungeeProxyPlaceholders(plugin);
}
@Override
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server){
String[] args = placeholder.split("\\s", 2);
if(args.length < 2)
return null;
ServerPing ping = plugin.getFetchedServers().get(args[1]);
return switch(args[0]){
case "status" -> ping == null ? "offline" : "online";
case "motd" -> {
if(ping == null)
yield "none";
BaseComponent[] components = new BaseComponent[]{ping.getDescriptionComponent()};
Component component = BungeeComponentSerializer.get().deserialize(components);
yield ComponentParser.toMMString(component);
}
case "players" -> {
if(ping == null)
yield "0";
yield String.valueOf(ping.getPlayers().getOnline());
}
case "maxPlayers" -> {
if(ping == null)
yield "0";
yield String.valueOf(ping.getPlayers().getMax());
}
default -> null;
};
}
}
@@ -0,0 +1,103 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.placeholders;
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 ch.andre601.advancedserverlist.bungeecord.BungeeCordCore;
import net.md_5.bungee.api.config.ServerInfo;
import java.net.InetSocketAddress;
public class BungeeServerPlaceholders extends PlaceholderProvider{
private final BungeeCordCore plugin;
private BungeeServerPlaceholders(BungeeCordCore plugin){
super("server");
this.plugin = plugin;
}
public static BungeeServerPlaceholders init(BungeeCordCore plugin){
return new BungeeServerPlaceholders(plugin);
}
@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 += plugin.getOnlinePlayers(info);
}
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 "";
yield String.valueOf(proxy.getPlayersMax());
}
case "host" -> {
if(args.length > 2)
yield "";
if(args.length == 2 && args[1] != null && !args[1].isEmpty()){
ServerInfo info = proxy.getServers().get(args[1]);
if(info == null)
yield "";
yield String.valueOf(((InetSocketAddress)info.getSocketAddress()).getHostString());
}
yield proxy.getHost();
}
default -> null;
};
}
}
+5
View File
@@ -3,4 +3,9 @@ author: 'Andre_601'
version: '${plugin.version}'
description: '${plugin.description}'
softDepends:
- PAPIProxyBridge
- Maintenance
- ServerListPlus
main: 'ch.andre601.advancedserverlist.bungeecord.BungeeCordCore'
@@ -0,0 +1,28 @@
{
"libraries": [
{
"groupId": "net{}kyori",
"artifactId": "adventure-api",
"version": "${dependency.adventure-api}",
"resolveTransitiveDependencies": true
},
{
"groupId": "net{}kyori",
"artifactId": "adventure-text-minimessage",
"version": "${dependency.adventure-text-minimessage}",
"resolveTransitiveDependencies": true
},
{
"groupId": "net{}kyori",
"artifactId": "adventure-platform-bungeecord",
"version": "${dependency.adventure-platform-bungeecord}",
"resolveTransitiveDependencies": true
},
{
"groupId": "org{}spongepowered",
"artifactId": "configurate-yaml",
"version": "${dependency.configurate-yaml}",
"resolveTransitiveDependencies": true
}
]
}
+115 -8
View File
@@ -2,7 +2,7 @@
<!--
~ MIT License
~
~ Copyright (c) 2022 Andre_601
~ 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
@@ -41,28 +41,124 @@
<properties>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<plugin.config.version>6</plugin.config.version>
</properties>
<repositories>
<repository>
<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>
<repository>
<id>codeberg</id>
<url>https://codeberg.org/api/packages/Andre601/maven/</url>
</repository>
<repository>
<id>codemc</id>
<url>https://repo.codemc.io/repository/maven-releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>ch.andre601.asl-api</groupId>
<artifactId>api</artifactId>
<version>${api.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.andre601</groupId>
<artifactId>expressionparser</artifactId>
<version>1.4.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>configurate-yaml</artifactId>
<version>4.1.2</version>
<version>${dependency.configurate-yaml}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spongepowered</groupId>
<artifactId>configurate-hocon</artifactId>
<version>4.1.2</version>
<scope>provided</scope>
</dependency>
<!-- MiniMessage -->
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
<version>4.11.0</version>
<version>${dependency.adventure-api}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.11.0</version>
<version>${dependency.adventure-text-minimessage}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-legacy</artifactId>
<version>4.11.0</version>
<version>${dependency.adventure-text-serializer-legacy}</version>
<scope>provided</scope>
</dependency>
<!-- Misc -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.11.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.unascribed</groupId>
<artifactId>flexver-java</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.3.1-jre</version>
<scope>provided</scope>
</dependency>
<!-- Plugins -->
<dependency>
<groupId>net.william278</groupId>
<artifactId>papiproxybridge</artifactId>
<version>1.6.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>eu.kennytv.maintenance</groupId>
<artifactId>maintenance-api</artifactId>
<version>4.2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.minecrell</groupId>
<artifactId>ServerListPlus</artifactId>
<version>3.5.0</version>
<scope>provided</scope>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.1</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -78,23 +174,34 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.0</version>
<configuration>
<minimizeJar>true</minimizeJar>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>com.unascribed</pattern>
<shadedPattern>ch.andre601.advancedserverlist.core.depends.flexver</shadedPattern>
</relocation>
<relocation>
<pattern>ch.andre601.expressionparser</pattern>
<shadedPattern>ch.andre601.advancedserverlist.core.depends.expressionparser</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -25,70 +25,65 @@
package ch.andre601.advancedserverlist.core;
import ch.andre601.advancedserverlist.api.AdvancedServerListAPI;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.core.check.UpdateChecker;
import ch.andre601.advancedserverlist.core.commands.CommandHandler;
import ch.andre601.advancedserverlist.core.compat.maintenance.MaintenancePlaceholder;
import ch.andre601.advancedserverlist.core.file.FileHandler;
import ch.andre601.advancedserverlist.core.interfaces.PluginCore;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.profiles.players.GenericPlayer;
import ch.andre601.advancedserverlist.core.profiles.players.PlayerHandler;
import ch.andre601.advancedserverlist.core.profiles.replacer.placeholders.PlayerPlaceholders;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
import ch.andre601.advancedserverlist.core.profiles.conditions.ProfileConditionParser;
import ch.andre601.advancedserverlist.core.profiles.handlers.PlayerHandler;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.nio.file.Path;
import java.util.*;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
public class AdvancedServerList{
public class AdvancedServerList<F>{
private final PluginCore plugin;
private final PluginCore<F> plugin;
private final FileHandler fileHandler;
private final CommandHandler commandHandler;
private final PlayerHandler playerHandler;
private static final AdvancedServerListAPI api = AdvancedServerListAPI.get();
private final ProfileConditionParser parser = ProfileConditionParser.create();
private UpdateChecker updateChecker;
private String version;
public AdvancedServerList(PluginCore plugin){
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);
plugin.getPluginLogger().info("Registering internal Placeholders...");
placeholders.forEach(this::addPlaceholder);
if(plugin.isPluginEnabled("Maintenance")){
plugin.getPluginLogger().info("Found Maintenance Plugin. Registering extra Placeholder...");
addPlaceholder(new MaintenancePlaceholder(this));
}
plugin.getPluginLogger().info("Completed internal Placeholder registration!");
load();
}
public static <T> List<T> getPlayers(Class<T> clazz, String text){
try{
String[] lines = text.split("\n");
final List<T> players = new ArrayList<>(lines.length);
final Constructor<T> constructor = clazz.getDeclaredConstructor(String.class, UUID.class);
constructor.setAccessible(true);
for(String line : lines){
players.add(constructor.newInstance(line, UUID.randomUUID()));
}
return players;
}catch(NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException ex){
return Collections.emptyList();
}
public static <F> AdvancedServerList<F> init(PluginCore<F> plugin, PlaceholderProvider... placeholders){
return new AdvancedServerList<>(plugin, Arrays.asList(placeholders));
}
public void disable(){
getPluginLogger().info("Saving cache.data file...");
getPlayerHandler().save();
getPluginLogger().info("AdvancedServerList disabled!");
public static AdvancedServerListAPI getApi(){
return api;
}
public PluginLogger getPluginLogger(){
return plugin.getPluginLogger();
}
public Path getPath(){
return plugin.getPath();
public PluginCore<F> getPlugin(){
return plugin;
}
public FileHandler getFileHandler(){
@@ -107,59 +102,100 @@ public class AdvancedServerList{
return version;
}
public ProfileConditionParser getParser(){
return parser;
}
public UpdateChecker getUpdateChecker(){
return updateChecker;
}
public void disable(){
getPlugin().getPluginLogger().info("Saving playercache.json file...");
getPlayerHandler().save();
if(updateChecker != null){
getPlugin().getPluginLogger().info("Disabling Update Checker...");
updateChecker.disable();
}
getPlugin().getPluginLogger().info("AdvancedServerList disabled!");
}
public void clearFaviconCache(){
plugin.clearFaviconCache();
}
public void clearPlayerCache(){
getPlayerHandler().clearCache();
}
private void load(){
printBanner();
resolveVersion();
getPluginLogger().info("Starting AdvancedServerList v%s...", version);
getPluginLogger().info("Proxy: " + plugin.getPlatformName() + " " + plugin.getPlatformVersion());
getPlugin().getPluginLogger().info("Starting AdvancedServerList v%s...", version);
getPlugin().getPluginLogger().info("Platform: %s", plugin.getPlatformInfo());
if(getFileHandler().loadConfig()){
getPluginLogger().info("Successfully loaded config.yml!");
getPlugin().getPluginLogger().info("Successfully loaded config.yml!");
}else{
getPluginLogger().warn("Unable to load config.yml! Check previous lines for errors.");
getPlugin().getPluginLogger().warn("Unable to load config.yml! Check previous lines for errors.");
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()){
getPluginLogger().info("Successfully loaded " + getFileHandler().getProfiles().size() + " profiles!");
getPlugin().getPluginLogger().info("Successfully loaded %d profile(s)!", getFileHandler().getProfiles().size());
}else{
getPluginLogger().warn("Unable to load profiles! Check previous lines for errors.");
getPlugin().getPluginLogger().warn("Unable to load profiles! Check previous lines for errors.");
return;
}
getPluginLogger().info("Loading Commands...");
getPlugin().loadFaviconHandler(this);
getPlugin().getPluginLogger().info("Loading Commands...");
plugin.loadCommands();
getPluginLogger().info("Commands loaded!");
getPluginLogger().info("Loading events...");
getPlugin().getPluginLogger().info("Commands loaded!");
getPlugin().getPluginLogger().info("Loading events...");
plugin.loadEvents();
getPluginLogger().info("Events loaded!");
getPluginLogger().info("Loading cache.data...");
getPlugin().getPluginLogger().info("Events loaded!");
getPlugin().getPluginLogger().info("Loading playercache.json...");
getPlayerHandler().load();
getPlugin().getPluginLogger().info("Loading bStats metrics. Disable it in the global config under /plugins/bstats/");
plugin.loadMetrics();
getPlugin().getPluginLogger().info("Metrics loaded!");
getPluginLogger().info("Loading Metrics for bStats...");
if(getFileHandler().getBoolean("send_statistics")){
plugin.loadMetrics();
getPluginLogger().info("Metrics loaded!");
}else{
getPluginLogger().info("'send_statistics' disabled in config.yml. Not loading Metrics for bStats...");
}
getPlugin().getPluginLogger().info("Enabling Schedulers...");
plugin.startScheduler();
getPlugin().getPluginLogger().info("Schedulers enabled.");
getPlugin().getPluginLogger().info("AdvancedServerList is ready!");
getPluginLogger().info("AdvancedServerList is ready!");
if(getFileHandler().getBoolean("checkUpdates"))
this.updateChecker = new UpdateChecker(this);
}
private void printBanner(){
getPluginLogger().info("");
getPluginLogger().info(" _____ _");
getPluginLogger().info(" /\\ / ____| |");
getPluginLogger().info(" / \\ | (___ | |");
getPluginLogger().info(" / /\\ \\ \\___ \\| |");
getPluginLogger().info(" / ____ \\ ____) | |____");
getPluginLogger().info("/_/ \\_\\_____/|______|");
getPluginLogger().info("");
getPlugin().getPluginLogger().info(" _____ _");
getPlugin().getPluginLogger().info(" /\\ / ____| |");
getPlugin().getPluginLogger().info(" / \\ | (___ | |");
getPlugin().getPluginLogger().info(" / /\\ \\ \\___ \\| |");
getPlugin().getPluginLogger().info(" / ____ \\ ____) | |____");
getPlugin().getPluginLogger().info("/_/ \\_\\_____/|______|");
getPlugin().getPluginLogger().info("");
}
private void resolveVersion(){
@@ -173,4 +209,9 @@ public class AdvancedServerList{
version = "UNKNOWN";
}
}
private void addPlaceholder(PlaceholderProvider placeholderProvider){
getPlugin().getPluginLogger().info("Registering %s Placeholders...", placeholderProvider.getIdentifier());
AdvancedServerList.getApi().addPlaceholderProvider(placeholderProvider);
}
}
@@ -0,0 +1,39 @@
/*
* 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.check;
import org.jetbrains.annotations.NotNull;
import java.util.concurrent.ThreadFactory;
public class UpdateCheckThread implements ThreadFactory{
@Override
public Thread newThread(@NotNull Runnable r){
Thread t = new Thread(r, "AdvancedServerList-UpdateThread");
t.setDaemon(true);
return t;
}
}
@@ -0,0 +1,213 @@
/*
* 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.check;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.interfaces.commands.CmdSender;
import ch.andre601.advancedserverlist.core.objects.CacheUtil;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.unascribed.flexver.FlexVerComparator;
import io.leangen.geantyref.TypeToken;
import java.lang.reflect.Type;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.ArrayList;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class UpdateChecker{
private final Type listType = new TypeToken<ArrayList<ModrinthVersion>>(){}.getType();
private final Gson gson = new GsonBuilder()
.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
.setPrettyPrinting()
.create();
private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new UpdateCheckThread());
private final CacheUtil<CompletableFuture<ModrinthVersion>> cache = new CacheUtil<>(Duration.ofMinutes(5));
private final AdvancedServerList<?> core;
private final PluginLogger logger;
private final String loader;
private final HttpClient client;
public UpdateChecker(AdvancedServerList<?> core){
this.core = core;
this.logger = core.getPlugin().getPluginLogger();
this.loader = core.getPlugin().getLoader();
this.client = HttpClient.newBuilder().executor(Executors.newSingleThreadExecutor(new UpdateCheckThread())).build();
startUpdateChecker();
}
public void performCachedUpdateCheck(CmdSender sender){
CompletableFuture<ModrinthVersion> modrinthVersion = cache.get(this::performUpdateCheck);
modrinthVersion.whenComplete((version, throwable) -> {
if(throwable != null){
logger.warn("Encountered an Exception while checking for an update!", throwable);
sender.sendErrorMsg("There was an exception while checking for an update. Please check the console for details.");
return;
}
if(version == null)
return;
int result = version.compare(core.getVersion());
if(result == -1){
sender.sendPrefixedMsg("<green>A new Version of AdvancedServerList is available!");
sender.sendPrefixedMsg("<green>Your version: <white>%s", core.getVersion());
sender.sendPrefixedMsg("<green>Version on Modrinth: <white>%s", version.versionNumber());
sender.sendPrefixedMsg(
"<click:open_url:'https://modrinth.com/plugin/advancedserverlist/version/%s'>" +
"<green>[<white>Download Page</white>]" +
"</click>",
version.id()
);
}else
if(result == 1){
sender.sendPrefixedMsg("You seem to run a newer Version (<white>%</white>) than what is available on Modrinth (<white>%s</white>).", core.getVersion(), version.versionNumber());
sender.sendPrefixedMsg("Are you running a development build?");
}
});
}
public void disable(){
executor.shutdown();
try{
if(!executor.awaitTermination(1, TimeUnit.SECONDS)){
executor.shutdownNow();
if(!executor.awaitTermination(1, TimeUnit.SECONDS))
logger.warn("Scheduler did not terminate in time!");
}
}catch(InterruptedException ex){
executor.shutdownNow();
Thread.currentThread().interrupt();
}
}
private void startUpdateChecker(){
executor.scheduleAtFixedRate(() -> {
logger.info("Looking for an update...");
performUpdateCheck().whenComplete((version, throwable) -> {
if(version == null || throwable != null){
logger.warn("Failed to look for any updates. Check previous messages for causes.");
return;
}
logger.debug(UpdateChecker.class, "Comparing versions...");
int result = version.compare(core.getVersion());
switch(result){
case -1 -> printUpdateBanner(version);
case 0 -> logger.info("You are running the latest version!");
case 1 -> logger.info(
"Your version (%s) seems to be newer than the latest release (%s). Are you running a dev build?",
core.getVersion(), version.versionNumber()
);
}
});
}, 0L, 12L, TimeUnit.HOURS);
}
private CompletableFuture<ModrinthVersion> performUpdateCheck(){
String finalUrl = String.format(
// 'https://api.modrinth.com/v2/project/advancedserverlist/version?loaders=["%s"]' URL encoded.
"https://api.modrinth.com/v2/project/advancedserverlist/version?loaders=%%5B%%22%s%%22%%5D",
loader
);
logger.debug(UpdateChecker.class, "Checking '%s' for updates...", finalUrl);
if(core.getVersion().equals("UNKNOWN")){
logger.warn("Cannot perform update check. Plugin version is 'UNKNOWN'!");
return CompletableFuture.completedFuture(null);
}
HttpRequest request;
try{
request = HttpRequest.newBuilder()
.uri(new URI(finalUrl))
.timeout(Duration.ofSeconds(5))
.header("User-Agent", "AdvancedServerList-" + loader + "/" + core.getVersion())
.build();
}catch(URISyntaxException ex){
logger.warn("Cannot perform update check. URL '%s' is not a valid URI.", ex, finalUrl);
return CompletableFuture.completedFuture(null);
}
return client.sendAsync(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8))
.thenApply(response -> new ArrayList<ModrinthVersion>(gson.fromJson(response.body(), listType)))
.thenApply(list -> list.get(0))
.exceptionally((throwable) -> {
logger.warn("Encountered exception while performing update check!", throwable);
return null;
});
}
private void printUpdateBanner(ModrinthVersion version){
logger.warn("=======================================================================");
logger.warn("You are running an outdated version of AdvancedServerList!");
logger.warn("");
logger.warn("Your version: %s", core.getVersion());
logger.warn("Modrinth: %s", version.versionNumber());
logger.warn("");
if(!version.isRelease()){
logger.warn("WARNING!");
logger.warn("This is a %s version and may contain breaking changes and/or bugs!", version.versionType());
logger.warn("");
}
logger.warn("Download the latest version from here:");
logger.warn("https://modrinth.com/plugin/advancedserverlist/version/%s", version.id());
logger.warn("=======================================================================");
}
public record ModrinthVersion(String id, String versionNumber, String versionType){
public boolean isRelease(){
return versionType().equals("release");
}
public int compare(String version){
return FlexVerComparator.compare(version, versionNumber());
}
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -25,49 +25,433 @@
package ch.andre601.advancedserverlist.core.commands;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.CmdSender;
import ch.andre601.advancedserverlist.core.interfaces.commands.CmdSender;
import ch.andre601.advancedserverlist.core.interfaces.commands.PluginCommand;
import ch.andre601.advancedserverlist.core.migration.minimotd.MiniMOTDConfigMigrator;
import ch.andre601.advancedserverlist.core.migration.serverlistplus.SLPConfigMigrator;
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
import ch.andre601.advancedserverlist.core.profiles.profile.ProfileSerializer;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.SerializationException;
import org.spongepowered.configurate.yaml.NodeStyle;
import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
public class CommandHandler{
private final AdvancedServerList core;
private final List<PluginCommand> subCommands;
public CommandHandler(AdvancedServerList core){
this.core = core;
public CommandHandler(AdvancedServerList<?> core){
subCommands = List.of(
new Help(core),
new Reload(core),
new ClearCache(core),
new Migrate(core),
new Profiles(core)
);
}
public List<PluginCommand> getSubCommands(){
return subCommands;
}
public void handle(CmdSender sender, String[] args){
if(args.length == 0 || args[0].equalsIgnoreCase("help")){
if(sender.hasPermission("advancedserverlist.command.help")){
sender.sendMsg("AdvancedServerList Commands");
sender.sendMsg();
sender.sendMsg("<aqua>/asl help <grey>- Shows this help.");
sender.sendMsg();
sender.sendMsg("<aqua>/asl reload <grey>- Reloads the config and profiles.");
if(args.length == 0){
sender.sendErrorMsg("<red>Too few arguments! Use <grey>/asl help</grey> for a list of commands.");
return;
}
for(PluginCommand subCommand : subCommands){
if(subCommand.name().equalsIgnoreCase(args[0])){
if(!sender.hasPermission(subCommand.permission())){
sender.sendErrorMsg(
"<red>You do not have the permission <grey>%s</grey> to execute this command.",
subCommand.permission()
);
return;
}
subCommand.handle(sender, Arrays.copyOfRange(args, 1, args.length));
return;
}
}
sender.sendErrorMsg("<red>Unknown subcommand <grey>%s</grey>. Use <grey>/asl help</grey> for a list of commands.", args[0]);
}
private static class Help extends PluginCommand{
private final AdvancedServerList<?> core;
public Help(AdvancedServerList<?> core){
super("help");
this.core = core;
}
@Override
public void handle(CmdSender sender, String[] args){
sender.sendPrefixedMsg("- Commands. Hover for details.");
for(PluginCommand command : core.getCommandHandler().getSubCommands()){
sender.sendPrefixedMsg("");
sender.sendPrefixedMsg(
"<aqua><hover:show_text:\"%s\">" +
"<click:suggest_command:/asl %s>" +
"/asl <white>%s</white>" +
"</click>" +
"</hover></aqua>",
getCommandHover(command),
command.name(),
command.name()
);
}
}
@Override
public String usage(){
return "<aqua>/asl <white>help</white></aqua>";
}
@Override
public String description(){
return "Shows all available commands.";
}
private String getCommandHover(PluginCommand command){
return String.format(
"""
<grey>Usage: %s
Permission: <white>%s</white>
<white>%s</white>
""",
command.usage(),
command.permission(),
command.description()
);
}
}
private static class Reload extends PluginCommand{
private final AdvancedServerList<?> core;
public Reload(AdvancedServerList<?> core){
super("reload");
this.core = core;
}
@Override
public void handle(CmdSender sender, String[] args){
sender.sendPrefixedMsg("Reloading plugin...");
if(core.getFileHandler().reloadConfig()){
sender.sendPrefixedMsg("<green>Reloaded <grey>config.yml</grey>!");
}else{
sender.sendMsg("<red>You do not have the permissions to execute this command!");
sender.sendErrorMsg("<red>Error while reloading <grey>config.yml</grey>!");
}
}else
if(args[0].equalsIgnoreCase("reload")){
if(sender.hasPermission("advancedserverlist.command.reload")){
sender.sendMsg("<grey>Reloading config.yml...");
if(core.getFileHandler().reloadConfig()){
sender.sendMsg("<green>Successfully reloaded <grey>config.yml</grey>!");
}else{
sender.sendMsg("<red>Error while reloading the config.yml.");
if(core.getFileHandler().reloadProfiles()){
sender.sendPrefixedMsg("<green>Loaded <grey>%d profile(s)</grey>!", core.getFileHandler().getProfiles().size());
}else{
sender.sendErrorMsg("<red>Error while loading profile(s)!");
}
sender.sendPrefixedMsg("<green>Reload complete!");
}
@Override
public String usage(){
return "<aqua>/asl <white>reload</white></aqua>";
}
@Override
public String description(){
return "Reloads the main config and all profiles.";
}
}
private static class ClearCache extends PluginCommand{
private final AdvancedServerList<?> core;
public ClearCache(AdvancedServerList<?> core){
super("clearcache");
this.core = core;
}
@Override
public void handle(CmdSender sender, String[] args){
sender.sendPrefixedMsg("Clearing caches...");
core.clearFaviconCache();
sender.sendPrefixedMsg("<green>Successfully cleared Favicon Cache!");
core.clearPlayerCache();
sender.sendPrefixedMsg("<green>Successfully cleared Player Cache!");
sender.sendPrefixedMsg("<green>Cache clearing complete!");
}
@Override
public String usage(){
return "<aqua>/asl <white>clearcache</white></aqua>";
}
@Override
public String description(){
return "Clears the Favicon and Player Cache.";
}
}
private static class Migrate extends PluginCommand{
private final AdvancedServerList<?> core;
public Migrate(AdvancedServerList<?> core){
super("migrate");
this.core = core;
}
@Override
public void handle(CmdSender sender, String[] args){
if(args.length == 0){
sender.sendErrorMsg("<red>Insufficient arguments! Please provide a plugin to migrate from.");
sender.sendErrorMsg("<red>Available options:");
sender.sendErrorMsg(" - ServerListPlus");
sender.sendErrorMsg(" - MiniMOTD");
return;
}
if(args[0].equalsIgnoreCase("serverlistplus")){
if(!core.getPlugin().isPluginEnabled("ServerListPlus")){
sender.sendErrorMsg("<red>Plugin ServerListPlus is not enabled.");
sender.sendErrorMsg("<red>It needs to be active for the migration to work!");
return;
}
sender.sendMsg("<grey>Reloading Profiles...");
if(core.getFileHandler().reloadProfiles()){
sender.sendMsg("<green>Successfully loaded <grey>%d</grey> Profiles!", core.getFileHandler().getProfiles().size());
}else{
sender.sendMsg("<red>Error while reloading Profiles. No profiles have been loaded.");
}
sender.sendPrefixedMsg("Migrating ServerListPlus configuration file...");
sender.sendMsg("<green>Reload complete!");
int migrated = SLPConfigMigrator.migrate(core, sender);
if(migrated == 0){
sender.sendErrorMsg("<red>Unable to migrate any ServerListPlus configuration. Check console for details!");
}else{
sender.sendPrefixedMsg("<green>Migration complete!");
}
}else
if(args[0].equalsIgnoreCase("minimotd")){
sender.sendPrefixedMsg("Migrating MiniMOTD configuration file...");
if(MiniMOTDConfigMigrator.migrate(core, sender)){
sender.sendPrefixedMsg("<green>Migration complete!");
}else{
sender.sendErrorMsg("<red>Unable to migrate MiniMOTD configuration. Check console for details!");
}
}else{
sender.sendErrorMsg("<red>Unknown plugin <grey>%s</grey>. Available Options:", args[0]);
sender.sendErrorMsg(" - ServerListPlus");
sender.sendErrorMsg(" - MiniMOTD");
}
}else{
sender.sendMsg("<red>Unknown subcommand <grey>%s</grey>. Use <grey>/asl help</grey> for a list of commands.", args[0]);
}
@Override
public String usage(){
return "<aqua>/asl <white>migrate <grey>\\<</grey>Plugin<grey>></grey></white></aqua>";
}
@Override
public String description(){
return "Migrates the configuration from supported Plugins to AdvancedServerList.";
}
}
private static class Profiles extends PluginCommand{
private final AdvancedServerList<?> core;
public Profiles(AdvancedServerList<?> core){
super("profiles");
this.core = core;
}
@Override
public void handle(CmdSender sender, String[] args){
if(args.length == 0){
sender.sendErrorMsg("<red>Invalid command usage.");
sender.sendErrorMsg("<red>Usage:</red> %s", usage());
return;
}
switch(args[0].toLowerCase(Locale.ROOT)){
case "list" -> {
sender.sendPrefixedMsg("Available Profiles:");
core.getFileHandler().getProfiles().stream()
.sorted(Comparator.comparingInt(ServerListProfile::priority).reversed())
.forEach(
profile -> sender.sendPrefixedMsg("- <white><hover:show_text:\"%s\">%s</hover></white>", getHover(profile), profile.file())
);
}
case "add" -> {
if(args.length == 1){
sender.sendErrorMsg("<red>Insufficient arguments.");
sender.sendErrorMsg("<red>Usage:</red> /asl profiles add <name>");
return;
}
String name = getProfileName(args[1]);
if(core.getFileHandler().getProfiles().stream().anyMatch(profile -> profile.file().equalsIgnoreCase(name))){
sender.sendErrorMsg("<red>A profile with file name</red> %s <red>already exists!", name);
return;
}
if(core.getFileHandler().createFile(name)){
sender.sendPrefixedMsg("<green>Successfully created</green> %s<green>!", name);
sender.sendPrefixedMsg("<green>Load the file using</green> /asl reload");
}else{
sender.sendErrorMsg("<red>Error while trying to create</red> %s<red>!", name);
sender.sendErrorMsg("<red>Check console for further details.");
}
}
case "copy" -> {
if(args.length < 3){
sender.sendErrorMsg("<red>Insufficient arguments.");
sender.sendErrorMsg("<red>Usage:</red> /asl profiles copy <profile> <name>");
return;
}
String name = getProfileName(args[1]);
String copy = getProfileName(args[2]);
ServerListProfile targetProfile = core.getFileHandler().getProfiles().stream()
.filter(file -> file.file().equalsIgnoreCase(name))
.findFirst()
.orElse(null);
boolean copyExists = core.getFileHandler().getProfiles().stream()
.anyMatch(profile -> profile.file().equals(copy));
if(targetProfile == null){
sender.sendErrorMsg("<red>There is no file with name</red> %s<red>!", name);
return;
}
if(copyExists){
sender.sendErrorMsg("<red>A profile with file name</red> %s <red>already exists!", copy);
return;
}
Path profilePath = core.getPlugin().getFolderPath().resolve("profiles").resolve(copy);
try{
Files.createFile(profilePath);
}catch(IOException ex){
sender.sendErrorMsg("<red>There was an error while creating the file</red> %s<red>!", copy);
sender.sendErrorMsg("<red>Check console for further details.");
core.getPlugin().getPluginLogger().warn("Encountered IOException while creating file %s", ex, copy);
return;
}
YamlConfigurationLoader loader = YamlConfigurationLoader.builder()
.path(profilePath)
.indent(2)
.nodeStyle(NodeStyle.BLOCK)
.defaultOptions(options -> options.serializers(builder -> builder.register(ProfileEntry.class, ProfileSerializer.INSTANCE)))
.build();
ConfigurationNode node;
try{
node = loader.load();
}catch(IOException ex){
sender.sendErrorMsg("<red>There was an error while loading the file</red> %s<red>!", copy);
sender.sendErrorMsg("<red>Check console for further details.");
core.getPlugin().getPluginLogger().warn("Encountered IOException while loading file %s", ex, copy);
return;
}
if(node == null){
sender.sendErrorMsg("Cannot copy</red> %s <red>to</red> %s<red>. ConfigurationNode was null.", name, copy);
return;
}
try{
node.node("priority").set(targetProfile.priority());
node.node("condition").set(targetProfile.condition());
node.node("profiles").setList(ProfileEntry.class, targetProfile.profiles());
node.set(ProfileEntry.class, targetProfile.defaultProfile());
}catch(SerializationException ex){
sender.sendErrorMsg("<red>There was an Error while copying values from</red> %s <red>to</red> %s<red>.", name, copy);
sender.sendErrorMsg("<red>Check console for details.");
core.getPlugin().getPluginLogger().warn("Encountered SerializationException while set values for %s!", ex, copy);
return;
}
try{
loader.save(node);
sender.sendPrefixedMsg("<green>Successfully created copy of</green> %s <green>as</green> %s<green>!", name, copy);
sender.sendPrefixedMsg("<green>Load the file using</green> /asl reload");
}catch(IOException ex){
sender.sendErrorMsg("<red>There was an Error while trying to save</red> %s<red>!", copy);
sender.sendErrorMsg("<red>Check console for details.");
core.getPlugin().getPluginLogger().warn("Encountered IOException while saving ConfigurationNode for %s!", ex, copy);
}
}
default -> {
sender.sendErrorMsg("<red>Unknown argument</red> %s<red>!", args[0]);
sender.sendErrorMsg("<red>Usage:</red> %s", usage());
}
}
}
@Override
public String usage(){
return "<aqua>/asl <white>profiles</white> <grey>\\<" +
"<white>add</white> \\<<white>name</white>> | " +
"<white>copy</white> \\<<white>profile</white>> \\<<white>name</white>> | " +
"<white>list</white>" +
"></grey></aqua>";
}
@Override
public String description(){
return "Creates a new profile, copies one from an existing file, or lists all available profiles.";
}
private String getHover(ServerListProfile profile){
return String.format(
"""
<grey>Priority: <white>%s</white>
Condition: <white>%s</white>
Valid profile: %s
""",
profile.priority(),
profile.condition() == null || profile.condition().isEmpty() ? "<i>None</i>" : profile.condition(),
profile.isInvalidProfile() ? "<red>No</red>" : "<green>Yes</green>"
);
}
private String getProfileName(String name){
String fileName = name.toLowerCase(Locale.ROOT);
return fileName.endsWith(".yml") ? fileName : fileName + ".yml";
}
}
}
@@ -0,0 +1,24 @@
package ch.andre601.advancedserverlist.core.compat.maintenance;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
public class MaintenancePlaceholder extends PlaceholderProvider{
private final AdvancedServerList<?> plugin;
public MaintenancePlaceholder(AdvancedServerList<?> plugin){
super("maintenance");
this.plugin = plugin;
}
@Override
public String parsePlaceholder(String placeholder, GenericPlayer player, GenericServer server){
if(!placeholder.equals("maintenanceEnabled") || !plugin.getPlugin().isPluginEnabled("Maintenance"))
return null;
return String.valueOf(MaintenanceUtil.get().isMaintenanceEnabled());
}
}
@@ -0,0 +1,51 @@
/*
* 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.maintenance;
import eu.kennytv.maintenance.api.Maintenance;
import eu.kennytv.maintenance.api.MaintenanceProvider;
public class MaintenanceUtil{
private static MaintenanceUtil instance;
private final Maintenance api;
private MaintenanceUtil(){
this.api = MaintenanceProvider.get();
}
public static MaintenanceUtil get(){
if(instance != null)
return instance;
return (instance = new MaintenanceUtil());
}
public boolean isMaintenanceEnabled(){
return api.isMaintenance();
}
}
@@ -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.compat.papi;
import ch.andre601.advancedserverlist.core.objects.CacheUtil;
import net.william278.papiproxybridge.api.PlaceholderAPI;
import java.time.Duration;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletionException;
public class PAPIUtil{
private static PAPIUtil instance;
private final CacheUtil<String> cache = new CacheUtil<>(Duration.ofSeconds(5));
private final PlaceholderAPI papi;
private PAPIUtil(){
this.papi = PlaceholderAPI.createInstance();
}
public static PAPIUtil get(){
if(instance != null)
return instance;
return (instance = new PAPIUtil());
}
// Make sure the version of PAPIProxyBridge we get has the required methods we need...
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean isCompatible(){
try{
papi.getClass().getMethod("getServers");
return true;
}catch(NoSuchMethodException ex){
return false;
}
}
public String getServer(){
return cache.get(() -> {
List<String> servers;
try{
Set<String> value = papi.getServers().getNow(null);
if(value == null)
return null;
servers = List.copyOf(value);
}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{
return papi.formatPlaceholders(text, carrier, player).getNow(text);
}catch(IllegalArgumentException | CancellationException | CompletionException ex){
return text;
}
}
}
@@ -0,0 +1,206 @@
/*
* 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.events;
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.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.interfaces.core.PluginCore;
import ch.andre601.advancedserverlist.core.interfaces.events.GenericEventWrapper;
import ch.andre601.advancedserverlist.core.parsing.ComponentParser;
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
import ch.andre601.advancedserverlist.core.profiles.profile.ProfileManager;
import ch.andre601.advancedserverlist.core.profiles.replacer.StringReplacer;
public class PingEventHandler{
public static <F, P extends GenericPlayer> ProfileEntry handleEvent(GenericEventWrapper<F, P> event){
event.getPlugin().getPluginLogger().debug(PingEventHandler.class, "Received ping event. Handling it...");
if(event.isInvalidProtocol()){
event.getPlugin().getPluginLogger().debug(PingEventHandler.class, "Not handling event. Protocol was invalid.");
return null;
}
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();
P player = event.createPlayer(
plugin.getCore().getPlayerHandler().getCachedPlayer(event.getPlayerIP()),
event.getProtocolVersion()
);
GenericServer server = event.createGenericServer(online, max, host);
ServerListProfile profile = ProfileManager.resolveProfile(plugin.getCore(), player, server);
if(profile == null){
logger.debugWarn(PingEventHandler.class, "Server List Profile couldn't be resolved properly. Cancelling event handling...");
return null;
}
logger.debug(PingEventHandler.class, "Received valid Server List Profile. Calling PreServerListSetEvent...");
GenericServerListEvent slEvent = event.callEvent(ProfileManager.merge(profile));
if(slEvent == null || slEvent.isCancelled()){
logger.debug(PingEventHandler.class, "PreServerListSetEvent was cancelled. Stopping ping handling...");
return null;
}
logger.debug(PingEventHandler.class, "PreServerListSetEvent completed. Proceeding with ping handling...");
ProfileEntry entry = slEvent.getEntry();
if(entry.isInvalid()){
logger.debugWarn(PingEventHandler.class, "No valid ProfileEntry retrieved. Cancelling ping handling...");
return null;
}
if(ProfileManager.checkOption(entry.onlinePlayersEnabled()) && ignoreMaintenance(event, "onlinePlayers")){
logger.debug(PingEventHandler.class, "'playerCount -> onlinePlayers -> enabled' option is true. Trying to apply '%s'...", entry.onlinePlayersCount());
String onlinePlayers = ComponentParser.text(entry.onlinePlayersCount())
.modifyText(text -> StringReplacer.replace(text, player, server))
.modifyText(text -> event.parsePAPIPlaceholders(text, player))
.toString();
try{
online = onlinePlayers == null ? online : Integer.parseInt(onlinePlayers);
event.setOnlinePlayers(online);
}catch(NumberFormatException ex){
logger.warn("Option 'playerCount -> onlinePlayers -> amount' is not a valid Number!");
}
}
boolean extraPlayersEnabled = ProfileManager.checkOption(entry.extraPlayersEnabled());
if(extraPlayersEnabled && ignoreMaintenance(event, "extraPlayers")){
logger.debug(PingEventHandler.class, "'playerCount -> extraPlayers -> enabled' option is true. Trying to apply '%s'...", entry.extraPlayersCount());
String extraPlayers = ComponentParser.text(entry.extraPlayersCount())
.modifyText(text -> StringReplacer.replace(text, player, server))
.modifyText(text -> event.parsePAPIPlaceholders(text, player))
.toString();
try{
max = online + (extraPlayers == null ? 0 : Integer.parseInt(extraPlayers));
logger.debug(PingEventHandler.class, "'playerCount -> extraPlayers -> amount' is a valid number. Applying it...");
event.setMaxPlayers(max);
}catch(NumberFormatException ex){
logger.warn("Option 'playerCount -> extraPlayers -> amount' is not a valid Number!");
}
}
if(ProfileManager.checkOption(entry.maxPlayersEnabled()) && !extraPlayersEnabled && ignoreMaintenance(event, "maxPlayers")){
logger.debug(PingEventHandler.class, "'playerCount -> maxPlayers -> enabled' option is true. Trying to apply '%s'...", entry.maxPlayersCount());
String maxPlayers = ComponentParser.text(entry.maxPlayersCount())
.modifyText(text -> StringReplacer.replace(text, player, server))
.modifyText(text -> event.parsePAPIPlaceholders(text, player))
.toString();
try{
max = maxPlayers == null ? 0 : Integer.parseInt(maxPlayers);
logger.debug(PingEventHandler.class, "'playerCount -> maxPlayers -> amount' is a valid number. Applying it...");
event.setMaxPlayers(max);
}catch(NumberFormatException ex){
logger.warn("Option 'playerCount -> maxPlayers -> amount' is not a valid Number!");
}
}
GenericServer finalServer = event.createGenericServer(online, max, host);
if(ProfileManager.checkOption(entry.motd()) && ignoreMaintenance(event, "motd")){
logger.debug(PingEventHandler.class, "'motd' option present. Applying '%s'...", String.join("\\n", entry.motd()));
event.setMotd(
ComponentParser.list(entry.motd())
.modifyText(text -> StringReplacer.replace(text, player, finalServer))
.modifyText(text -> event.parsePAPIPlaceholders(text, player))
.toComponent()
);
}
boolean hidePlayers = ProfileManager.checkOption(entry.hidePlayersEnabled());
if(hidePlayers && ignoreMaintenance(event, "hidePlayers")){
logger.debug(PingEventHandler.class, "'playerCount -> hidePlayers' enabled. Hiding player count...");
event.hidePlayers();
}
if(ProfileManager.checkOption(entry.playerCountText()) && !hidePlayers && ignoreMaintenance(event, "playerCountText")){
logger.debug(PingEventHandler.class, "'playerCount -> text' option set. Applying '%s'...", entry.playerCountText());
event.setPlayerCount(
ComponentParser.text(entry.playerCountText())
.modifyText(text -> StringReplacer.replace(text, player, finalServer))
.modifyText(text -> event.parsePAPIPlaceholders(text, player))
.toString()
);
}
if(ProfileManager.checkOption(entry.players()) && !hidePlayers && ignoreMaintenance(event, "playerCountHover")){
logger.debug(PingEventHandler.class, "'playerCount -> hover' option set. Applying '%s'...", String.join("\\n", entry.players()));
event.setPlayers(entry.players(), player, server);
}
if(ProfileManager.checkOption(entry.favicon()) && ignoreMaintenance(event, "favicon")){
logger.debug(PingEventHandler.class, "'favicon' option set. Resolving '%s'...", entry.favicon());
String faviconString = StringReplacer.replace(entry.favicon(), player, server);
F favicon = plugin.getFaviconHandler().getFavicon(faviconString);
if(favicon == 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(favicon);
}
}
logger.debug(PingEventHandler.class, "Event handling completed. Updating Ping data...");
event.updateEvent();
return entry;
}
private static <F, P extends GenericPlayer> boolean ignoreMaintenance(GenericEventWrapper<F, P> event, String option){
if(!event.isMaintenanceModeActive())
return true;
return !event.getPlugin().getCore().getFileHandler().getBool(true, "disableDuringMaintenance", option);
}
}
@@ -0,0 +1,142 @@
/*
* 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, fiveToSix())
.addVersion(5, fourToFive())
.addVersion(4, threeToFour())
.addVersion(3, twoToThree())
.addVersion(2, oneToTwo())
.build();
}
public static ConfigurationTransformation fiveToSix(){
return ConfigurationTransformation.builder()
.addAction(NodePath.path("disableDuringMaintenance"), (path, value) -> {
value.node("onlinePlayers").set(true);
return null;
})
.build();
}
public static ConfigurationTransformation fourToFive(){
return ConfigurationTransformation.builder()
.addAction(NodePath.path(), (path, value) -> {
value.node("disableDuringMaintenance", "motd").set(true);
value.node("disableDuringMaintenance", "favicon").set(true);
value.node("disableDuringMaintenance", "hidePlayers").set(true);
value.node("disableDuringMaintenance", "playerCountText").set(true);
value.node("disableDuringMaintenance", "playerCountHover").set(true);
value.node("disableDuringMaintenance", "extraPlayers").set(true);
value.node("disableDuringMaintenance", "maxPlayers").set(true);
return null;
})
.build();
}
public static ConfigurationTransformation threeToFour(){
return ConfigurationTransformation.builder()
.addAction(NodePath.path(), (path, value) -> {
value.node("faviconCacheTime").set(1);
return null;
})
.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;
}
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -25,27 +25,31 @@
package ch.andre601.advancedserverlist.core.file;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
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;
import java.io.FilenameFilter;
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 FilenameFilter profileFilter = (dir, name) -> name.endsWith(".yml");
private final AdvancedServerList plugin;
private final AdvancedServerList<?> plugin;
private final PluginLogger logger;
private final Path config;
@@ -55,12 +59,12 @@ public class FileHandler{
private ConfigurationNode node = null;
public FileHandler(AdvancedServerList plugin){
this.plugin = plugin;
this.logger = plugin.getPluginLogger();
public FileHandler(AdvancedServerList<?> core){
this.plugin = core;
this.logger = core.getPlugin().getPluginLogger();
this.config = plugin.getPath().resolve("config.yml");
this.profilesFolder = plugin.getPath().resolve("profiles");
this.config = core.getPlugin().getFolderPath().resolve("config.yml");
this.profilesFolder = core.getPlugin().getFolderPath().resolve("profiles");
}
public List<ServerListProfile> getProfiles(){
@@ -69,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;
@@ -83,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;
@@ -94,22 +99,56 @@ public class FileHandler{
public boolean loadProfiles(){
logger.info("Loading profiles...");
if(!profilesFolder.toFile().exists() && profilesFolder.toFile().mkdirs()){
if(createFile("default.yml")){
return reloadProfiles();
}else{
return false;
}
}
public boolean createFile(String name){
if(Files.notExists(profilesFolder) && profilesFolder.toFile().mkdirs()){
logger.info("Successfully created profiles folder.");
try(InputStream stream = plugin.getClass().getResourceAsStream("/profiles/default.yml")){
if(stream == null){
logger.warn("Cannot retrieve default.yml from Plugin.");
return false;
}
Files.copy(stream, profilesFolder.resolve("default.yml"));
}catch(IOException ex){
logger.warn("Cannot create default.yml for plugin.", ex);
}
File file = new File(profilesFolder.toFile(), name);
if(file.exists()){
return true;
}
try(InputStream stream = plugin.getClass().getResourceAsStream("/profiles/default.yml")){
if(stream == null){
logger.warn("Cannot retrieve content of internal default.yml file.");
return false;
}
Files.copy(stream, profilesFolder.resolve(name));
return true;
}catch(IOException ex){
logger.warn("Encountered IOException while trying to create file %s", ex, name);
return false;
}
}
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;
}
return reloadProfiles();
}
public boolean reloadConfig(){
@@ -119,7 +158,7 @@ public class FileHandler{
public boolean reloadProfiles(){
profiles.clear();
File[] files = profilesFolder.toFile().listFiles(profileFilter);
File[] files = profilesFolder.toFile().listFiles(((dir, name) -> name.endsWith(".yml")));
if(files == null || files.length == 0){
logger.warn("Cannot load files from profiles folder! No valid YAML files present.");
return false;
@@ -130,8 +169,8 @@ public class FileHandler{
if(tmp == null)
continue;
profiles.add(new ServerListProfile(tmp, logger));
logger.info("Loaded " + file.getName());
profiles.add(ServerListProfile.Builder.resolve(file.getName(), tmp, logger).build());
logger.info("Loaded '%s'!", file.getName());
}
if(profiles.isEmpty()){
@@ -139,19 +178,20 @@ public class FileHandler{
return false;
}
profiles.sort(Comparator.comparing(ServerListProfile::getPriority).reversed());
profiles.sort(Comparator.comparing(ServerListProfile::priority).reversed());
return !profiles.isEmpty();
}
public ConfigurationNode getConfigurationNode(Path path){
YamlConfigurationLoader loader = YamlConfigurationLoader.builder()
.defaultOptions(opts -> opts.serializers(build -> build.register(ProfileEntry.class, ProfileSerializer.INSTANCE)))
.path(path)
.build();
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;
}
}
@@ -160,7 +200,48 @@ public class FileHandler{
return node.node(path).getString(def);
}
public boolean getBool(boolean def, Object... path){
return node.node(path).getBoolean(def);
}
public boolean getBoolean(Object... path){
return node.node(path).getBoolean(true);
return getBool(false, path);
}
public long getLong(long def, long limit, Object... path){
long value = node.node(path).getLong(def);
return Math.max(value, limit);
}
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;
}
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -27,9 +27,15 @@ 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);
void warn(String msg, Throwable throwable);
void warn(String msg, Throwable throwable, Object... args);
}
@@ -0,0 +1,48 @@
/*
* 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.interfaces.commands;
public interface CmdSender{
String prefix = "<grey>[<gradient:aqua:white>AdvancedServerList</gradient>] ";
String errorPrefix = "<grey>[<gradient:dark_red:red>AdvancedServerList</gradient>] ";
boolean hasPermission(String permission);
void sendMsg(String msg, Object... args);
default void sendMsg(){
sendMsg("");
}
default void sendPrefixedMsg(String msg, Object... args){
sendMsg(prefix + msg, args);
}
default void sendErrorMsg(String msg, Object... args){
sendMsg(errorPrefix + msg, args);
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -23,17 +23,29 @@
*
*/
package ch.andre601.advancedserverlist.velocity;
package ch.andre601.advancedserverlist.core.interfaces.commands;
import ch.andre601.advancedserverlist.core.profiles.players.GenericPlayer;
import com.velocitypowered.api.network.ProtocolVersion;
import com.velocitypowered.api.proxy.Player;
import java.util.Locale;
public class VelocityPlayer extends GenericPlayer<Player>{
public abstract class PluginCommand{
public VelocityPlayer(String name, int protocol){
private final String name;
public PluginCommand(String name){
this.name = name;
this.protocol = protocol;
this.version = ProtocolVersion.getProtocolVersion(protocol).getVersionIntroducedIn();
}
public String name(){
return name;
}
public String permission(){
return "advancedserverlist.command." + name().toLowerCase(Locale.ROOT);
}
public abstract void handle(CmdSender sender, String[] args);
public abstract String usage();
public abstract String description();
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -23,42 +23,51 @@
*
*/
package ch.andre601.advancedserverlist.core.profiles;
package ch.andre601.advancedserverlist.core.interfaces.core;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.profiles.replacer.placeholders.Placeholders;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.profiles.handlers.FaviconHandler;
import java.util.HashMap;
import java.util.Map;
import java.awt.image.BufferedImage;
import java.nio.file.Path;
public class ProfileManager{
public interface PluginCore<F>{
private final AdvancedServerList core;
void loadCommands();
private final Map<String, Object> replacements = new HashMap<>();
void loadEvents();
private ProfileManager(AdvancedServerList core){
this.core = core;
}
void loadMetrics();
public static ProfileManager get(AdvancedServerList core){
return new ProfileManager(core);
}
void loadFaviconHandler(AdvancedServerList<F> core);
public ProfileManager replacements(Placeholders placeholders){
this.replacements.putAll(placeholders.getReplacements());
return this;
}
void clearFaviconCache();
public ServerListProfile getProfile(){
for(ServerListProfile profile : core.getFileHandler().getProfiles()){
if(profile.getMotd().isEmpty() && profile.getPlayers().isEmpty() && profile.getPlayerCount().isEmpty())
continue;
if(profile.evalConditions(replacements))
return profile;
}
void downloadLibrary(String groupId, String artifactId, String version);
void startScheduler();
AdvancedServerList<F> getCore();
Path getFolderPath();
PluginLogger getPluginLogger();
FaviconHandler<F> getFaviconHandler();
String getPlatformInfo();
String getLoader();
boolean isPluginEnabled(String plugin);
F createFavicon(BufferedImage image) throws Exception;
default boolean isDebugEnabled(){
if(getCore() == null)
return false;
return null;
return getCore().getFileHandler().getBoolean("debug");
}
}
@@ -0,0 +1,86 @@
/*
* 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.interfaces.events;
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.interfaces.core.PluginCore;
import ch.andre601.advancedserverlist.core.objects.CachedPlayer;
import net.kyori.adventure.text.Component;
import java.net.InetSocketAddress;
import java.util.List;
public interface GenericEventWrapper<F, P extends GenericPlayer>{
GenericServerListEvent callEvent(ProfileEntry entry);
void setMaxPlayers(int maxPlayers);
void setOnlinePlayers(int onlinePlayers);
void setMotd(Component component);
void hidePlayers();
void setPlayerCount(String name);
void setPlayers(List<String> players, P player, GenericServer server);
void setFavicon(F favicon);
void setDefaultFavicon();
void updateEvent();
boolean isInvalidProtocol();
boolean isMaintenanceModeActive();
int getProtocolVersion();
int getOnlinePlayers();
int getMaxPlayers();
String getPlayerIP();
String parsePAPIPlaceholders(String text, P player);
String getVirtualHost();
PluginCore<F> getPlugin();
P createPlayer(CachedPlayer player, int protocol);
GenericServer createGenericServer(int playersOnline, int playersMax, String host);
default String resolveHost(InetSocketAddress address){
return address == null ? null : address.getHostString();
}
}
@@ -0,0 +1,235 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.migration.minimotd;
import ch.andre601.advancedserverlist.api.objects.NullBool;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.interfaces.commands.CmdSender;
import ch.andre601.advancedserverlist.core.migration.minimotd.serializing.MiniMOTDConfig;
import ch.andre601.advancedserverlist.core.migration.minimotd.serializing.MiniMOTDSerializer;
import ch.andre601.advancedserverlist.core.profiles.profile.ProfileSerializer;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.hocon.HoconConfigurationLoader;
import org.spongepowered.configurate.serialize.SerializationException;
import org.spongepowered.configurate.yaml.NodeStyle;
import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class MiniMOTDConfigMigrator{
public static boolean migrate(AdvancedServerList<?> core, CmdSender sender){
core.getPlugin().downloadLibrary("org.spongepowered", "configurate-hocon", "4.1.2");
PluginLogger logger = core.getPlugin().getPluginLogger();
String folder = core.getPlugin().getLoader().equals("velocity") ? "minimotd-velocity" : "MiniMOTD";
Path mainConf = core.getPlugin().getFolderPath().getParent().resolve(folder).resolve("main.conf");
if(!Files.exists(mainConf)){
logger.warn("[Migrator - MiniMOTD] Cannot find a main.conf file in /plugins/%s/ folder.", folder);
sender.sendErrorMsg(" -> <red>No main.conf file found.");
return false;
}
HoconConfigurationLoader loader = HoconConfigurationLoader.builder()
.path(mainConf)
.defaultOptions(options -> options.serializers(builder ->
builder.register(MiniMOTDConfig.class, MiniMOTDSerializer.MINI_MOTD_SERIALIZER)
.register(MiniMOTDConfig.Motd.class, MiniMOTDSerializer.MOTD_SERIALIZER)
.register(MiniMOTDConfig.PlayerCount.class, MiniMOTDSerializer.PLAYER_COUNT_SERIALIZER)
))
.build();
MiniMOTDConfig config;
try{
ConfigurationNode node = loader.load();
config = node.get(MiniMOTDConfig.class);
}catch(IOException ex){
logger.warn("[Migrator - MiniMOTD] Encountered IOException while loading main.conf file.", ex);
sender.sendErrorMsg(" -> <red>IOException while loading</red> main.conf <red>file.");
return false;
}
if(config == null){
logger.warn("[Migrator - MiniMOTD] Retrieved main.conf file returned null.");
sender.sendErrorMsg(" -> <red>Received invalid</red> main.conf <red>file.");
return false;
}
ProfileEntry.Builder profileBuilder = ProfileEntry.empty().builder();
List<ProfileEntry.Builder> profilesBuilders = new ArrayList<>();
if(config.motdEnabled() && config.motds().size() > 1){
for(int i = 0; i < config.motds().size(); i++){
profilesBuilders.add(ProfileEntry.empty().builder());
}
}
if(config.motdEnabled()){
if(config.motds().size() == 1){
applyMotd(profileBuilder, config.motds().get(0));
}else
if(config.motds().size() > 1){
for(int i = 0; i < config.motds().size(); i++){
applyMotd(profilesBuilders.get(i), config.motds().get(i));
}
}
}
if(config.iconEnabled()){
if(config.motds().size() == 1){
MiniMOTDConfig.Motd motd = config.motds().get(0);
if(!motd.icon().isEmpty() && !motd.icon().equalsIgnoreCase("random")){
profileBuilder.favicon(motd.icon());
}
}else
if(config.motds().size() > 1){
for(int i = 0; i < config.motds().size(); i++){
MiniMOTDConfig.Motd motd = config.motds().get(i);
if(!motd.icon().isEmpty() && !motd.icon().equalsIgnoreCase("random")){
profilesBuilders.get(i).favicon(motd.icon());
}
}
}
}
if(config.playerCount() != null){
MiniMOTDConfig.PlayerCount playerCount = config.playerCount();
NullBool hidePlayers = NullBool.resolve(playerCount.hidePlayers());
NullBool xMoreEnabled = NullBool.resolve(playerCount.xMoreEnabled());
int xMore = playerCount.xMore();
NullBool maxPlayersEnabled = NullBool.resolve(playerCount.maxPlayersEnabled());
int maxPlayers = playerCount.maxPlayers();
profileBuilder.hidePlayersEnabled(hidePlayers)
.extraPlayersEnabled(xMoreEnabled)
.extraPlayersCount(String.valueOf(xMore))
.maxPlayersEnabled(maxPlayersEnabled)
.maxPlayersCount(String.valueOf(maxPlayers));
}
ProfileEntry entry = profileBuilder.build();
List<ProfileEntry> profiles = profilesBuilders.stream()
.map(ProfileEntry.Builder::build)
.toList();
boolean profilesInvalid = profiles.isEmpty() || profiles.stream().allMatch(ProfileEntry::isInvalid);
if(entry.isInvalid() && profilesInvalid){
logger.warn("[Migrator - MiniMOTD] Main ProfileEntry was invalid and profiles were empty.");
sender.sendErrorMsg(" -> <red>Received invalid configuration.");
return false;
}
Path profile = core.getPlugin().getFolderPath().resolve("profiles").resolve("minimotd_migrated.yml");
if(Files.exists(profile)){
logger.warn("[Migrator - MiniMOTD] Cannot create new file minimotd_migrated.yml. One with the same name is already present.");
sender.sendErrorMsg(" -> <red>File</red> minimotd_migrated.yml <red>already present.");
return false;
}
try{
Files.createFile(profile);
}catch(IOException ex){
logger.warn("[Migrator - MiniMOTD] Encountered an IOException while trying to create file minimotd_migrated.yml.", ex);
sender.sendErrorMsg(" -> <red>File creation error.");
return false;
}
YamlConfigurationLoader yamlLoader = YamlConfigurationLoader.builder()
.path(profile)
.indent(2)
.nodeStyle(NodeStyle.BLOCK)
.defaultOptions(option -> option.serializers(builder -> builder.register(ProfileEntry.class, ProfileSerializer.INSTANCE)))
.build();
ConfigurationNode migrated;
try{
migrated = yamlLoader.load();
}catch(IOException ex){
logger.warn("[Migrator - MiniMOTD] Encountered an IOException while trying to load file minimotd_migrated.yml.", ex);
sender.sendErrorMsg(" -> <red>File loading error.");
return false;
}
if(migrated == null){
logger.warn("[Migrator - MiniMOTD] Cannot migrate Configuration. ConfigurationNode was null.");
sender.sendErrorMsg(" -> <red>File loading error.");
return false;
}
try{
migrated.node("priority").set(0);
if(!profiles.isEmpty()){
migrated.node("profiles").setList(ProfileEntry.class, profiles);
}
migrated.set(entry);
}catch(SerializationException ex){
logger.warn("[Migrator - MiniMOTD] Encountered a SerializationException while setting values.", ex);
sender.sendErrorMsg(" -> <red>Error while updating file</red> minimotd_migrated.yml<red>.");
return false;
}
try{
yamlLoader.save(migrated);
sender.sendPrefixedMsg(" -> <green>Completed!");
return true;
}catch(IOException ex){
logger.warn("[Migrator - MiniMOTD] Encountered an IOException while trying to save new file minimotd_migrated.yml.", ex);
sender.sendErrorMsg(" -> <red>File saving error.");
return false;
}
}
private static void applyMotd(ProfileEntry.Builder builder, MiniMOTDConfig.Motd motd){
if(motd.line1().isEmpty() && !motd.line2().isEmpty()){
builder.motd(List.of("<grey>", motd.line2()));
}else
if(!motd.line1().isEmpty() && motd.line2().isEmpty()){
builder.motd(Collections.singletonList(motd.line1()));
}else
if(!motd.line1().isEmpty()){ // Line2 is by logic not empty here. So this check is not required.
builder.motd(List.of(motd.line1(), motd.line2()));
}
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* Copyright (c) 2022-2024 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
@@ -23,27 +23,13 @@
*
*/
package ch.andre601.advancedserverlist.core.interfaces;
package ch.andre601.advancedserverlist.core.migration.minimotd.serializing;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import java.util.List;
import java.nio.file.Path;
public interface PluginCore{
public record MiniMOTDConfig(boolean iconEnabled, boolean motdEnabled, List<Motd> motds, PlayerCount playerCount){
void loadCommands();
public record Motd(String icon, String line1, String line2){}
void loadEvents();
void loadMetrics();
AdvancedServerList getCore();
Path getPath();
PluginLogger getPluginLogger();
String getPlatformName();
String getPlatformVersion();
public record PlayerCount(boolean hidePlayers, boolean xMoreEnabled, int xMore, boolean maxPlayersEnabled, int maxPlayers){}
}
@@ -0,0 +1,129 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.migration.minimotd.serializing;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.SerializationException;
import org.spongepowered.configurate.serialize.TypeSerializer;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.List;
public class MiniMOTDSerializer implements TypeSerializer<MiniMOTDConfig>{
public static final MiniMOTDSerializer MINI_MOTD_SERIALIZER = new MiniMOTDSerializer();
public static final MotdSerializer MOTD_SERIALIZER = new MotdSerializer();
public static final PlayerCountSerializer PLAYER_COUNT_SERIALIZER = new PlayerCountSerializer();
@Override
public MiniMOTDConfig deserialize(Type type, ConfigurationNode node) throws SerializationException{
boolean iconsEnabled = node.node("icon-enabled").getBoolean();
boolean motdEnabled = node.node("motd-enabled").getBoolean();
List<MiniMOTDConfig.Motd> motds = node.node("motds").getList(MiniMOTDConfig.Motd.class);
MiniMOTDConfig.PlayerCount playerCount = node.node("player-count-settings").get(MiniMOTDConfig.PlayerCount.class);
return new MiniMOTDConfig(iconsEnabled, motdEnabled, motds, playerCount);
}
@Override
public void serialize(Type type, @Nullable MiniMOTDConfig obj, ConfigurationNode node) throws SerializationException{
if(obj == null){
node.raw(null);
return;
}
node.node("icon-enabled").set(obj.iconEnabled());
node.node("motd-enable").set(obj.motdEnabled());
node.node("motds").setList(MiniMOTDConfig.Motd.class, obj.motds());
node.node("player-count-settings").set(MiniMOTDConfig.PlayerCount.class, obj.playerCount());
}
public static class MotdSerializer implements TypeSerializer<MiniMOTDConfig.Motd>{
@Override
public MiniMOTDConfig.Motd deserialize(Type type, ConfigurationNode node) throws SerializationException{
String icon = node.node("icon").getString("");
String line1 = node.node("line1").getString("");
String line2 = node.node("line2").getString("");
return new MiniMOTDConfig.Motd(icon, line1, line2);
}
@Override
public void serialize(Type type, MiniMOTDConfig.@Nullable Motd obj, ConfigurationNode node) throws SerializationException{
if(obj == null){
node.raw(null);
return;
}
node.node("icon").set(obj.icon());
node.node("line1").set(obj.line1());
node.node("line2").set(obj.line2());
}
}
public static class PlayerCountSerializer implements TypeSerializer<MiniMOTDConfig.PlayerCount>{
@Override
public MiniMOTDConfig.PlayerCount deserialize(Type type, ConfigurationNode node) throws SerializationException{
boolean hidePlayerCount = node.node("hide-player-count").getBoolean();
boolean xMoreEnabled = node.node("just-x-more-settings", "just-x-more-enabled").getBoolean();
int xMore = node.node("just-x-more-settings", "x-value").getInt();
boolean maxPlayersEnabled = node.node("max-players-enabled").getBoolean();
int maxPlayers = node.node("max-players").getInt();
return new MiniMOTDConfig.PlayerCount(hidePlayerCount, xMoreEnabled, xMore, maxPlayersEnabled, maxPlayers);
}
@Override
public void serialize(Type type, MiniMOTDConfig.@Nullable PlayerCount obj, ConfigurationNode node) throws SerializationException{
if(obj == null){
node.raw(null);
return;
}
node.node("allow-exceeding-maximum").set(false);
node.node("disable-player-list-hover").set(false);
node.node("fake-players", "fake-players").set("25%");
node.node("fake-players", "fake-players-enabled").set(false);
node.node("hide-player-count").set(obj.hidePlayers());
node.node("just-x-more-settings", "just-x-more-enabled").set(obj.xMoreEnabled());
node.node("just-x-more-settings", "x-value").set(obj.xMore());
node.node("max-players").set(obj.maxPlayers());
node.node("max-players-enabled").set(obj.maxPlayersEnabled());
node.node("servers").setList(String.class, Collections.emptyList());
}
}
}
@@ -0,0 +1,461 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.migration.serverlistplus;
import ch.andre601.advancedserverlist.api.objects.NullBool;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.interfaces.commands.CmdSender;
import ch.andre601.advancedserverlist.core.profiles.profile.ProfileSerializer;
import net.minecrell.serverlistplus.core.ServerListPlusCore;
import net.minecrell.serverlistplus.core.config.PersonalizedStatusConf;
import net.minecrell.serverlistplus.core.config.ServerStatusConf;
import net.minecrell.serverlistplus.core.util.BooleanOrList;
import net.minecrell.serverlistplus.core.util.IntegerRange;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.SerializationException;
import org.spongepowered.configurate.yaml.NodeStyle;
import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class SLPConfigMigrator{
private static final Pattern RGB_COLOR_PATTERN = Pattern.compile("&(?<color>#[a-fA-F0-9]{6})");
private static final Pattern COLOR_CODE_PATTERN = Pattern.compile("&(?<color>[abcdefklmnorABCDEFKLMNOR0123456789])");
private static final Pattern RGB_GRADIENT_PATTERN = Pattern.compile(
"%gradient" +
"(?<start>#[a-fA-F0-9]{6})" + // Starting color
"(?<end>#[a-fA-F0-9]{6})" + // Ending color
"%" +
"(?<text>.+?)" + // Text
"%gradient%");
private static final Map<String, String> STATIC_REPLACEMENTS = Map.of(
"%player%", "${player name}",
"%uuid%", "${player uuid}",
"%_uuid_%", "${player uuid}",
"%online%", "${server playersOnline}",
"%max%", "${server playersMax}");
public static int migrate(AdvancedServerList<?> core, CmdSender sender){
ServerListPlusCore slpCore = ServerListPlusCore.getInstance();
PluginLogger logger = core.getPlugin().getPluginLogger();
if(slpCore == null){
logger.warn("[Migrator - ServerListPlus] Cannot migrate ServerListPlus config. ServerListPlus is not active!");
return 0;
}
ServerStatusConf conf = slpCore.getConf(ServerStatusConf.class);
if(conf == null){
logger.warn("[Migrator - ServerListPlus] Cannot migrate ServerListPlus configuration. Received configuration was null.");
return 0;
}
PersonalizedStatusConf.StatusConf defConf = conf.Default;
PersonalizedStatusConf.StatusConf personalizedConf = conf.Personalized;
PersonalizedStatusConf.StatusConf banned = conf.Banned;
sender.sendPrefixedMsg("Migrating <white>Default</white>...");
int defConfParsed = parseConf(core, sender, defConf, Type.DEFAULT);
sender.sendPrefixedMsg("Migrating <white>Personalized</white>...");
int personalizedParsed = parseConf(core, sender, personalizedConf, Type.PERSONALIZED);
sender.sendPrefixedMsg("Migrating <white>Banned</white>...");
int bannedParsed = parseConf(core, sender, banned, Type.BANNED);
return defConfParsed + personalizedParsed + bannedParsed;
}
private static int parseConf(AdvancedServerList<?> core, CmdSender sender, PersonalizedStatusConf.StatusConf conf, Type type){
PluginLogger logger = core.getPlugin().getPluginLogger();
if(conf == null){
logger.info("[Migrator - ServerListPlus] No StatusConf found for type %s. Skipping...", type.getName());
sender.sendPrefixedMsg(" -> Not found! Skipping...");
return 0;
}
ProfileEntry.Builder builder = ProfileEntry.empty().builder();
List<ProfileEntry.Builder> profiles = new ArrayList<>();
List<List<String>> motds = resolveMotds(conf.Description);
List<String> favicons = resolveFavicons(conf.Favicon);
List<List<String>> hovers = resolveHover(conf.Players);
NullBool hidePlayers = conf.Players != null ? NullBool.resolve(conf.Players.Hidden) : NullBool.NOT_SET;
List<Integer> maxPlayers = resolveMaxPlayers(conf.Players);
List<String> playerCount = resolvePlayerCounts(conf.Players);
int size = getMaxListSize(motds, favicons, hovers, maxPlayers, playerCount);
// Only add profiles entries when there are more than 2 entries of an option.
// Avoids a profiles option with a single entry that has no options whatsoever.
if(size > 1){
for(int i = 0; i < size; i++){
profiles.add(ProfileEntry.empty().builder());
}
}
apply(motds, builder, profiles, ProfileEntry.Builder::motd);
apply(favicons, builder, profiles, ProfileEntry.Builder::favicon);
apply(hovers, builder, profiles, ProfileEntry.Builder::players);
apply(maxPlayers, builder, profiles, (build, count) -> build.maxPlayersEnabled(NullBool.TRUE).maxPlayersCount(String.valueOf(count)));
apply(playerCount, builder, profiles, ProfileEntry.Builder::playerCountText);
builder.hidePlayersEnabled(hidePlayers);
ProfileEntry entry = builder.build();
List<ProfileEntry> profileEntries = profiles.stream()
.map(ProfileEntry.Builder::build)
.toList();
boolean profilesInvalid = profileEntries.isEmpty() || profileEntries.stream().anyMatch(ProfileEntry::isInvalid);
if(entry.isInvalid() && profilesInvalid){
logger.warn("[Migrator - ServerListPlus] Unable to parse ServerListPlus configuration of type %s. Generated ProfileEntry was invalid.", type.getName());
sender.sendErrorMsg(" -> <red>Received invalid Configuration.");
return 0;
}
Path profile = core.getPlugin().getFolderPath().resolve("profiles").resolve(type.getFile());
if(Files.exists(profile)){
logger.warn("[Migrator - ServerListPlus] Cannot create new file %s. One with the same name is already present", type.getFile());
sender.sendErrorMsg(" -> <red>File</red> %s <red>already present.", type.getFile());
return 0;
}
try{
Files.createFile(profile);
}catch(IOException ex){
logger.warn("[Migrator - ServerListPlus] Encountered an IOException while trying to create file %s.", ex, type.getFile());
sender.sendErrorMsg(" -> <red>File creation error.");
return 0;
}
YamlConfigurationLoader loader = YamlConfigurationLoader.builder()
.path(profile)
.indent(2)
.nodeStyle(NodeStyle.BLOCK)
.defaultOptions(opt -> opt.serializers(build -> build.register(ProfileEntry.class, ProfileSerializer.INSTANCE)))
.build();
ConfigurationNode node;
try{
node = loader.load();
}catch(IOException ex){
logger.warn("[Migrator - ServerListPlus] Encountered an IOException while trying to load file %s.", ex, type.getFile());
sender.sendErrorMsg(" -> <red>File loading error.");
return 0;
}
if(node == null){
logger.warn("[Migrator - ServerListPlus] Cannot migrate Configuration of type %s. ConfigurationNode was null.", type.getName());
sender.sendErrorMsg(" -> <red>File loading error.");
return 0;
}
try{
node.node("priority")
.set(type != Type.DEFAULT ? 1 : 0);
if(type == Type.PERSONALIZED){
node.node("condition")
.set("${player name} != \"" +
core.getFileHandler().getString("Anonymous", "unknownPlayer", "name") +
"\"");
}else
if(type == Type.BANNED){
node.node("condition")
.set("${player isBanned}");
}
if(!profiles.isEmpty()){
node.node("profiles").setList(ProfileEntry.class, profileEntries);
}
node.set(entry);
}catch(SerializationException ex){
logger.warn("[Migrator - ServerListPlus] Encountered a SerializationException while setting values.", ex);
sender.sendErrorMsg(" -> <red>Error while updating file</red> %s<red>.", type.getFile());
return 0;
}
try{
loader.save(node);
sender.sendPrefixedMsg(" -> <green>Completed!");
return 1;
}catch(IOException ex){
logger.warn("[Migrator - ServerListPlus] Encountered an IOException while trying to save new file %s.", ex, type.getFile());
sender.sendErrorMsg(" -> <red>File saving error.");
return 0;
}
}
private static int getMaxListSize(List<?>... lists){
int size = 0;
for(List<?> list : lists){
if(list.size() > size)
size = list.size();
}
return size;
}
private static List<List<String>> resolveMotds(List<String> descriptions){
if(descriptions == null || descriptions.isEmpty())
return Collections.emptyList();
List<List<String>> motds = new ArrayList<>();
for(String line : descriptions){
motds.add(getList(line));
}
return motds;
}
private static List<String> resolveFavicons(PersonalizedStatusConf.StatusConf.FaviconConf faviconConf){
if(faviconConf == null || faviconConf.Disabled != null && faviconConf.Disabled)
return Collections.emptyList();
List<String> list = new ArrayList<>();
if(faviconConf.Heads != null){
for(String head : faviconConf.Heads){
list.add(
"https://mc-heads.net/avatar/" +
replacePlaceholders(head) +
"/64/nohelm"
);
}
}
if(faviconConf.Helms != null){
for(String helm : faviconConf.Helms){
list.add(replacePlaceholders(helm));
}
}
if(faviconConf.Files != null){
for(String file : faviconConf.Files){
if(!file.toLowerCase(Locale.ROOT).endsWith(".png"))
continue;
list.add(replacePlaceholders(file));
}
}
return list;
}
private static List<List<String>> resolveHover(PersonalizedStatusConf.StatusConf.PlayersConf playersConf){
if(playersConf == null)
return Collections.emptyList();
BooleanOrList<String> booleanOrList = playersConf.Hover;
if(booleanOrList == null)
return Collections.emptyList();
if(booleanOrList.getList() != null){
List<List<String>> hovers = new ArrayList<>();
for(String line : booleanOrList.getList()){
if(line == null)
continue;
hovers.add(getList(line));
}
return hovers;
}
return Collections.emptyList();
}
private static List<Integer> resolveMaxPlayers(PersonalizedStatusConf.StatusConf.PlayersConf playersConf){
if(playersConf == null)
return Collections.emptyList();
List<IntegerRange> maxPlayers = playersConf.Max;
if(maxPlayers == null)
return Collections.emptyList();
List<Integer> values = new ArrayList<>();
for(IntegerRange range : maxPlayers){
if(range == null)
continue;
values.add(range.to());
}
return values;
}
private static List<String> resolvePlayerCounts(PersonalizedStatusConf.StatusConf.PlayersConf playersConf){
if(playersConf == null)
return Collections.emptyList();
if(playersConf.Slots == null)
return Collections.emptyList();
return playersConf.Slots.stream()
.map(SLPConfigMigrator::replacePlaceholders)
.toList();
}
private static <T> void apply(List<T> list, ProfileEntry.Builder builder, List<ProfileEntry.Builder> profiles,
BiConsumer<ProfileEntry.Builder, T> builderConsumer){
if(list.size() == 1){
builderConsumer.accept(builder, list.get(0));
}else
if(list.size() > 1){
for(int i = 0; i < list.size(); i++){
builderConsumer.accept(profiles.get(i), list.get(i));
}
}
}
private static List<String> getList(String line){
return Arrays.asList(replacePlaceholders(line).split("\n"));
}
private static String replacePlaceholders(String input){
StringBuilder parsed = new StringBuilder(input);
StringBuilder builder = new StringBuilder();
Matcher rgbColorMatcher = RGB_COLOR_PATTERN.matcher(parsed.toString());
if(rgbColorMatcher.find()){
do{
rgbColorMatcher.appendReplacement(builder, "<" + rgbColorMatcher.group("color") + ">");
}while(rgbColorMatcher.find());
rgbColorMatcher.appendTail(builder);
parsed = builder;
}
Matcher colorCodeMatcher = COLOR_CODE_PATTERN.matcher(parsed.toString());
if(colorCodeMatcher.find()){
builder.setLength(0);
do{
String color = colorCodeMatcher.group("color").toLowerCase(Locale.ROOT);
switch(color){
case "a" -> colorCodeMatcher.appendReplacement(builder, "<green>");
case "b" -> colorCodeMatcher.appendReplacement(builder, "<aqua>");
case "c" -> colorCodeMatcher.appendReplacement(builder, "<red>");
case "d" -> colorCodeMatcher.appendReplacement(builder, "<light_purple>");
case "e" -> colorCodeMatcher.appendReplacement(builder, "<yellow>");
case "f" -> colorCodeMatcher.appendReplacement(builder, "<white>");
case "k" -> colorCodeMatcher.appendReplacement(builder, "<obfuscated>");
case "l" -> colorCodeMatcher.appendReplacement(builder, "<bold>");
case "m" -> colorCodeMatcher.appendReplacement(builder, "<strikethrough>");
case "n" -> colorCodeMatcher.appendReplacement(builder, "<underlined>");
case "o" -> colorCodeMatcher.appendReplacement(builder, "<italic>");
case "r" -> colorCodeMatcher.appendReplacement(builder, "<reset>");
case "0" -> colorCodeMatcher.appendReplacement(builder, "<black>");
case "1" -> colorCodeMatcher.appendReplacement(builder, "<dark_blue>");
case "2" -> colorCodeMatcher.appendReplacement(builder, "<dark_green>");
case "3" -> colorCodeMatcher.appendReplacement(builder, "<dark_aqua>");
case "4" -> colorCodeMatcher.appendReplacement(builder, "<dark_red>");
case "5" -> colorCodeMatcher.appendReplacement(builder, "<dark_purple>");
case "6" -> colorCodeMatcher.appendReplacement(builder, "<gold>");
case "7" -> colorCodeMatcher.appendReplacement(builder, "<grey>");
case "8" -> colorCodeMatcher.appendReplacement(builder, "<dark_grey>");
case "9" -> colorCodeMatcher.appendReplacement(builder, "<blue>");
// This one shouldn't be reachable given the pattern, but you never know...
default -> colorCodeMatcher.appendReplacement(builder, "&" + color);
}
}while(colorCodeMatcher.find());
colorCodeMatcher.appendTail(builder);
parsed = builder;
}
Matcher rgbGradientMatcher = RGB_GRADIENT_PATTERN.matcher(parsed.toString());
if(rgbGradientMatcher.find()){
builder.setLength(0);
do{
String start = rgbGradientMatcher.group("start");
String end = rgbGradientMatcher.group("end");
String text = rgbGradientMatcher.group("text");
rgbGradientMatcher.appendReplacement(builder, "<gradient:" + start + ":" + end + ">" + text + "</gradient>");
}while(rgbGradientMatcher.find());
rgbGradientMatcher.appendTail(builder);
parsed = builder;
}
return replaceStaticPlaceholders(parsed);
}
private static String replaceStaticPlaceholders(StringBuilder input){
if(input.isEmpty())
return "";
for(Map.Entry<String, String> entry : STATIC_REPLACEMENTS.entrySet()){
int index = 0;
while((index = input.indexOf(entry.getKey(), index)) != -1){
input.replace(index, index + entry.getKey().length(), entry.getValue());
index += entry.getValue().length();
}
}
return input.toString();
}
private enum Type{
DEFAULT("Default", "slp_default.yml"),
PERSONALIZED("Personalized", "slp_personalized.yml"),
BANNED("Banned", "slp_banned.yml");
private final String name, file;
Type(String name, String file){
this.name = name;
this.file = file;
}
public String getName(){
return name;
}
public String getFile(){
return file;
}
}
}
@@ -0,0 +1,52 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.objects;
import java.time.Duration;
import java.util.function.Supplier;
public class CacheUtil<T>{
private final Duration duration;
private CacheValue<T> cache = null;
public CacheUtil(Duration duration){
this.duration = duration;
}
public T get(Supplier<T> supplier){
if(cache == null || cache.expired())
cache = new CacheValue<>(System.currentTimeMillis(), duration, supplier.get());
return cache.value();
}
private record CacheValue<T>(long timestamp, Duration duration, T value){
public boolean expired(){
return (timestamp < 0L) || System.currentTimeMillis() - timestamp >= duration.toMillis();
}
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -23,17 +23,8 @@
*
*/
package ch.andre601.advancedserverlist.core.interfaces;
package ch.andre601.advancedserverlist.core.objects;
import net.kyori.adventure.text.format.NamedTextColor;
import java.util.UUID;
public interface CmdSender{
boolean hasPermission(String permission);
default void sendMsg(){
sendMsg("");
}
void sendMsg(String msg, Object... args);
}
public record CachedPlayer(String ip, String name, UUID uuid){}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -25,14 +25,11 @@
package ch.andre601.advancedserverlist.core.parsing;
import ch.andre601.advancedserverlist.core.profiles.replacer.StringReplacer;
import ch.andre601.advancedserverlist.core.profiles.replacer.placeholders.Placeholders;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
public class ComponentParser{
@@ -59,11 +56,6 @@ public class ComponentParser{
return new ComponentParser(String.join("\n", lines));
}
public ComponentParser replacements(Placeholders placeholders){
text = StringReplacer.replace(text, placeholders.getReplacements());
return this;
}
public ComponentParser modifyText(Function<String, String> function){
this.text = function.apply(text);
return this;
@@ -73,6 +65,10 @@ public class ComponentParser{
return mm.deserialize(text);
}
public static String toMMString(Component component){
return mm.serialize(component);
}
@Override
public String toString(){
return legacy.serialize(toComponent());
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -25,108 +25,147 @@
package ch.andre601.advancedserverlist.core.profiles;
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.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.profiles.conditions.Expression;
import ch.andre601.expressionparser.ParseWarnCollector;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.SerializationException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Random;
public class ServerListProfile{
public record ServerListProfile(int priority, String condition, ProfileEntry defaultProfile, List<ProfileEntry> profiles, String file){
private static final Random random = new Random();
private final int priority;
private final List<Expression> expressions;
private final List<String> motd;
private final List<String> players;
private final String playerCount;
private final boolean hidePlayers;
private final boolean oneMore;
public ServerListProfile(ConfigurationNode node, PluginLogger logger){
this.priority = node.node("priority").getInt();
this.expressions = createExpressions(getList(node, "conditions", false), logger);
this.motd = getList(node, "motd", true);
this.players = getList(node, "players", false);
this.playerCount = node.node("playerCount").getString("");
this.hidePlayers = node.node("hidePlayers").getBoolean();
this.oneMore = node.node("oneMore").getBoolean();
}
public int getPriority(){
return priority;
}
public List<String> getMotd(){
return motd;
}
public List<String> getPlayers(){
return players;
}
public String getPlayerCount(){
return playerCount;
}
public boolean shouldHidePlayers(){
return hidePlayers;
}
public boolean isOneMore(){
return oneMore;
}
public boolean evalConditions(Map<String, Object> replacements){
if(expressions.isEmpty())
public boolean evalConditions(AdvancedServerList<?> core, GenericPlayer player, GenericServer server){
if(condition == null || condition.isEmpty())
return true;
for(Expression expression : expressions){
if(!expression.evaluate(replacements)){
return false;
ParseWarnCollector collector = new ParseWarnCollector(condition);
PluginLogger logger = core.getPlugin().getPluginLogger();
boolean result = core.getParser().evaluate(condition, player, server, collector);
if(collector.hasWarnings()){
logger.warn("Encountered %d Error(s) while parsing condition for file '%s':", collector.getWarnings().size(), file);
for(ParseWarnCollector.Context context : collector.getWarnings()){
logger.warn(" - At position %s:", context.position() == -1 ? "Unknown" : context.position());
logger.warn(" %s", condition);
logger.warn(" ".repeat(context.position() + 4) + "^");
logger.warn(" -> %s", context.message());
}
}
return true;
return result;
}
private List<Expression> createExpressions(List<String> list, PluginLogger logger) {
if(list.isEmpty())
return Collections.emptyList();
public ProfileEntry getRandomProfile(){
if(profiles.isEmpty()){
return null;
}
List<Expression> expressions = new ArrayList<>();
for(String str : list){
Expression expression = new Expression(str);
if(expression.getResult() != Expression.ExpressionResult.VALID){
logger.warn("Detected Invalid condition '%s'! Cause: %s", str, expression.getResult().getMessage());
if(profiles.size() == 1)
return profiles.get(0); // No need to run a random for 1 profile.
synchronized(random){
return profiles.get(random.nextInt(profiles.size()));
}
}
/*
* Returns true if the Profile...
* ...doesn't have any valid MOTD set AND
* ...doesn't have any player hover set AND
* ...doesn't have a player count text set and hidePlayers is false AND
* ...doesn't have a favicon set.
*/
public boolean isInvalidProfile(){
if(profiles().isEmpty())
return defaultProfile().isInvalid();
boolean profilesValid = false;
for(ProfileEntry profile : profiles()){
if(profile.isInvalid())
continue;
}
expressions.add(expression);
profilesValid = true;
break;
}
return expressions;
return !profilesValid && defaultProfile.isInvalid();
}
private List<String> getList(ConfigurationNode node, String key, boolean trim){
List<String> list;
try{
list = node.node(key).getList(String.class);
}catch(SerializationException ex){
return Collections.emptyList();
public static class Builder{
private final String fileName;
private final ConfigurationNode node;
private final int priority;
private final PluginLogger logger;
private String condition = null;
private List<ProfileEntry> profiles = new ArrayList<>();
private ProfileEntry defaultProfile = ProfileEntry.empty();
private Builder(String fileName, ConfigurationNode node, PluginLogger logger){
this.fileName = fileName;
this.node = node;
this.priority = node.node("priority").getInt();
this.logger = logger;
}
if(list == null)
return Collections.emptyList();
public static Builder resolve(String fileName, ConfigurationNode node, PluginLogger logger){
return new Builder(fileName, node, logger)
.resolveCondition()
.resolveProfiles()
.resolveDefaultProfile();
}
if(trim && list.size() > 2)
return list.subList(0, 2);
private Builder resolveCondition(){
if(node == null)
throw new IllegalStateException("ConfigurationNode was null!");
String condition = node.node("condition").getString();
if(condition == null || condition.isEmpty())
return this;
this.condition = condition;
return this;
}
return list;
private Builder resolveProfiles(){
if(node == null)
throw new IllegalStateException("ConfigurationNode was null!");
try{
this.profiles = node.node("profiles").getList(ProfileEntry.class);
}catch(SerializationException ex){
logger.warn("Encountered a SerializationException while resolving the profiles entry for %s", ex, fileName);
}
return this;
}
private Builder resolveDefaultProfile(){
if(node == null)
throw new IllegalStateException("ConfigurationNode was null!");
try{
this.defaultProfile = node.get(ProfileEntry.class);
}catch(SerializationException ex){
logger.warn("Encountered a SerializationException while resolving the global profile for %s", ex, fileName);
}
return this;
}
public ServerListProfile build(){
return new ServerListProfile(this.priority, this.condition, this.defaultProfile, this.profiles, this.fileName);
}
}
}
@@ -1,223 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022 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.profiles.conditions;
import ch.andre601.advancedserverlist.core.profiles.replacer.StringReplacer;
import java.util.Map;
import java.util.function.Function;
public class Expression{
private ExpressionResult result = ExpressionResult.VALID;
private String left;
private Operator operator = Operator.UNKNOWN;
private String right;
public Expression(String expression){
resolveExpression(expression);
}
public boolean evaluate(Map<String, Object> replacements){
String newLeft = StringReplacer.replace(left, replacements).trim();
String newRight = StringReplacer.replace(right, replacements).trim();
return operator.evaluate(newLeft, newRight);
}
public ExpressionResult getResult(){
return result;
}
private void resolveExpression(String expression){
if(expression == null || expression.isEmpty()){
result = ExpressionResult.INVALID_NO_EXPRESSION;
return;
}
char[] chars = expression.toCharArray();
StringBuilder left = new StringBuilder();
StringBuilder right = new StringBuilder();
boolean foundOperator = false;
for(int i = 0; i < chars.length; i++){
char c = chars[i];
char next = (i == (chars.length - 1)) ? '\0' : chars[i + 1];
Operator tmp = Operator.getOperand(c, next);
if(tmp == Operator.UNKNOWN){
if(foundOperator){
right.append(c);
}else{
left.append(c);
}
continue;
}
if(foundOperator){
result = ExpressionResult.INVALID_DOUBLE_OPERATOR;
return;
}
operator = tmp;
foundOperator = true;
}
if(left.isEmpty() || right.isEmpty()){
result = ExpressionResult.INVALID_EMPTY_PARTS;
return;
}
this.left = left.toString();
this.right = right.toString();
}
public enum Operator{
LESS_THAN('<', '\0'){
@Override
public boolean evaluate(String left, String right){
int leftInt = Operator.getInt(left);
int rightInt = Operator.getInt(right);
return leftInt < rightInt;
}
},
LESS_OR_EQUAL('<', '='){
@Override
public boolean evaluate(String left, String right){
int leftInt = Operator.getInt(left);
int rightInt = Operator.getInt(right);
return leftInt <= rightInt;
}
},
EQUAL('=', '\0'){
@Override
public boolean evaluate(String left, String right){
return left.equals(right);
}
},
NOT_EQUAL('!', '='){
@Override
public boolean evaluate(String left, String right){
return !left.equals(right);
}
},
GREATER_THAN('>', '\0'){
@Override
public boolean evaluate(String left, String right){
int leftInt = Operator.getInt(left);
int rightInt = Operator.getInt(right);
return leftInt > rightInt;
}
},
GREATER_OR_EQUAL('>', '='){
@Override
public boolean evaluate(String left, String right){
int leftInt = Operator.getInt(left);
int rightInt = Operator.getInt(right);
return leftInt >= rightInt;
}
},
UNKNOWN('\0', '\0'){
@Override
public boolean evaluate(String left, String right){
return false;
}
};
private static final Operator[] VALUES = values();
private final char first;
private final char second;
Operator(char first, char second){
this.first = first;
this.second = second;
}
public static Operator getOperand(char first, char second){
for(Operator operator : VALUES){
if(operator.first == first){
if((!operator.hasSecond() && second != '=') || operator.second == second)
return operator;
}
}
return Operator.UNKNOWN;
}
public boolean hasSecond(){
return second != '\0';
}
public abstract boolean evaluate(String left, String right);
private static int getInt(String text){
try{
return Integer.parseInt(text);
}catch(NumberFormatException ex){
return text.length();
}
}
}
public enum ExpressionResult{
VALID{
@Override
public String getMessage(){
return null;
}
},
INVALID_NO_EXPRESSION{
@Override
public String getMessage(){
return "Received empty condition which isn't allowed!";
}
},
INVALID_DOUBLE_OPERATOR{
@Override
public String getMessage(){
return "Condition contained two operands.";
}
},
INVALID_EMPTY_PARTS{
@Override
public String getMessage(){
return "Received condition with either left or right part being empty.";
}
};
public abstract String getMessage();
}
}
@@ -0,0 +1,82 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.profiles.conditions;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.core.profiles.conditions.placeholders.reader.PlaceholderTokenReader;
import ch.andre601.advancedserverlist.core.profiles.conditions.placeholders.reader.PlaceholderValueReader;
import ch.andre601.advancedserverlist.core.profiles.conditions.placeholders.tokens.CustomExpressionTokenizer;
import ch.andre601.expressionparser.ExpressionParserEngine;
import ch.andre601.expressionparser.ParseWarnCollector;
import ch.andre601.expressionparser.operator.Operator;
import ch.andre601.expressionparser.parsers.ExpressionTemplateParser;
import ch.andre601.expressionparser.parsers.ValueReader;
import ch.andre601.expressionparser.templates.ExpressionTemplate;
import ch.andre601.expressionparser.tokens.Token;
import ch.andre601.expressionparser.tokens.readers.TokenReader;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import java.util.List;
public class ProfileConditionParser implements ExpressionParserEngine{
private final CustomExpressionTokenizer tokenizer;
private final ExpressionTemplateParser parser;
private ProfileConditionParser(List<TokenReader> tokenReaders, ImmutableMap<Token, Operator> operators, ImmutableList<ValueReader> valueReaders){
this.tokenizer = new CustomExpressionTokenizer(tokenReaders);
this.parser = new ExpressionTemplateParser(operators, valueReaders);
}
public static ProfileConditionParser create(){
return new ProfileConditionParserBuilder().addDefaults()
.addTokenReader(new PlaceholderTokenReader(-20))
.addValueReader(new PlaceholderValueReader())
.build();
}
public boolean evaluate(String text, GenericPlayer player, GenericServer server, ParseWarnCollector collector){
ExpressionTemplate result = parser.parse(tokenizer.parse(text, player, server, collector), collector);
if(result == null)
return false;
return result.returnBooleanExpression().evaluate();
}
@Override
public ExpressionTemplate compile(String s, ParseWarnCollector parseWarnCollector){
return null;
}
private static class ProfileConditionParserBuilder extends ExpressionParserEngine.Builder<ProfileConditionParser>{
@Override
public ProfileConditionParser build(){
return new ProfileConditionParser(this.getTokenReaders(), ImmutableMap.copyOf(this.getOperators()), ImmutableList.copyOf(this.getValueReaders()));
}
}
}
@@ -0,0 +1,48 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.profiles.conditions.placeholders.reader;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.expressionparser.ParseWarnCollector;
import ch.andre601.expressionparser.tokens.Token;
import ch.andre601.expressionparser.tokens.readers.TokenReader;
import java.text.ParsePosition;
public abstract class CustomTokenReader extends TokenReader{
public CustomTokenReader(int priority){
super(priority);
}
@Override
public Token read(String text, ParsePosition position, ParseWarnCollector collector){
return null;
}
public abstract Token read(String text, ParsePosition position, GenericPlayer player, GenericServer server, ParseWarnCollector collector);
}
@@ -0,0 +1,51 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.profiles.conditions.placeholders.reader;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.core.profiles.conditions.placeholders.tokens.PlaceholderToken;
import ch.andre601.advancedserverlist.core.profiles.replacer.StringReplacer;
import ch.andre601.expressionparser.ParseWarnCollector;
import ch.andre601.expressionparser.tokens.Token;
import java.text.ParsePosition;
public class PlaceholderTokenReader extends CustomTokenReader{
public PlaceholderTokenReader(int priority){
super(priority);
}
@Override
public Token read(String text, ParsePosition position, GenericPlayer player, GenericServer server, ParseWarnCollector collector){
if(position.getIndex() + 1 < text.length() && text.charAt(position.getIndex()) == '$' && text.charAt(position.getIndex() + 1) == '{'){
position.setIndex(position.getIndex() + 2);
return new PlaceholderToken(StringReplacer.parsePlaceholder(text, position, player, server, collector));
}
return null;
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* Copyright (c) 2022-2024 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
@@ -23,29 +23,24 @@
*
*/
package ch.andre601.advancedserverlist.spigot.commands;
package ch.andre601.advancedserverlist.core.profiles.conditions.placeholders.reader;
import ch.andre601.advancedserverlist.spigot.SpigotCore;
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 ch.andre601.advancedserverlist.core.profiles.conditions.placeholders.tokens.PlaceholderToken;
import ch.andre601.expressionparser.ParseWarnCollector;
import ch.andre601.expressionparser.parsers.ExpressionTemplateParser;
import ch.andre601.expressionparser.parsers.ValueReader;
import ch.andre601.expressionparser.templates.ExpressionTemplate;
import ch.andre601.expressionparser.tokens.Token;
public class CmdAdvancedServerList implements CommandExecutor{
SpigotCore plugin;
BukkitAudiences bukkitAudiences;
public CmdAdvancedServerList(SpigotCore plugin){
this.plugin = plugin;
bukkitAudiences = BukkitAudiences.create(plugin);
}
import java.util.List;
public class PlaceholderValueReader extends ValueReader{
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, @NotNull String[] args){
plugin.getCore().getCommandHandler().handle(new SpigotCmdSender(sender, bukkitAudiences), args);
return true;
public ExpressionTemplate read(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector){
if(tokens.get(0) instanceof PlaceholderToken){
PlaceholderToken token = (PlaceholderToken)tokens.remove(0);
return token.getValue();
}
return null;
}
}
@@ -0,0 +1,85 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.profiles.conditions.placeholders.tokens;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.core.profiles.conditions.placeholders.reader.CustomTokenReader;
import ch.andre601.expressionparser.ParseWarnCollector;
import ch.andre601.expressionparser.tokens.Token;
import ch.andre601.expressionparser.tokens.readers.TokenReader;
import com.google.common.collect.Ordering;
import java.text.ParsePosition;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
public class CustomExpressionTokenizer{
private static final Ordering<TokenReader> TOKEN_READER_ORDERING = Ordering.from(Comparator.comparingInt(TokenReader::getPriority)).reverse();
private final List<TokenReader> tokenReaders;
public CustomExpressionTokenizer(Iterable<TokenReader> tokenReaders){
this.tokenReaders = TOKEN_READER_ORDERING.immutableSortedCopy(tokenReaders);
}
public List<Token> parse(String text, GenericPlayer player, GenericServer server, ParseWarnCollector collector){
ParsePosition position = new ParsePosition(0);
List<Token> tokens = new LinkedList<>();
next_token:
while(true){
while(position.getIndex() < text.length() && Character.isWhitespace(text.charAt(position.getIndex())))
position.setIndex(position.getIndex() + 1);
if(position.getIndex() >= text.length())
break;
for(TokenReader tokenReader : tokenReaders){
Token token;
if(tokenReader instanceof CustomTokenReader customTokenReader){
if(null != (token = customTokenReader.read(text, position, player, server, collector))){
tokens.add(token);
continue next_token;
}
}else{
if(null != (token = tokenReader.read(text, position, collector))){
tokens.add(token);
continue next_token;
}
}
}
collector.appendWarningFormatted(position.getIndex(), "Illegal Token '%c'.", text.charAt(position.getIndex()));
break;
}
return tokens;
}
}
@@ -0,0 +1,81 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.profiles.conditions.placeholders.tokens;
import ch.andre601.expressionparser.expressions.ToBooleanExpression;
import ch.andre601.expressionparser.expressions.ToDoubleExpression;
import ch.andre601.expressionparser.expressions.ToStringExpression;
import ch.andre601.expressionparser.templates.ExpressionTemplate;
import ch.andre601.expressionparser.tokens.Token;
public class PlaceholderToken extends Token{
private final Placeholder value;
public PlaceholderToken(Placeholder value){
super("PLACEHOLDER");
this.value = value;
}
public Placeholder getValue(){
return value;
}
public static class Placeholder implements ExpressionTemplate{
private final ToBooleanExpression toBooleanExpression;
private final ToDoubleExpression toDoubleExpression;
private final ToStringExpression toStringExpression;
public Placeholder(String value){
double doubleValue;
try{
doubleValue = Double.parseDouble(value);
}catch(NumberFormatException ex){
doubleValue = value.length();
}
this.toBooleanExpression = ToBooleanExpression.literal(Boolean.parseBoolean(value));
this.toDoubleExpression = ToDoubleExpression.literal(doubleValue);
this.toStringExpression = ToStringExpression.literal(value);
}
@Override
public ToBooleanExpression returnBooleanExpression(){
return toBooleanExpression;
}
@Override
public ToDoubleExpression returnDoubleExpression(){
return toDoubleExpression;
}
@Override
public ToStringExpression returnStringExpression(){
return toStringExpression;
}
}
}
@@ -0,0 +1,210 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.profiles.handlers;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.*;
import java.util.stream.Stream;
public class FaviconHandler<F>{
private final AdvancedServerList<F> core;
private final PluginLogger logger;
private final ThreadPoolExecutor faviconThreadPool;
private final Cache<String, CompletableFuture<F>> faviconCache;
private final Map<String, F> localFavicons = new HashMap<>();
private final HttpClient client = HttpClient.newHttpClient();
public FaviconHandler(AdvancedServerList<F> core){
this.core = core;
this.logger = core.getPlugin().getPluginLogger();
this.faviconThreadPool = createFaviconThreadPool();
this.faviconCache = CacheBuilder.newBuilder()
.expireAfterWrite(core.getFileHandler().getLong(1, 1, "faviconCacheTime"), TimeUnit.MINUTES)
.build();
loadLocalFavicons();
}
public F getFavicon(String input){
if(localFavicons.size() > 0){
logger.debug(FaviconHandler.class, "Current Local Favicons:");
for(String key : localFavicons.keySet()){
logger.debug(FaviconHandler.class, " - %s", key);
}
}
if(localFavicons.containsKey(input.toLowerCase(Locale.ROOT))){
logger.debug(FaviconHandler.class, "Input matches local favicon Image. Returning it...");
return localFavicons.get(input.toLowerCase(Locale.ROOT));
}
try{
logger.debug(FaviconHandler.class, "Getting Favicon image from cache...");
return faviconCache.get(input, () -> getFuture(input)).getNow(null);
}catch(ExecutionException ex){
logger.warn("Received ExecutionException while retrieving Favicon for '%s'.", ex, input);
return null;
}
}
public void cleanCache(){
faviconCache.invalidateAll();
loadLocalFavicons();
}
private CompletableFuture<F> getFuture(String input){
if(input.toLowerCase(Locale.ROOT).startsWith("https://")){
logger.debug(FaviconHandler.class, "Resolving URL '%s'...", input);
return CompletableFuture.supplyAsync(() -> fromURL(core, input), this.faviconThreadPool);
}else
if(input.toLowerCase(Locale.ROOT).endsWith(".png")){
logger.debug(FaviconHandler.class, "Resolving image file '%s'...", input);
return CompletableFuture.completedFuture(localFavicons.get(input.toLowerCase(Locale.ROOT)));
}else{
logger.debug(FaviconHandler.class, "Resolving Name/UUID as https://mc-heads.net/avatar/%s/64...", input);
return CompletableFuture.supplyAsync(() -> fromURL(core, "https://mc-heads.net/avatar/" + input + "/64"), this.faviconThreadPool);
}
}
private void loadLocalFavicons(){
this.localFavicons.clear();
logger.info("Loading local image files as Favicons...");
Path folder = core.getPlugin().getFolderPath().resolve("favicons");
if(!Files.exists(folder)){
try{
Files.createDirectories(folder);
logger.info("Created favicons folder.");
}catch(IOException ex){
logger.warn("Cannot create favicons folder. Encountered an IOException.", ex);
return;
}
}
try(Stream<Path> pathStream = Files.list(folder)){
pathStream.filter(Files::isRegularFile)
.filter(file -> file.getFileName().toString().endsWith(".png"))
.forEach(this::loadFile);
}catch(IOException ex){
logger.warn("Cannot load files from Favicons folder.", ex);
}
}
private void loadFile(Path path){
try(InputStream stream = Files.newInputStream(path)){
F favicon = createFavicon(stream);
if(favicon == null){
logger.warn("Cannot create Favicon from file '%s'. Received Favicon was null.", path.getFileName().toString());
return;
}
localFavicons.put(path.getFileName().toString().toLowerCase(Locale.ROOT), favicon);
logger.info("Loaded file '%s' as Favicon.", path.getFileName().toString());
}catch(IOException ex){
logger.warn("Cannot create Favicon from file '%s'. Encountered IOException.", ex);
}
}
private F fromURL(AdvancedServerList<F> core, String url){
try{
logger.debug(FaviconHandler.class, "Creating Request for URL '%s'...", url);
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(url))
.header("User-Agent", "AdvancedServerList-" + core.getPlugin().getLoader() + "/" + core.getVersion())
.build();
try(InputStream stream = client.send(request, HttpResponse.BodyHandlers.ofInputStream()).body()){
return createFavicon(stream);
}catch(InterruptedException | IOException ex){
logger.warn("Cannot create Favicon from URL '%s'. Encountered an Exception.", ex, url);
return null;
}
}catch(URISyntaxException ex){
logger.warn("Cannot create Favicon from URL '%s'. Encountered an IOException.", ex, url);
return null;
}
}
private F createFavicon(InputStream stream){
try{
logger.debug(FaviconHandler.class, "Creating BufferedImage from InputStream...");
BufferedImage original = ImageIO.read(stream);
if(original == null){
logger.warn("Cannot create Favicon. Received null BufferedImage.");
return null;
}
// Don't waste resources resizing images already having right size.
if(original.getWidth() == 64 && original.getHeight() == 64){
logger.debug(FaviconHandler.class, "BufferedImage is 64x64 pixels. No resizing needed.");
return core.getPlugin().createFavicon(original);
}
logger.debug(FaviconHandler.class, "Resizing image to 64x64 pixels...");
BufferedImage image = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics2D = image.createGraphics();
graphics2D.drawImage(original, 0, 0, 64, 64, null);
graphics2D.dispose();
logger.debug(FaviconHandler.class, "Image resized! Returning Favicon...");
return core.getPlugin().createFavicon(image);
}catch(Exception ex){
logger.warn("Unable to create Favicon. Received Exception.", ex);
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;
});
}
}
@@ -0,0 +1,181 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.profiles.handlers;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import ch.andre601.advancedserverlist.core.objects.CachedPlayer;
import com.google.gson.Gson;
import com.google.gson.JsonIOException;
import com.google.gson.JsonSyntaxException;
import io.leangen.geantyref.TypeToken;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
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;
public class PlayerHandler{
private final AdvancedServerList<?> core;
private final PluginLogger logger;
private final Path cache;
private final Type listType = new TypeToken<ArrayList<CachedPlayer>>(){}.getType();
private final Gson gson = new Gson();
// UUID of MHF_Question
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){
this.core = core;
this.logger = core.getPlugin().getPluginLogger();
this.cache = core.getPlugin().getFolderPath().resolve("playercache.json");
}
public void load(){
if(!Files.exists(cache)){
logger.info("No playercache.json file present. Skipping...");
return;
}
if(core.getFileHandler().getBoolean("disableCache")){
logger.info("'disableCache' is set to true. Skipping playercache.json loading...");
return;
}
try(BufferedReader reader = Files.newBufferedReader(cache)){
cachedPlayers = gson.fromJson(reader, listType);
}catch(IOException ex){
logger.warn("Encountered IOException while reading the playercache.json file!", ex);
return;
}catch(JsonIOException | JsonSyntaxException ex){
logger.warn("Encountered JsonSyntaxException while parsing playercache.json file!", ex);
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());
}
public void save(){
if(cachedPlayers.isEmpty()){
logger.info("No players in cache to save. Skipping...");
return;
}
if(core.getFileHandler().getBoolean("disableCache")){
logger.info("'disable_cache' is set to true. Skipping saving of cached players...");
return;
}
try(BufferedWriter writer = Files.newBufferedWriter(cache, StandardCharsets.UTF_8)){
gson.toJson(cachedPlayers, listType, writer);
logger.info("Successfully saved playercache.json file.");
}catch(IOException ex){
logger.warn("Encountered IOException while saving cached players to playercache.json!", ex);
}
}
public void addPlayer(String ip, String name, UUID uuid){
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("disableCache"))
return getDefaultPlayer();
for(CachedPlayer player : cachedPlayers){
if(player.ip().equals(key))
return player;
}
return getDefaultPlayer();
}
public CachedPlayer getCachedPlayer(UUID uuid){
for(CachedPlayer player : cachedPlayers){
if(player.uuid().equals(uuid))
return player;
}
return getDefaultPlayer();
}
public void clearCache(){
cachedPlayers.clear();
defaultPlayer = null;
}
private boolean contains(String ip){
for(CachedPlayer player : cachedPlayers){
if(player.ip().equals(ip))
return true;
}
return false;
}
private CachedPlayer getDefaultPlayer(){
if(defaultPlayer != null)
return defaultPlayer;
return (defaultPlayer = new CachedPlayer(
"0.0.0.0",
core.getFileHandler().getString("Anonymous", "unknownPlayer", "name"),
convertToUUID(core.getFileHandler().getString(defaultUUID.toString(), "unknownPlayer", "uuid"))
));
}
private UUID convertToUUID(String uuid){
try{
return UUID.fromString(uuid);
}catch(IllegalArgumentException ex){
// This is always a valid UUID.
return defaultUUID;
}
}
}
@@ -1,122 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2022 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.profiles.players;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.profiles.replacer.EntryList;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
public class PlayerHandler{
private final AdvancedServerList core;
private final Path cache;
private final EntryList<String, String> players = new EntryList<>();
public PlayerHandler(AdvancedServerList core){
this.core = core;
this.cache = core.getPath().resolve("cache.data");
}
public void load(){
if(!cache.toFile().exists()){
core.getPluginLogger().info("No cache.data present. Skipping...");
return;
}
List<String> lines;
try{
lines = Files.readAllLines(cache);
}catch(IOException ex){
core.getPluginLogger().warn("Encountered IOException while trying to read cache.data", ex);
return;
}
if(lines.isEmpty()){
core.getPluginLogger().info("cache.data is empty. Skipping...");
return;
}
for(String line : lines){
String[] parts = line.split("=", 2);
if(parts.length < 2 || parts[0].isEmpty() || parts[1].isEmpty())
continue;
if(players.containsKey(parts[0]))
continue;
players.add(parts[0], parts[1]);
}
core.getPluginLogger().info("Loaded " + players.size() + " players into cache!");
}
public void save(){
if(players.isEmpty()){
core.getPluginLogger().info("No data to save. Skipping...");
return;
}
StringJoiner joiner = new StringJoiner("\n");
for(Map.Entry<String, String> entry : players){
joiner.add(entry.getKey() + "=" + entry.getValue());
}
try{
BufferedWriter writer = Files.newBufferedWriter(cache, StandardCharsets.UTF_8, StandardOpenOption.WRITE);
writer.write(joiner.toString());
writer.close();
core.getPluginLogger().info("Successfully saved cache.data file.");
}catch(IOException ex){
core.getPluginLogger().warn("Cannot save player data to cache.data file!", ex);
}
}
public void addPlayer(String name, String ip){
if(players.containsKey(name))
return;
players.add(name, ip);
}
public String getPlayerByIp(String ip){
for(Map.Entry<String, String> entry : players){
if(entry.getValue().equals(ip))
return entry.getKey();
}
return core.getFileHandler().getString("Anonymous", "unknown_player");
}
}
@@ -0,0 +1,163 @@
/*
* 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.profiles.profile;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.api.objects.NullBool;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.profiles.ServerListProfile;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.SerializationException;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
public class ProfileManager{
/*
* Convenience method to get a ProfileEntry instance with values merged.
* If the random profile's value is not null will it be used instead of the default one.
*/
public static ProfileEntry merge(ServerListProfile profile){
ProfileEntry defEntry = profile.defaultProfile();
ProfileEntry entry = profile.getRandomProfile();
List<String> motd = resolve(defEntry, entry, ProfileEntry::motd);
List<String> players = resolve(defEntry, entry, ProfileEntry::players);
String playerCountText = resolve(defEntry, entry, ProfileEntry::playerCountText);
String favicon = resolve(defEntry, entry, ProfileEntry::favicon);
NullBool hidePlayersEnabled = resolve(defEntry, entry, ProfileEntry::hidePlayersEnabled);
NullBool extraPlayersEnabled = resolve(defEntry, entry, ProfileEntry::extraPlayersEnabled);
NullBool maxPlayersEnabled = resolve(defEntry, entry, ProfileEntry::maxPlayersEnabled);
NullBool onlinePlayersEnabled = resolve(defEntry, entry, ProfileEntry::onlinePlayersEnabled);
String extraPlayersCount = resolve(defEntry, entry, ProfileEntry::extraPlayersCount);
String maxPlayersCount = resolve(defEntry, entry, ProfileEntry::maxPlayersCount);
String onlinePlayersCount = resolve(defEntry, entry, ProfileEntry::onlinePlayersCount);
return new ProfileEntry.Builder()
.motd(motd)
.players(players)
.playerCountText(playerCountText)
.favicon(favicon)
.hidePlayersEnabled(hidePlayersEnabled)
.extraPlayersEnabled(extraPlayersEnabled)
.maxPlayersEnabled(maxPlayersEnabled)
.onlinePlayersEnabled(onlinePlayersEnabled)
.extraPlayersCount(extraPlayersCount)
.maxPlayersCount(maxPlayersCount)
.onlinePlayersCount(onlinePlayersCount)
.build();
}
public static ServerListProfile resolveProfile(AdvancedServerList<?> core, GenericPlayer player, GenericServer server){
for(ServerListProfile profile : core.getFileHandler().getProfiles()){
if(profile.isInvalidProfile())
continue;
if(profile.evalConditions(core, player, server))
return profile;
}
return null;
}
public static ProfileEntry retrieveProfileEntry(ConfigurationNode node){
List<String> motd = resolveList(node, "motd");
List<String> players = resolveList(node, "playerCount", "hover");
String playerCountText = node.node("playerCount", "text").getString("");
String favicon = node.node("favicon").getString("");
NullBool hidePlayers = resolveNullBool(node, "playerCount", "hidePlayers");
NullBool extraPlayersEnabled = resolveNullBool(node, "playerCount", "extraPlayers", "enabled");
NullBool maxPlayersEnabled = resolveNullBool(node, "playerCount", "maxPlayers", "enabled");
NullBool onlinePlayersEnabled = resolveNullBool(node, "playerCount", "onlinePlayers", "enabled");
String extraPlayers = resolveNullableString(node, "playerCount", "extraPlayers", "amount");
String maxPlayers = resolveNullableString(node, "playerCount", "maxPlayers", "amount");
String onlinePlayers = resolveNullableString(node, "playerCount", "onlinePlayers", "amount");
return new ProfileEntry.Builder()
.motd(motd)
.players(players)
.playerCountText(playerCountText)
.favicon(favicon)
.hidePlayersEnabled(hidePlayers)
.extraPlayersEnabled(extraPlayersEnabled)
.maxPlayersEnabled(maxPlayersEnabled)
.onlinePlayersEnabled(onlinePlayersEnabled)
.extraPlayersCount(extraPlayers)
.maxPlayersCount(maxPlayers)
.onlinePlayersCount(onlinePlayers)
.build();
}
public static boolean checkOption(Object obj){
if(obj == null)
return false;
if(obj instanceof List<?> list){
return !list.isEmpty(); // Check if list isn't empty
}else
if(obj instanceof String str){
return !str.isEmpty(); // Check if String is not empty
}else
if(obj instanceof NullBool nb){
return nb.getOrDefault(false); // Return NullBool's value
}
return false;
}
private static <T> T resolve(ProfileEntry defProfile, ProfileEntry profile, Function<ProfileEntry, T> function){
if(profile == null || !checkOption(function.apply(profile)))
return function.apply(defProfile);
return function.apply(profile);
}
private static List<String> resolveList(ConfigurationNode node, Object... path){
try{
return node.node(path).getList(String.class);
}catch(SerializationException ex){
return Collections.emptyList();
}
}
private static NullBool resolveNullBool(ConfigurationNode node, Object... path){
if(node.node(path).virtual())
return NullBool.NOT_SET;
return NullBool.resolve(node.node(path).getBoolean());
}
private static String resolveNullableString(ConfigurationNode node, Object... path){
if(node.node(path).virtual())
return null;
return node.node(path).getString();
}
}
@@ -0,0 +1,63 @@
/*
* 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.profiles.profile;
import ch.andre601.advancedserverlist.api.profiles.ProfileEntry;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.serialize.SerializationException;
import org.spongepowered.configurate.serialize.TypeSerializer;
import java.lang.reflect.Type;
public class ProfileSerializer implements TypeSerializer<ProfileEntry>{
public static final ProfileSerializer INSTANCE = new ProfileSerializer();
@Override
public ProfileEntry deserialize(Type type, ConfigurationNode node){
return ProfileManager.retrieveProfileEntry(node);
}
@Override
public void serialize(Type type, @Nullable ProfileEntry profile, ConfigurationNode node) throws SerializationException{
if(profile == null){
node.raw(null);
return;
}
node.node("motd").set(profile.motd());
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().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());
node.node("playerCount", "onlinePlayers", "enabled").set(profile.onlinePlayersEnabled().getOrDefault(false));
node.node("playerCount", "onlinePlayers", "amount").set(profile.onlinePlayersCount() == null ? "0" : profile.onlinePlayersCount());
}
}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* 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
@@ -25,20 +25,127 @@
package ch.andre601.advancedserverlist.core.profiles.replacer;
import java.util.Map;
import ch.andre601.advancedserverlist.api.AdvancedServerListAPI;
import ch.andre601.advancedserverlist.api.PlaceholderProvider;
import ch.andre601.advancedserverlist.api.objects.GenericPlayer;
import ch.andre601.advancedserverlist.api.objects.GenericServer;
import ch.andre601.advancedserverlist.core.AdvancedServerList;
import ch.andre601.advancedserverlist.core.profiles.conditions.placeholders.tokens.PlaceholderToken;
import ch.andre601.expressionparser.ParseWarnCollector;
import java.text.ParsePosition;
public class StringReplacer{
public static String replace(String input, Map<String, Object> replacements){
StringBuilder output = new StringBuilder(input);
int index;
for(Map.Entry<String, Object> entry : replacements.entrySet()){
index = 0;
while((index = output.indexOf(entry.getKey(), index)) != -1){
output.replace(index, index + entry.getKey().length(), String.valueOf(entry.getValue()));
index += String.valueOf(entry.getValue()).length();
public static String replace(String input, GenericPlayer player, GenericServer server){
if(input == null)
return null;
ParsePosition position = new ParsePosition(0);
StringBuilder builder = new StringBuilder(input.length());
while(position.getIndex() < input.length()){
if(position.getIndex() + 1 < input.length() && input.charAt(position.getIndex()) == '$' && input.charAt(position.getIndex() + 1) == '{'){
position.setIndex(position.getIndex() + 2);
builder.append(parsePlaceholder0(input, position, player, server, null));
continue;
}
builder.append(input.charAt(position.getIndex()));
position.setIndex(position.getIndex() + 1);
}
return builder.toString();
}
public static PlaceholderToken.Placeholder parsePlaceholder(String input, ParsePosition position, GenericPlayer player, GenericServer server, ParseWarnCollector collector){
return new PlaceholderToken.Placeholder(parsePlaceholder0(input, position, player, server, collector));
}
private static String parsePlaceholder0(String input, ParsePosition position, GenericPlayer player, GenericServer server, ParseWarnCollector collector){
AdvancedServerListAPI api = AdvancedServerList.getApi();
int index = position.getIndex();
StringBuilder identifier = new StringBuilder();
StringBuilder values = new StringBuilder();
boolean identified = false;
boolean invalid = true;
char[] chars = input.substring(index).toCharArray();
for(final char c : chars){
index++;
if(c == '}'){
invalid = false;
break;
}
if(c == ' ' && !identified){
identified = true;
continue;
}
if(identified){
values.append(c);
}else{
identifier.append(c);
}
}
return output.toString();
String identifierStr = identifier.toString();
String valuesStr = values.toString();
StringBuilder raw = new StringBuilder();
// Condition parsing needs one extra increase of index... for some reason
if(collector != null)
index++;
position.setIndex(index);
if(invalid){
raw.append("${").append(identifierStr);
if(identified)
raw.append(' ').append(valuesStr);
if(collector != null)
collector.appendWarningFormatted(index, "Placeholder '%s' does not have a closing bracket (})", raw.toString());
return raw.toString();
}
PlaceholderProvider provider = api.retrievePlaceholderProvider(identifierStr);
if(provider == null){
raw.append("${").append(identifierStr);
if(identified)
raw.append(' ').append(valuesStr);
raw.append('}');
if(collector != null)
collector.appendWarningFormatted(index, "Placeholder '%s' does not have any available PlaceholderProvider", raw.toString());
return raw.toString();
}
String replacement = provider.parsePlaceholder(valuesStr, player, server);
if(replacement == null){
raw.append("${").append(identifierStr);
if(identified)
raw.append(' ').append(valuesStr);
raw.append('}');
if(collector != null)
collector.appendWarningFormatted(index, "Placeholder '%s' has an invalid value String '%s'", raw.toString(), valuesStr);
return raw.toString();
}
return replacement;
}
}
+119 -4
View File
@@ -1,8 +1,123 @@
#
# 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.
#
unknown_player: "Anonymous"
unknownPlayer:
#
# The name to use.
#
# Default: Anonymous
#
name: "Anonymous"
#
# The UUID to use.
#
# Default: 606e2ff0-ed77-4842-9d6c-e1d3321c7838 (UUID of MHF_Question).
#
uuid: "606e2ff0-ed77-4842-9d6c-e1d3321c7838"
#
# Whether statistics should be sent to bStats or not.
# Should the Caching of players be disabled?
#
send_statistics: true
# When set to true will no player joining the server be cached and saved to the playercache.json file.
# This will also cause placeholders using a cached player such as ${player name} to no longer work.
#
# Default: false
#
disableCache: false
#
# Should AdvancedServerList check for new versions?
#
# When set to true will AdvancedServerList look for a new update on startup and repeat that check
# every 12 hours after that.
# It uses Modrinth to check for updates.
#
# Default: true
#
checkUpdates: true
#
# Should debug mode be enabled?
#
# Additional messages prefixed with [DEBUG] will be printed in the console when this option is set
# to true.
# Enabling this option is only recommended for when you have problems, or have been told to enable
# it by the plugin developer, as it can otherwise spam your console.
#
# Default: false
#
debug: false
#
# Sets how long Favicons should be cached. Value is in minutes with the lowest possible value being 1.
#
# This option only affects dynamic favicons created from a placeholder or URL. Local favicons will
# not be affected.
#
# Default: 1
#
faviconCacheTime: 1
#
# Options to disable while the Maintenance Plugin is present and Maintenance Mode is active.
#
# Should an option be removed from this section will AdvancedServerList continue to set it, as if
# the Maintenance plugin isn't active.
#
disableDuringMaintenance:
#
# Whether MOTD changing should be disabled while Maintenance mode is active.
#
# Default: true
#
motd: true
#
# Whether favicon changing should be disabled while Maintenance mode is active.
#
# Default: true
#
favicon: true
#
# Whether player hiding should be disabled while Maintenance mode is active.
#
# Default: true
#
hidePlayers: true
#
# Whether player count text changing should be disabled while Maintenance mode is active.
#
# Default: true
#
playerCountText: true
#
# Whether player count hover changing should be disabled while Maintenance mode is active.
#
# Default: true
#
playerCountHover: true
#
# Whether the extra players feature should be disabled while Maintenance mode is active.
#
# Default: true
#
extraPlayers: true
#
# Whether the max players feature should be disabled while Maintenance mode is active.
#
# Default: true
#
maxPlayers: true
#
# Whether the online players feature should be disabled while Maintenance mode is active.
#
# Default: true
#
onlinePlayers: true
#
# 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.
#
configVersion: ${plugin.config.version}
+174 -48
View File
@@ -1,70 +1,196 @@
#
# Set the priority of this profile.
# Higher number = Higher priority.
# If there are multiple profiles (files) will they be sorted by priority, starting with highest.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#priority
# Read more: https://asl.andre601.ch/profiles/#priority
#
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).
# Set condition(s) that should return true to display this profile.
# This allows you to create profiles to only show for specific scenarios (i.e. player is banned).
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#conditions
# Multiple conditions can be chaing with the keywords 'and', 'or', or their counterparts '&&' and '||'.
#
#conditions:
# - '{playerVersion} < 759'
# No condition or an empty condition will be treated as true by default.
#
# Read more: https://asl.andre601.ch/profiles/#condition
#
condition: ''
#
# Set the MOTD that should be displayed.
# Supports HEX colors for 1.16+ servers including gradients using MiniMessage's <gradient:color:color> format.
#
# Remove this option or set it to motd: [] to not alter the MOTD.
# Set one or multiple profiles.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#motd
# A profile can contain the same options as used in the file itself, except for priority and condition.
# If multiple entries are present, a random one will be selected. Any options set in the selected profile will override
# any existing option in the file.
#
# Example: The below profile configuration will randomly change the MOTD between two types, but keep the Hover text
# the same.
#
# When not present or empty (profiles: []), no profiles will be used and global options from the file will be used instead.
#
# Read more: https://asl.andre601.ch/profiles/#profiles
#
profiles:
- motd: ['<aqua>Line A', '<gold>Line B']
- motd:
- '<aqua>Line 1'
- '<gold>Line 2'
#
# Set the "Message of the day" to display.
# This option supports RGB colors for 1.16+ Servers and clients, including gradients using MiniMessage's <gradient>
# option.
#
# Only the first two lines will be considered and any additional one is ignored.
#
# When not present or empty (motd: []), no MOTD will be set.
#
# Read more: https://asl.andre601.ch/profiles/#motd
#
motd:
- '<grey>Line 1'
- '<grey>Line 2'
- '<grey>First Line'
- '<grey>Second Line'
#
# Sets if players should be hidden.
# When set to true will the player count be replaced with ???
# Additionally will the options 'players' and 'playerCount' be ignored by the plugin.
# Set the Favicon (image on the left of a server entry) to display.
# This option supports three types of inputs:
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#hideplayers
# 1. Name, including .png extension, pointing to an image located in the plugin's favicons folder.
# 2. URL pointing to an image.*
# 3. Player name, UUID or placeholders returning one of these.*
# https://mc-heads.net will be used to retrieve an image of the provided name/UUID.
#
hidePlayers: false
# * These images are loaded asynchronously, meaning they may not yet be "ready" when AdvancedServerList is done with
# the event, requiring a refresh of the server list by the player to have it shown.
#
# Any images above or below 64x64 pixels will be automatically resized to these dimensions.
#
# If not present or empty (favicon: ''), defaults to not modifying the favicon.
#
# Read more: https://asl.andre601.ch/profiles/#favicon
#
favicon: ''
#
# Set the hover text that usually displays online players.
# Only normal colours such as <grey> or <aqua> are supported.
# Contains options for modifying the player count (Text displaying <online>/<max>).
#
# Remove this option or set it to players: [] to not alter the hover text.
# Read more: https://asl.andre601.ch/profiles/#playercount
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#players
#
players:
- '<grey>Line 1'
- '<grey>Line 2'
- '<grey>Line 3'
#
# Set the text that usually shows online players and max that can join.
# Only normal colours such as <grey> or <aqua> are supported.
#
# Remove this option or set it to playerCount: '' to not alter the player count text.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profiles#playercount
#
playerCount: '<grey>Text'
#
# When set to true, will the ${server maxPlayers} placeholder display the online players + 1
# This means that if 20 players are online, 21 would be displayed by the placeholder with this option enabled.
#
# Note that the placeholder will not be affected in the conditions.
#
# Read more: https://github.com/Andre601/AdvancedServerList/wiki/Profile#onemore
#
oneMore: false
playerCount:
#
# Set whether the Player count should be hidden.
# When set to true, the player count will be displayed as '???' instead of the usual '<online>/<max>' and all other
# playerCount options, except for extraPlayers and maxPlayers, will be ignored.
#
# If not present, defaults to false.
#
# Read more: https://asl.andre601.ch/profiles/#hideplayers
#
hidePlayers: false
#
# Set the lines shown when the player hovers over the player count.
# Unlike the MOTD option does this one only support basic color and formatting codes. Any RGB colors will be
# downsampled to the nearest matching color.
#
# If not present or empty (hover: []), defaults to not modifying the hover.
#
# Read more: https://asl.andre601.ch/profiles/#hover
#
hover:
- '<aqua>Line 1'
- '<yellow>Line 2'
- '<green>Line 3'
#
# Set the text that should be displayed instead of the default '<online>/<max>' text.
#
# Using this option will show the server as "outdated" to the client (Have the ping icon crossed out).
# This cannot be fixed and would require Mojang to change stuff.
#
# If not present or empty (text: ''), defaults to not modifying the text.
#
# Read more: https://asl.andre601.ch/profiles/#text
#
text: ''
#
# The extraPlayers feature allows to set a number that should be added to the current online players and then be
# used as the "max" player count.
#
# Using this feature will modify the ${server playersMax} placeholder, except for usage in the condition option.
#
# Read more: https://asl.andre601.ch/profiles/#extraplayers
#
extraPlayers:
#
# Set whether the extraPlayers feature should be enabled or not.
# When set to true, the max players count will be modified to be the number of online players with the 'amount'
# value added to it.
#
# If not present, defaults to false.
#
# Read more: https://asl.andre601.ch/profiles/#extraplayers-enabled
#
enabled: false
#
# Set the number that should be added to the online player count to then use as the new max player count.
# Placeholders resolving to numbers can be used here.
#
# Example: Setting this to 1 will result in ${server playersMax} displaying 11 while 10 players are online,
# 9 when 8 are online and so on.
#
# If not present, defaults to 0.
#
# Read more: https://asl.andre601.ch/profiles/#extraplayers-amount
#
amount: 0
#
# The maxPlayers feature allows to set a number to use as the max player count to display.
#
# Using this feature will modify the ${server playersMax} placeholder, except for usage in the condition option.
#
# Read more: https://asl.andre601.ch/profiles/#maxplayers
#
maxPlayers:
#
# Set whether the maxPlayers feature should be enabled or not.
# When set to true, the max player count will be set to the 'amount' value.
#
# If not present, defaults to false.
#
# Read more: https://asl.andre601.ch/profiles/#maxplayers-enabled
#
enabled: false
#
# Set the number that should be used as the new max players count.
# Placeholders resolving to numbers can be used here.
#
# If not present, defaults to 0.
#
# Read more: https://asl.andre601.ch/profiles/#maxplayers-amount
#
amount: 0
#
# The onlinePlayers feature allows to set a number to use as the online player count to display.
#
# Read more: https://asl.andre601.ch/profiles/#onlineplayers
#
onlinePlayers:
#
# Set whether the onlinePlayers feature should be enabled or not.
# When set to true, the max player count will be set to the 'amount' value.
#
# If not present, defaults to false.
#
# Read more: https://asl.andre601.ch/profiles/#onlineplayers-enabled
#
enabled: false
#
# Set the number that should be used as the new online players count.
# Placeholders resolving to numbers can be used here.
#
# If not present, defaults to current online player count.
#
# Read more: https://asl.andre601.ch/profiles/#onlineplayers-amount
#
amount: 0
+3 -2
View File
@@ -1,7 +1,7 @@
#
# MIT License
#
# Copyright (c) 2022 Andre_601
# 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
@@ -23,4 +23,5 @@
#
#
version=${plugin.version}
version=${plugin.version}
config-version=${plugin.config.version}
@@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2022 Andre_601
* Copyright (c) 2022-2024 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
@@ -23,33 +23,38 @@
*
*/
package ch.andre601.advancedserverlist.spigot.logging;
package ch.andre601.advancedserverlist.test;
import ch.andre601.advancedserverlist.core.interfaces.PluginLogger;
import java.util.logging.Level;
import java.util.logging.Logger;
public class SpigotLogger implements PluginLogger{
public class DummyPluginLogger implements PluginLogger{
@Override
public void debug(Class<?> clazz, String msg, Object... args){
info("[DEBUG] [" + clazz.getSimpleName() + "] " + msg, args);
}
private final Logger logger;
public SpigotLogger(Logger logger){
this.logger = logger;
@Override
public void debugWarn(Class<?> clazz, String msg, Object... args){
warn("[DEBUG] [" + clazz.getSimpleName() + "] " + msg, args);
}
@Override
public void info(String msg, Object... args){
logger.info(String.format(msg, args));
System.out.printf((msg) + "%n", args);
}
@Override
public void warn(String msg, Object... args){
logger.warning(String.format(msg, args));
System.out.printf((msg) + "%n", args);
}
@Override
public void warn(String msg, Throwable throwable){
logger.log(Level.WARNING, msg, throwable);
System.out.printf((msg) + "%n", throwable);
}
@Override
public void warn(String msg, Throwable throwable, Object... args){
System.out.printf((msg) + "%n", args);
}
}
@@ -0,0 +1,69 @@
/*
* MIT License
*
* Copyright (c) 2022-2024 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.test;
import ch.andre601.advancedserverlist.core.profiles.conditions.ProfileConditionParser;
import ch.andre601.expressionparser.ParseWarnCollector;
import org.junit.jupiter.api.Test;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class ExpressionParserTests{
private final ProfileConditionParser parser = ProfileConditionParser.create();
private final DummyPluginLogger logger = new DummyPluginLogger();
private final Map<String, Boolean> testValuesMap = getTestMap();
@Test
public void testBasicExpressionResults(){
for(Map.Entry<String, Boolean> values : testValuesMap.entrySet()){
logger.info("TEST[expression=\"%s\", expected=%b]", values.getKey(), values.getValue());
ParseWarnCollector collector = new ParseWarnCollector(values.getKey());
boolean result = parser.evaluate(values.getKey(), null, null, collector);
logger.info("Result (Output, Expected?): %b, %b", result, (result == values.getValue()));
assertEquals(result, values.getValue());
}
}
private Map<String, Boolean> getTestMap(){
return Map.of(
"20 > 10", true,
"10 > 20", false,
"10 = 10", true,
"10 = 20", false,
"(10 - 5) > (1 + 1)", true,
"(10 - 10) > (1 + 1)", false,
"100 > 50 and 50 < 100", true,
"100 < 50 and 50 > 100", false,
"true or 100 > 10", true,
"false or 100 < 10", false
);
}
}
@@ -0,0 +1,296 @@
/*
* 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.test;
import com.unascribed.flexver.FlexVerComparator;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class FlexVerTests{
private final String baseVersion = "1.0.0";
private final String versionMinor = "1.0.1";
private final String versionMajor = "1.1.0";
private final String versionBoth = "1.1.1";
private final String versionBeta = "1.0.0-b1";
private final String versionBetaMinor = "1.0.1-b1";
private final String versionBetaMajor = "1.1.0-b1";
private final String versionBetaBoth = "1.1.1-b1";
private final String versionBeta2 = "1.0.0-b2";
private final String versionBeta2Minor = "1.0.1-b2";
private final String versionBeta2Major = "1.1.0-b2";
private final String versionBeta2Both = "1.1.1-b2";
@Test
public void testFlexVerChecks(){
System.out.println("START: Version comparison Tests");
compareBaseVersion();
compareMinorVersion();
compareMajorVersion();
compareBothVersion();
compareBetaVersion();
compareBetaMinorVersion();
compareBetaMajorVersion();
compareBetaBothVersion();
compareBeta2Version();
compareBeta2MinorVersion();
compareBeta2MajorVersion();
compareBeta2BothVersion();
System.out.println("END: Version comparison Tests");
}
private void compareBaseVersion(){
System.out.println("┌────────────────────────────────┐");
System.out.println("│ Normal Version │");
System.out.println("│ │");
compare(baseVersion, "=", baseVersion, 0);
compare(baseVersion, "<", versionMinor, -1);
compare(baseVersion, "<", versionMajor, -1);
compare(baseVersion, "<", versionBoth, -1);
compare(baseVersion, ">", versionBeta, 1);
compare(baseVersion, "<", versionBetaMinor, -1);
compare(baseVersion, "<", versionBetaMajor, -1);
compare(baseVersion, "<", versionBetaBoth, -1);
compare(baseVersion, ">", versionBeta2, 1);
compare(baseVersion, "<", versionBeta2Minor, -1);
compare(baseVersion, "<", versionBeta2Major, -1);
compare(baseVersion, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareMinorVersion(){
System.out.println("│ Minor Version │");
System.out.println("│ │");
compare(versionMinor, ">", baseVersion, 1);
compare(versionMinor, "=", versionMinor, 0);
compare(versionMinor, "<", versionMajor, -1);
compare(versionMinor, "<", versionBoth, -1);
compare(versionMinor, ">", versionBeta, 1);
compare(versionMinor, ">", versionBetaMinor, 1);
compare(versionMinor, "<", versionBetaMajor, -1);
compare(versionMinor, "<", versionBetaBoth, -1);
compare(versionMinor, ">", versionBeta2, 1);
compare(versionMinor, ">", versionBeta2Minor, 1);
compare(versionMinor, "<", versionBeta2Major, -1);
compare(versionMinor, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareMajorVersion(){
System.out.println("│ Major Version │");
System.out.println("│ │");
compare(versionMajor, ">", baseVersion, 1);
compare(versionMajor, ">", versionMinor, 1);
compare(versionMajor, "=", versionMajor, 0);
compare(versionMajor, "<", versionBoth, -1);
compare(versionMajor, ">", versionBeta, 1);
compare(versionMajor, ">", versionBetaMinor, 1);
compare(versionMajor, ">", versionBetaMajor, 1);
compare(versionMajor, "<", versionBetaBoth, -1);
compare(versionMajor, ">", versionBeta2, 1);
compare(versionMajor, ">", versionBeta2Minor, 1);
compare(versionMajor, ">", versionBeta2Major, 1);
compare(versionMajor, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareBothVersion(){
System.out.println("│ Major + Minor Version │");
System.out.println("│ │");
compare(versionBoth, ">", baseVersion, 1);
compare(versionBoth, ">", versionMinor, 1);
compare(versionBoth, ">", versionMajor, 1);
compare(versionBoth, "=", versionBoth, 0);
compare(versionBoth, ">", versionBeta, 1);
compare(versionBoth, ">", versionBetaMinor, 1);
compare(versionBoth, ">", versionBetaMajor, 1);
compare(versionBoth, ">", versionBetaBoth, 1);
compare(versionBoth, ">", versionBeta2, 1);
compare(versionBoth, ">", versionBeta2Minor, 1);
compare(versionBoth, ">", versionBeta2Major, 1);
compare(versionBoth, ">", versionBeta2Both, 1);
System.out.println("├────────────────────────────────┤");
}
private void compareBetaVersion(){
System.out.println("│ Beta Version │");
System.out.println("│ │");
compare(versionBeta, "<", baseVersion, -1);
compare(versionBeta, "<", versionMinor, -1);
compare(versionBeta, "<", versionMajor, -1);
compare(versionBeta, "<", versionBoth, -1);
compare(versionBeta, "=", versionBeta, 0);
compare(versionBeta, "<", versionBetaMinor, -1);
compare(versionBeta, "<", versionBetaMajor, -1);
compare(versionBeta, "<", versionBetaBoth, -1);
compare(versionBeta, "<", versionBeta2, -1);
compare(versionBeta, "<", versionBeta2Minor, -1);
compare(versionBeta, "<", versionBeta2Major, -1);
compare(versionBeta, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareBetaMinorVersion(){
System.out.println("│ Beta Version Minor │");
System.out.println("│ │");
compare(versionBetaMinor, ">", baseVersion, 1);
compare(versionBetaMinor, "<", versionMinor, -1);
compare(versionBetaMinor, "<", versionMajor, -1);
compare(versionBetaMinor, "<", versionBoth, -1);
compare(versionBetaMinor, ">", versionBeta, 1);
compare(versionBetaMinor, "=", versionBetaMinor, 0);
compare(versionBetaMinor, "<", versionBetaMajor, -1);
compare(versionBetaMinor, "<", versionBetaBoth, -1);
compare(versionBetaMinor, ">", versionBeta2, 1);
compare(versionBetaMinor, "<", versionBeta2Minor, -1);
compare(versionBetaMinor, "<", versionBeta2Major, -1);
compare(versionBetaMinor, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareBetaMajorVersion(){
System.out.println("│ Beta Version Major │");
System.out.println("│ │");
compare(versionBetaMajor, ">", baseVersion, 1);
compare(versionBetaMajor, ">", versionMinor, 1);
compare(versionBetaMajor, "<", versionMajor, -1);
compare(versionBetaMajor, "<", versionBoth, -1);
compare(versionBetaMajor, ">", versionBeta, 1);
compare(versionBetaMajor, ">", versionBetaMinor, 1);
compare(versionBetaMajor, "=", versionBetaMajor, 0);
compare(versionBetaMajor, "<", versionBetaBoth, -1);
compare(versionBetaMajor, ">", versionBeta2, 1);
compare(versionBetaMajor, ">", versionBeta2Minor, 1);
compare(versionBetaMajor, "<", versionBeta2Major, -1);
compare(versionBetaMajor, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareBetaBothVersion(){
System.out.println("│ Beta Version Major + Minor │");
System.out.println("│ │");
compare(versionBetaBoth, ">", baseVersion, 1);
compare(versionBetaBoth, ">", versionMinor, 1);
compare(versionBetaBoth, ">", versionMajor, 1);
compare(versionBetaBoth, "<", versionBoth, -1);
compare(versionBetaBoth, ">", versionBeta, 1);
compare(versionBetaBoth, ">", versionBetaMinor, 1);
compare(versionBetaBoth, ">", versionBetaMajor, 1);
compare(versionBetaBoth, "=", versionBetaBoth, 0);
compare(versionBetaBoth, ">", versionBeta2, 1);
compare(versionBetaBoth, ">", versionBeta2Minor, 1);
compare(versionBetaBoth, ">", versionBeta2Major, 1);
compare(versionBetaBoth, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareBeta2Version(){
System.out.println("│ Beta Version 2 │");
System.out.println("│ │");
compare(versionBeta2, "<", baseVersion, -1);
compare(versionBeta2, "<", versionMinor, -1);
compare(versionBeta2, "<", versionMajor, -1);
compare(versionBeta2, "<", versionBoth, -1);
compare(versionBeta2, ">", versionBeta, 1);
compare(versionBeta2, "<", versionBetaMinor, -1);
compare(versionBeta2, "<", versionBetaMajor, -1);
compare(versionBeta2, "<", versionBetaBoth, -1);
compare(versionBeta2, "=", versionBeta2, 0);
compare(versionBeta2, "<", versionBeta2Minor, -1);
compare(versionBeta2, "<", versionBeta2Major, -1);
compare(versionBeta2, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareBeta2MinorVersion(){
System.out.println("│ Beta Version 2 Minor │");
System.out.println("│ │");
compare(versionBeta2Minor, ">", baseVersion, 1);
compare(versionBeta2Minor, "<", versionMinor, -1);
compare(versionBeta2Minor, "<", versionMajor, -1);
compare(versionBeta2Minor, "<", versionBoth, -1);
compare(versionBeta2Minor, ">", versionBeta, 1);
compare(versionBeta2Minor, ">", versionBetaMinor, 1);
compare(versionBeta2Minor, "<", versionBetaMajor, -1);
compare(versionBeta2Minor, "<", versionBetaBoth, -1);
compare(versionBeta2Minor, ">", versionBeta2, 1);
compare(versionBeta2Minor, "=", versionBeta2Minor, 0);
compare(versionBeta2Minor, "<", versionBeta2Major, -1);
compare(versionBeta2Minor, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareBeta2MajorVersion(){
System.out.println("│ Beta Version 2 Major │");
System.out.println("│ │");
compare(versionBeta2Major, ">", baseVersion, 1);
compare(versionBeta2Major, ">", versionMinor, 1);
compare(versionBeta2Major, "<", versionMajor, -1);
compare(versionBeta2Major, "<", versionBoth, -1);
compare(versionBeta2Major, ">", versionBeta, 1);
compare(versionBeta2Major, ">", versionBetaMinor, 1);
compare(versionBeta2Major, ">", versionBetaMajor, 1);
compare(versionBeta2Major, "<", versionBetaBoth, -1);
compare(versionBeta2Major, ">", versionBeta2, 1);
compare(versionBeta2Major, ">", versionBeta2Minor, 1);
compare(versionBeta2Major, "=", versionBeta2Major, 0);
compare(versionBeta2Major, "<", versionBeta2Both, -1);
System.out.println("├────────────────────────────────┤");
}
private void compareBeta2BothVersion(){
System.out.println("│ Beta Version 2 Major + Minor │");
System.out.println("│ │");
compare(versionBeta2Both, ">", baseVersion, 1);
compare(versionBeta2Both, ">", versionMinor, 1);
compare(versionBeta2Both, ">", versionMajor, 1);
compare(versionBeta2Both, "<", versionBoth, -1);
compare(versionBeta2Both, ">", versionBeta, 1);
compare(versionBeta2Both, ">", versionBetaMinor, 1);
compare(versionBeta2Both, ">", versionBetaMajor, 1);
compare(versionBeta2Both, ">", versionBetaBoth, 1);
compare(versionBeta2Both, ">", versionBeta2, 1);
compare(versionBeta2Both, ">", versionBeta2Minor, 1);
compare(versionBeta2Both, ">", versionBeta2Major, 1);
compare(versionBeta2Both, "=", versionBeta2Both, 0);
System.out.println("└────────────────────────────────┘");
}
private void compare(String version1, String comparator, String version2, int expected){
String expression = version1 + " " + comparator + " " + version2 + "?";
int result = FlexVerComparator.compare(version1, version2);
System.out.printf("│ %-24s %5b │\n", expression, FlexVerComparator.compare(version1, version2) == expected);
assertEquals(result, expected);
}
}
+54
View File
@@ -0,0 +1,54 @@
#
# 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 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")
elif type == "deprecated": return _admo(text = args, type = "deprecated")
else: return _admo(text = args)
# 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>",
])
+26
View File
@@ -0,0 +1,26 @@
#
# A simple hook that replaces any appearances of \| with just |.
#
# There is an inconsistency between GitHub flavourited Markdown and Python Markdown
# where the former treats | as part of a table, even if it is inside inline code
# causing unwanted table rendering.
#
# The only way to prevent this is to escape it by prefixing it with a back slash (\).
# Unfortunately does this cause issues on Python-Markdown, as it renders inline code
# content as-is without special treatments whatsoever, meaning that `\|` will be
# rendered as <code>\|</code> in the end.
#
# Using this hook, `\|` is being turned into `|` before further processing, resulting
# in <code>|</code> being rendered in the end, while preserving proper table rendering
# on GitHub and co.
#
import re
from mkdocs.config.defaults import MkDocsConfig
from mkdocs.structure.files import File, Files
from mkdocs.structure.pages import Page
def on_page_markdown(
markdown: str, *, page: Page, config: MkDocsConfig, files: Files
):
return re.sub(r"\\\|","|",markdown)
+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', defaults=page.meta.defaults) }}
{% endif %}
{% if page.meta.classes %}
{{ info.summary('Class Summary', page.meta.classes, details_type='class', defaults=page.meta.defaults) }}
{% endif %}
{% if page.meta.enums %}
{{ info.summary('Enum Constant Summary', page.meta.enums, details_type='enum', defaults=page.meta.defaults) }}
{% endif %}
{% if page.meta.methods or page.meta.inherits %}
{{ info.summary('Method Summary', page.meta.methods, page.meta.inherits, details_type='method', defaults=page.meta.defaults) }}
{% endif %}
<!--
Detailed object info
-->
{% if page.meta.constructors %}
{{ info.info('Constructor Detail', page.meta.constructors, 'constructor', defaults=page.meta.defaults) }}
{% endif %}
{% if page.meta.enums %}
{{ info.info('Enum Constant Detail', page.meta.enums, 'enum', defaults=page.meta.defaults) }}
{% endif %}
{% if page.meta.methods %}
{{ info.info('Method Detail', page.meta.methods, 'method', defaults=page.meta.defaults)}}
{% endif %}
{% endif %}
{% endblock %}
Loaded 100 of 229 files, more files were not shown because too many files have changed in this diff. Show more