Compare commits

...

233 Commits

Author SHA1 Message Date
HaHaWTH 23306d1f5c prepare for b34 2023-11-25 19:15:19 +08:00
HaHaWTH fc546ac87a GUI Captcha fix 2023-11-25 19:13:02 +08:00
HaHaWTH 764b2788ae update 2023-11-25 18:55:06 +08:00
HaHaWTH d1fc832d2d update 2023-11-25 18:27:38 +08:00
HaHaWTH c170c70639 No need to remove 2023-11-25 00:30:54 +08:00
HaHaWTH 8db8d0f6da No need to remove 2023-11-24 21:28:16 +08:00
HaHaWTH 6b5e0b82ba Code improvement 2023-11-23 22:19:23 +08:00
HaHaWTH 265ea66894 Use Hashmap 2023-11-22 23:20:54 +08:00
HaHaWTH b1b4bb0a79 Remove folialib dependency 2023-11-19 20:26:49 +08:00
HaHaWTH fa7ce8bfb4 Add folialib dependency 2023-11-19 17:20:07 +08:00
HaHaWTH 78369644c7 Update html 2023-11-19 13:27:19 +08:00
HaHaWTH 22b8b6bf64 Cleanup 2023-11-19 12:04:46 +08:00
HaHaWTH fcec8e41a2 Patch 2023-11-19 11:36:42 +08:00
HaHaWTH ee24cabbed Fix config typo 2023-11-19 11:02:21 +08:00
HaHaWTH eed1c5aedc Add country whitelist for GUI captcha 2023-11-19 10:58:47 +08:00
HaHaWTH 1f88b3bc12 Revert changes about H2 2023-11-18 20:52:25 +08:00
HaHaWTH 5cd8791fee Merge remote-tracking branch 'origin/master' 2023-11-18 20:21:53 +08:00
HaHaWTH 787e04488b Loadable H2 2023-11-18 20:20:23 +08:00
DGun Otto 2accd9592c [ci skip] Update workflow 2023-11-18 19:57:41 +08:00
DGun Otto 66bfbbbdb1 Update workflow 2023-11-18 19:54:02 +08:00
HaHaWTH cb195fd1ca Try to implement H2 2023-11-18 19:52:55 +08:00
HaHaWTH a1ef28095f Use private instead of public static 2023-11-17 10:48:20 +08:00
HaHaWTH 77b40cc1e8 Use private instead of public static 2023-11-17 10:45:28 +08:00
HaHaWTH 4c52484fd7 Revert changes 2023-11-17 01:14:17 +08:00
HaHaWTH 5b72708167 Add a method to check if the player is in GUI verification 2023-11-16 22:37:41 +08:00
HaHaWTH b69e931c44 Update workflow 2023-11-16 01:48:57 +08:00
HaHaWTH 213b1c2702 Update workflow 2023-11-16 01:48:01 +08:00
HaHaWTH 0fef595229 [ci skip] Update README.md 2023-11-16 01:44:06 +08:00
HaHaWTH 791d1f1872 [ci skip] Update README.md 2023-11-16 01:42:55 +08:00
HaHaWTH ef92c776af [ci skip] Update README.md 2023-11-16 01:41:50 +08:00
HaHaWTH 66cf0143f6 fix config typo 2023-11-16 01:22:47 +08:00
HaHaWTH 3ff3b0d294 Merge remote-tracking branch 'origin/master' 2023-11-16 01:19:14 +08:00
HaHaWTH b9ecb58760 TrMenu compatibility (Thanks to @Dreeam) 2023-11-16 01:18:57 +08:00
DGun Otto a8e55b4ae3 Merge pull request #53 from HaHaWTH/dependabot/maven/org.xerial-sqlite-jdbc-3.44.0.0
Bump org.xerial:sqlite-jdbc from 3.43.2.2 to 3.44.0.0
2023-11-14 23:57:28 +08:00
HaHaWTH 657e51f2cc Bump version number to b33 2023-11-14 02:01:27 +08:00
dependabot[bot] ff16f91311 Bump org.xerial:sqlite-jdbc from 3.43.2.2 to 3.44.0.0
Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.43.2.2 to 3.44.0.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.43.2.2...3.44.0.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 04:52:36 +00:00
HaHaWTH d05d4971b5 Merge remote-tracking branch 'origin/master' 2023-11-12 19:35:56 +08:00
HaHaWTH 5f58e92666 Update event 2023-11-12 19:35:34 +08:00
DGun Otto a31c2f45b1 Update README.md 2023-11-12 14:57:34 +08:00
DGun Otto 06d9e71ae8 [ci skip] Update README.md 2023-11-12 14:56:13 +08:00
HaHaWTH 441e020192 Localized DoubleLoginFix 2023-11-12 14:19:01 +08:00
HaHaWTH f153867d85 Merge remote-tracking branch 'origin/master' 2023-11-12 14:12:39 +08:00
HaHaWTH eed5ce1b7b Localized LoginLocationFix 2023-11-12 14:12:11 +08:00
DGun Otto 00b4bcb6a3 [ci skip] Update README 2023-11-12 13:24:35 +08:00
HaHaWTH e69ba501da Localized BedrockAutoLogin 2023-11-12 11:31:47 +08:00
HaHaWTH f2ccbf72a8 Another method 2023-11-12 00:54:52 +08:00
HaHaWTH c29aec210b Prepare for B32 2023-11-11 22:13:44 +08:00
HaHaWTH 78b5102692 Prepare for B32 2023-11-11 21:41:08 +08:00
HaHaWTH 9fd671db85 Use bukkitService 2023-11-11 21:18:42 +08:00
HaHaWTH beb99418d4 switch to warning 2023-11-11 21:16:17 +08:00
HaHaWTH 0f70de9a5a patch 2023-11-11 21:04:35 +08:00
HaHaWTH 08ad55c742 typo 2023-11-11 21:03:36 +08:00
HaHaWTH a70c1e0102 Migration 2023-11-11 20:49:53 +08:00
HaHaWTH efec997128 Add tips 2023-11-11 20:47:32 +08:00
HaHaWTH 413c2a39d7 Add tips 2023-11-11 20:45:27 +08:00
HaHaWTH 5a9b9ce619 Unified code style 2023-11-11 20:32:01 +08:00
HaHaWTH ee58da2b39 SQL support for Java8 2023-11-11 14:43:59 +08:00
DGun Otto 7475cd8ea4 Update maven.yml 2023-11-11 12:59:21 +08:00
HaHaWTH 8b8f6c0e2e fix 2023-11-11 12:57:09 +08:00
HaHaWTH 69b170b754 11&8 2023-11-11 12:55:42 +08:00
HaHaWTH 702b6aae32 Code Cleanup 2023-11-11 12:20:40 +08:00
HaHaWTH 010874586a Localized GUI Captcha 2023-11-11 11:12:48 +08:00
HaHaWTH fcc34c28aa Migrate to @Inject 2023-11-11 10:00:27 +08:00
HaHaWTH ecbc11cf0b Useless 2023-11-10 22:28:46 +08:00
HaHaWTH bfd3a8f439 Merge remote-tracking branch 'origin/master' 2023-11-10 22:18:02 +08:00
HaHaWTH f8dd410d96 Improved code style 2023-11-10 22:17:35 +08:00
DGun Otto 2459aec4b6 Merge pull request #46 from HaHaWTH/dependabot/maven/org.xerial-sqlite-jdbc-3.43.2.2
Bump org.xerial:sqlite-jdbc from 3.43.2.1 to 3.43.2.2
2023-11-10 00:49:53 +08:00
DGun Otto d623337a15 Merge pull request #47 from HaHaWTH/dependabot/maven/org.checkerframework-checker-qual-3.40.0
Bump org.checkerframework:checker-qual from 3.39.0 to 3.40.0
2023-11-10 00:49:28 +08:00
HaHaWTH 73c3cea778 Optimises 2023-11-05 12:17:21 +08:00
HaHaWTH 11a4cff10a Revert changes 2023-11-04 18:42:55 +08:00
HaHaWTH 628d5adcb5 MapUtils 2023-11-04 18:31:36 +08:00
HaHaWTH 8681cd0733 MapCaptchaHandler 2023-11-04 18:29:44 +08:00
HaHaWTH bb2fdbfb40 why r there so many runTask 2023-11-04 18:04:28 +08:00
HaHaWTH 4dedc30d94 Format 2023-11-04 18:01:39 +08:00
dependabot[bot] fa995eea53 Bump org.checkerframework:checker-qual from 3.39.0 to 3.40.0
Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.39.0 to 3.40.0.
- [Release notes](https://github.com/typetools/checker-framework/releases)
- [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.39.0...checker-framework-3.40.0)

---
updated-dependencies:
- dependency-name: org.checkerframework:checker-qual
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-02 05:04:26 +00:00
dependabot[bot] e819be918b Bump org.xerial:sqlite-jdbc from 3.43.2.1 to 3.43.2.2
Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.43.2.1 to 3.43.2.2.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.43.2.1...3.43.2.2)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 04:16:08 +00:00
HaHaWTH 1e3e625c1a Update: fake player compatibility(UNTESTED) 2023-10-28 20:32:38 +08:00
HaHaWTH b747a4bdff Update: untested 2023-10-28 20:21:10 +08:00
HaHaWTH 03443104be Prepare for PacketPlayerListener 2023-10-27 20:54:13 +08:00
HaHaWTH 819e55e235 Prepare for PacketPlayerListener 2023-10-25 01:07:44 +08:00
HaHaWTH 80b06f3bc7 Now prepare for B31 2023-10-25 01:05:36 +08:00
HaHaWTH d90e87896c [ci skip] 2023-10-22 19:07:31 +08:00
HaHaWTH 72073b80f0 debug & update 2023-10-22 14:13:28 +08:00
HaHaWTH 19866bc4a4 Add thanks 2023-10-22 10:18:24 +08:00
HaHaWTH cf4037614a Patch 2023-10-22 10:15:04 +08:00
HaHaWTH 5c22601c52 Add Bedrock player auto login feature 2023-10-22 10:13:08 +08:00
HaHaWTH 1bb3bb1fa7 Prepare for B30 2023-10-21 19:50:35 +08:00
HaHaWTH 11959ca794 Rename material to materialPortal 2023-10-21 19:46:46 +08:00
HaHaWTH 9ba9af6369 Logic improvement 2023-10-21 19:29:30 +08:00
HaHaWTH 584f2074fd Bump Spigot API to 1.20.2 2023-10-21 18:59:07 +08:00
HaHaWTH 2971a0a202 Revert ProtocolPacketListener update 2023-10-21 18:21:44 +08:00
HaHaWTH 3cc8128faa ProtocolPacketListener update 2023-10-21 18:16:24 +08:00
HaHaWTH 1ef7ed4b3f Random string for click verify 2023-10-21 18:12:33 +08:00
HaHaWTH 59eabe38c6 Code readability update 2023-10-21 18:01:01 +08:00
HaHaWTH 1c090a5a65 Update TeleportUtils 2023-10-21 00:11:56 +08:00
HaHaWTH 82fade61d5 B29 update 2023-10-20 21:52:54 +08:00
HaHaWTH fc5009bf0d Use TeleportUtils 2023-10-20 21:40:16 +08:00
HaHaWTH 9fe91fe22c Use TeleportUtils 2023-10-20 21:30:36 +08:00
HaHaWTH 37d327bcb6 Merge remote-tracking branch 'origin/master' 2023-10-19 23:41:04 +08:00
HaHaWTH 217b411095 GUICaptcha is now beta 2023-10-19 23:40:50 +08:00
DGun Otto 9239f3a90d [ci skip] Update README.md 2023-10-19 22:17:01 +08:00
HaHaWTH ae9d9ea159 Merge remote-tracking branch 'origin/master' 2023-10-19 22:10:13 +08:00
HaHaWTH 12cfd243f6 Prepare for B29 2023-10-19 22:09:56 +08:00
DGun Otto 059c00c2ad Update sqlite-jdbc
Bump org.xerial:sqlite-jdbc from 3.40.1.0 to 3.43.2.1
2023-10-19 22:07:34 +08:00
HaHaWTH 3dab24c142 Delete useless options & make code more readable 2023-10-19 22:03:23 +08:00
dependabot[bot] 4de55f9cf6 Bump org.xerial:sqlite-jdbc from 3.40.1.0 to 3.43.2.1
Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.40.1.0 to 3.43.2.1.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.40.1.0...3.43.2.1)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 04:18:04 +00:00
HaHaWTH 07d9bbbf7c LoginLocationFixListener logic improvement 2023-10-18 22:11:16 +08:00
HaHaWTH c182510a46 Small clean up 2023-10-18 01:44:28 +08:00
HaHaWTH aec1277ab3 Update build 2023-10-17 00:50:10 +08:00
HaHaWTH 32b694cbb0 Infinity bug fix 2023-10-15 15:11:08 +08:00
HaHaWTH 932368f2d6 Massive bug fixes 2023-10-15 14:57:37 +08:00
HaHaWTH 7a33fc8928 Bug fix 2023-10-15 14:01:40 +08:00
HaHaWTH d048db44ba Fix 2023-10-15 12:36:31 +08:00
HaHaWTH 76b92bacd9 Prepare for B28 2023-10-15 10:25:26 +08:00
HaHaWTH dadae42992 Improve GUI captcha performance 2023-10-15 10:12:08 +08:00
HaHaWTH 1e9058a5cb Clean up 2023-10-15 09:08:48 +08:00
HaHaWTH b307911896 Small tweaks 2023-10-15 09:06:12 +08:00
HaHaWTH 11a1547242 Rewrite the update checker 2023-10-14 21:52:05 +08:00
HaHaWTH 17ee5dc97b Prepare for B27 2023-10-14 20:37:23 +08:00
HaHaWTH ac89630f5d Improve version compatibility 2023-10-14 19:24:12 +08:00
HaHaWTH 94028484cf Revert changes 2023-10-14 19:15:49 +08:00
HaHaWTH 1b1fd77470 Merge remote-tracking branch 'origin/master' 2023-10-14 19:09:54 +08:00
HaHaWTH 7a7b148a7d Logic Improvement 2023-10-14 19:09:35 +08:00
DGun Otto e6cee92ef1 [ci skip] Update README.md 2023-10-13 20:32:23 +08:00
HaHaWTH 31123081c7 Improve check logic 2023-10-13 20:21:53 +08:00
HaHaWTH b5b435d398 Improve check logic 2023-10-13 20:13:02 +08:00
HaHaWTH 395f8f825f Fix config typo 2023-10-13 20:05:05 +08:00
HaHaWTH c71bd9f3a8 Fix LoginLocationFixListener throws error on legacy versions 2023-10-13 19:48:35 +08:00
HaHaWTH 3e971c3dfd Fix LoginLocationFixListener throws error on legacy versions 2023-10-13 19:38:46 +08:00
HaHaWTH 3f372d9228 Small patches 2023-10-13 18:58:35 +08:00
HaHaWTH d385093403 Revert mokito-core to 5.2.0 2023-10-13 18:49:03 +08:00
HaHaWTH f978b285ae Prepare for B26 2023-10-13 18:46:26 +08:00
HaHaWTH 1eeaa442db Merge remote-tracking branch 'origin/master' 2023-10-13 18:43:21 +08:00
HaHaWTH 14cc0abdc5 Add LoginLocationFixListener feature 2023-10-13 18:43:05 +08:00
DGun Otto d5ce692933 Merge pull request #39 from HaHaWTH/dependabot/maven/org.mockito-mockito-core-5.6.0
Bump org.mockito:mockito-core from 5.2.0 to 5.6.0
2023-10-10 00:28:21 +08:00
dependabot[bot] 56a7b90c99 Bump org.mockito:mockito-core from 5.2.0 to 5.6.0
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.2.0 to 5.6.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.2.0...v5.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 04:21:20 +00:00
DGun Otto 9352e7f32e Merge pull request #38 from HaHaWTH/dependabot/maven/org.checkerframework-checker-qual-3.39.0
Bump org.checkerframework:checker-qual from 3.32.0 to 3.39.0
2023-10-03 13:58:26 +08:00
dependabot[bot] 0fc2f61a42 Bump org.checkerframework:checker-qual from 3.32.0 to 3.39.0
Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.32.0 to 3.39.0.
- [Release notes](https://github.com/typetools/checker-framework/releases)
- [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.32.0...checker-framework-3.39.0)

---
updated-dependencies:
- dependency-name: org.checkerframework:checker-qual
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-03 05:11:37 +00:00
HaHaWTH 25249125b1 Code format 2023-10-02 08:25:20 +08:00
HaHaWTH 9d6d325fa6 English 2023-10-02 08:21:25 +08:00
HaHaWTH 0d408ede47 Update gitignore 2023-10-02 00:03:14 +08:00
HaHaWTH 36bc761c19 Fix NPE 2023-10-01 22:55:52 +08:00
HaHaWTH 9c3f0b0142 Fixed Issue #35 2023-10-01 20:52:59 +08:00
HaHaWTH e6be595c16 Prepare for B25 update 2023-10-01 19:58:26 +08:00
HaHaWTH dd4739a822 Merge remote-tracking branch 'origin/master' 2023-10-01 19:56:51 +08:00
HaHaWTH 39254506bf Prevent duplicate register listeners(will improve performance) 2023-10-01 19:56:32 +08:00
DGun Otto 227d93d756 Merge pull request #37 from xiaoxing365/master
添加一个依赖库支持
2023-10-01 12:20:22 +08:00
DGun Otto d223f316d6 [ci skip]Update README.md 2023-09-30 23:56:54 +08:00
xiaoxing365 b6ec553dcb Merge branch 'HaHaWTH:master' into master 2023-09-30 23:35:32 +08:00
BuildTools cc6a9c38bd Add a dependence repository,that's jitpack. 2023-09-30 23:32:17 +08:00
HaHaWTH 04ad3adbd1 Add 1.8 compatibility & Bump to B24 2023-09-30 15:22:34 +08:00
HaHaWTH ef3804bf4e Add extra logic to prevent deleting normal player data 2023-09-30 14:14:56 +08:00
HaHaWTH b5d3408773 Merge remote-tracking branch 'origin/master' 2023-09-30 12:37:59 +08:00
HaHaWTH 470f5ff28f Add 2023-09-30 12:36:48 +08:00
DGun Otto 888ee7235b [ci skip] Update README.md 2023-09-30 12:12:49 +08:00
DGun Otto c97eda6672 Update README.md 2023-09-30 11:44:58 +08:00
DGun Otto 81478f203c [ci skip] Update README.md 2023-09-30 10:37:48 +08:00
DGun Otto ec51635d44 [ci skip] Update README.md 2023-09-30 10:36:05 +08:00
DGun Otto aae15fba60 [ci skip] Update README.md 2023-09-30 10:35:43 +08:00
DGun Otto 57fad7e113 [ci skip] Update README.md 2023-09-30 10:33:15 +08:00
HaHaWTH 1c25908a04 Bump to Alpha 4 2023-09-30 10:12:43 +08:00
HaHaWTH 84a8137955 Bug Fix 2023-09-30 10:10:25 +08:00
HaHaWTH 038d4c1850 logic improvement 2023-09-30 09:55:26 +08:00
理塘丁真 0ffe2c2fc9 Deleted useless code 2023-09-30 09:04:55 +08:00
HaHaWTH 401933038d It works! 2023-09-30 09:02:47 +08:00
HaHaWTH 5cf88f308a Patch 2023-09-29 21:06:54 +08:00
HaHaWTH 29df796c48 Code Format 2023-09-29 17:36:06 +08:00
HaHaWTH 79af85667e Actually fix purge 2023-09-29 17:18:10 +08:00
HaHaWTH 57237f6dfa Fixes 2023-09-29 16:33:12 +08:00
HaHaWTH fc86e3ef78 Fix typo 2023-09-29 16:22:42 +08:00
HaHaWTH 846b7f67e5 Fix typo 2023-09-29 16:18:55 +08:00
HaHaWTH ffe3f5d24a Fix typo 2023-09-29 16:17:00 +08:00
HaHaWTH 2db1a15c72 Fix config path 2023-09-29 16:14:51 +08:00
HaHaWTH 95342ae054 Add features to delete bot join data 2023-09-29 16:13:48 +08:00
HaHaWTH 6800356f10 Small tweaks 2023-09-29 15:29:44 +08:00
HaHaWTH 95b5d88197 Fix typo 2023-09-29 15:26:10 +08:00
HaHaWTH 9f6f55d8e8 Fix config description 2023-09-29 15:24:26 +08:00
HaHaWTH d1ebcfeef0 Fix 2023-09-29 15:22:16 +08:00
HaHaWTH 5305bf0bfd Fix 2023-09-29 15:09:32 +08:00
HaHaWTH 78c5ab5d8a Add banner color switch option & advanced banners 2023-09-29 15:02:18 +08:00
HaHaWTH 836c568fef Update GeoLite2-Country database 2023-09-29 12:12:41 +08:00
HaHaWTH 7cbd1ebae7 Fix config path 2023-09-29 11:39:57 +08:00
HaHaWTH a35a277b32 Add useless banners & Code cleanup 2023-09-29 11:34:53 +08:00
HaHaWTH 971f0f7683 Update README 2023-09-23 18:58:08 +08:00
HaHaWTH d2718c1934 Bump ProtocolLib to 5.1.0 & EssentialsX to 2.20.1 2023-09-23 18:47:12 +08:00
HaHaWTH 0cdd2b20d6 Code Improvement 2023-09-23 18:42:23 +08:00
HaHaWTH 66b2bf8436 Code Improvement 2023-09-23 18:40:18 +08:00
HaHaWTH cf01767ad3 Revert changes 2023-09-23 18:29:17 +08:00
HaHaWTH fdefdb88cc Implement translation (2) 2023-09-23 18:17:12 +08:00
HaHaWTH 4bcc992b7f Implement translation (1) 2023-09-23 18:12:52 +08:00
HaHaWTH 35aba2207b TODO 2023-09-21 22:07:27 +08:00
HaHaWTH ce2ee9e0fb Fix config typo 2023-09-21 21:49:35 +08:00
HaHaWTH 9093ad2d9f Prepare for b23 2023-09-20 02:32:53 +08:00
HaHaWTH 08ed6504f2 Cleanup 2023-09-20 02:29:24 +08:00
HaHaWTH 9f70748b55 Useless code cleanup 2023-09-20 02:26:48 +08:00
HaHaWTH 3f6a7ce48f Sync repo files to b22 2023-09-20 02:15:22 +08:00
HaHaWTH ed320196fe Remove all files 2023-09-20 02:10:19 +08:00
DGun Otto 62f27f8231 Merge pull request #25 from HaHaWTH/dependabot/maven/org.slf4j-slf4j-simple-2.0.9
Bump org.slf4j:slf4j-simple from 2.0.7 to 2.0.9
2023-09-16 22:51:34 +08:00
dependabot[bot] c3485903c5 Bump org.slf4j:slf4j-simple from 2.0.7 to 2.0.9
Bumps org.slf4j:slf4j-simple from 2.0.7 to 2.0.9.

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-simple
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 04:14:09 +00:00
dependabot[bot] 5f3089b61b Merge pull request #21 from HaHaWTH/dependabot/maven/org.mariadb.jdbc-mariadb-java-client-3.2.0 2023-09-03 10:11:12 +00:00
dependabot[bot] e8f42ab669 Merge pull request #20 from HaHaWTH/dependabot/maven/org.xerial-sqlite-jdbc-3.42.0.1 2023-08-28 12:25:51 +00:00
dependabot[bot] e3ff584bf4 Bump org.mariadb.jdbc:mariadb-java-client from 3.1.4 to 3.2.0
Bumps [org.mariadb.jdbc:mariadb-java-client](https://github.com/mariadb-corporation/mariadb-connector-j) from 3.1.4 to 3.2.0.
- [Release notes](https://github.com/mariadb-corporation/mariadb-connector-j/releases)
- [Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mariadb-corporation/mariadb-connector-j/compare/3.1.4...3.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 04:23:57 +00:00
dependabot[bot] a9116a2f28 Bump org.xerial:sqlite-jdbc from 3.42.0.0 to 3.42.0.1
Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.42.0.0 to 3.42.0.1.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.42.0.0...3.42.0.1)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 04:23:39 +00:00
DGun Otto ddd8c44396 Merge pull request #17 from HaHaWTH/dependabot/maven/net.essentialsx-EssentialsX-2.20.1
Bump net.essentialsx:EssentialsX from 2.20.0 to 2.20.1
2023-08-07 21:09:11 +08:00
dependabot[bot] 6edcfa993e Bump net.essentialsx:EssentialsX from 2.20.0 to 2.20.1
Bumps [net.essentialsx:EssentialsX](https://github.com/EssentialsX/Essentials) from 2.20.0 to 2.20.1.
- [Release notes](https://github.com/EssentialsX/Essentials/releases)
- [Commits](https://github.com/EssentialsX/Essentials/compare/2.20.0...2.20.1)

---
updated-dependencies:
- dependency-name: net.essentialsx:EssentialsX
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 04:56:34 +00:00
dependabot[bot] e63764e2cf Merge pull request #16 from HaHaWTH/dependabot/maven/org.checkerframework-checker-qual-3.37.0 2023-08-03 17:42:49 +00:00
dependabot[bot] 63540088c9 Bump org.checkerframework:checker-qual from 3.36.0 to 3.37.0
Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.36.0 to 3.37.0.
- [Release notes](https://github.com/typetools/checker-framework/releases)
- [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.36.0...checker-framework-3.37.0)

---
updated-dependencies:
- dependency-name: org.checkerframework:checker-qual
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 04:45:13 +00:00
dependabot[bot] 8e760e504e Merge pull request #11 from HaHaWTH/dependabot/maven/org.mockito-mockito-core-5.4.0 2023-07-21 15:14:39 +00:00
dependabot[bot] bf3553df68 Merge pull request #12 from HaHaWTH/dependabot/maven/org.checkerframework-checker-qual-3.36.0 2023-07-21 15:14:14 +00:00
dependabot[bot] 44e4937d16 Merge pull request #7 from HaHaWTH/dependabot/maven/org.postgresql-postgresql-42.6.0 2023-07-21 15:13:13 +00:00
dependabot[bot] 280bb2bdcc Merge pull request #9 from HaHaWTH/dependabot/maven/org.slf4j-slf4j-simple-2.0.7 2023-07-19 06:47:48 +00:00
dependabot[bot] c0da109dea Merge pull request #15 from HaHaWTH/dependabot/maven/com.mysql-mysql-connector-j-8.1.0 2023-07-19 06:45:16 +00:00
dependabot[bot] b455d0a200 Bump mysql-connector-j from 8.0.33 to 8.1.0
Bumps [mysql-connector-j](https://github.com/mysql/mysql-connector-j) from 8.0.33 to 8.1.0.
- [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.x/CHANGES)
- [Commits](https://github.com/mysql/mysql-connector-j/compare/8.0.33...8.1.0)

---
updated-dependencies:
- dependency-name: com.mysql:mysql-connector-j
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 04:59:36 +00:00
DGun Otto 2f9d11e1d5 Merge pull request #10 from HaHaWTH/dependabot/maven/com.h2database-h2-2.2.220
Bump h2 from 2.1.214 to 2.2.220
2023-07-14 23:38:08 +08:00
DGun Otto ab85429b4c Merge pull request #6 from HaHaWTH/dependabot/maven/org.xerial-sqlite-jdbc-3.42.0.0
Bump sqlite-jdbc from 3.40.1.0 to 3.42.0.0
2023-07-14 23:37:46 +08:00
DGun Otto 145dbd46f0 Merge pull request #8 from HaHaWTH/dependabot/maven/org.mariadb.jdbc-mariadb-java-client-3.1.4
Bump mariadb-java-client from 3.1.2 to 3.1.4
2023-07-14 23:37:35 +08:00
DGun Otto 8e451b0642 Merge pull request #13 from HaHaWTH/dependabot/maven/org.jacoco-jacoco-maven-plugin-0.8.10
Bump jacoco-maven-plugin from 0.8.8 to 0.8.10
2023-07-14 23:37:22 +08:00
DGun Otto b12070a517 Merge pull request #14 from HaHaWTH/dependabot/maven/net.essentialsx-EssentialsX-2.20.0
Bump EssentialsX from 2.19.7 to 2.20.0
2023-07-14 23:37:04 +08:00
dependabot[bot] 3950b3034c Bump EssentialsX from 2.19.7 to 2.20.0
Bumps [EssentialsX](https://github.com/EssentialsX/Essentials) from 2.19.7 to 2.20.0.
- [Release notes](https://github.com/EssentialsX/Essentials/releases)
- [Commits](https://github.com/EssentialsX/Essentials/compare/2.19.7...2.20.0)

---
updated-dependencies:
- dependency-name: net.essentialsx:EssentialsX
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:53:38 +00:00
dependabot[bot] 47ae657c80 Bump jacoco-maven-plugin from 0.8.8 to 0.8.10
Bumps [jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.8 to 0.8.10.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.8...v0.8.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:52:58 +00:00
dependabot[bot] 87ef1ab8ed Bump checker-qual from 3.32.0 to 3.36.0
Bumps [checker-qual](https://github.com/typetools/checker-framework) from 3.32.0 to 3.36.0.
- [Release notes](https://github.com/typetools/checker-framework/releases)
- [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.32.0...checker-framework-3.36.0)

---
updated-dependencies:
- dependency-name: org.checkerframework:checker-qual
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:52:34 +00:00
dependabot[bot] a6bd4f59cb Bump mockito-core from 5.2.0 to 5.4.0
Bumps [mockito-core](https://github.com/mockito/mockito) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.2.0...v5.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:52:23 +00:00
dependabot[bot] ac610ad552 Bump h2 from 2.1.214 to 2.2.220
Bumps [h2](https://github.com/h2database/h2database) from 2.1.214 to 2.2.220.
- [Release notes](https://github.com/h2database/h2database/releases)
- [Commits](https://github.com/h2database/h2database/compare/version-2.1.214...version-2.2.220)

---
updated-dependencies:
- dependency-name: com.h2database:h2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:52:02 +00:00
dependabot[bot] d9204afdc9 Bump slf4j-simple from 2.0.5 to 2.0.7
Bumps [slf4j-simple](https://github.com/qos-ch/slf4j) from 2.0.5 to 2.0.7.
- [Commits](https://github.com/qos-ch/slf4j/compare/v_2.0.5...v_2.0.7)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-simple
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:51:54 +00:00
dependabot[bot] 69abbc308a Bump mariadb-java-client from 3.1.2 to 3.1.4
Bumps [mariadb-java-client](https://github.com/mariadb-corporation/mariadb-connector-j) from 3.1.2 to 3.1.4.
- [Release notes](https://github.com/mariadb-corporation/mariadb-connector-j/releases)
- [Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mariadb-corporation/mariadb-connector-j/compare/3.1.2...3.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:51:45 +00:00
dependabot[bot] 06f2b0c49e Bump postgresql from 42.5.4 to 42.6.0
Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.5.4 to 42.6.0.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.5.4...REL42.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:49:44 +00:00
dependabot[bot] 47b0e6e744 Bump sqlite-jdbc from 3.40.1.0 to 3.42.0.0
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.40.1.0 to 3.42.0.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.40.1.0...3.42.0.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 13:49:34 +00:00
DGun Otto 4533f52016 Merge pull request #5 from HaHaWTH/oscs_fix_cin6hi8au51v1r8mnpgg
请升级com.mysql:mysql-connector-j组件版本以解决1个安全漏洞
2023-07-12 16:54:32 +08:00
HaHaWTH ae36036874 fix vuln 2023-07-12 16:48:23 +08:00
DGun Otto 6f19a5442f Update README.md 2023-07-12 00:40:44 +08:00
DGun Otto 3019e33945 Update README.md 2023-07-12 00:37:53 +08:00
HaHaWTH 7e49e26735 reupload files 2023-07-11 20:45:01 +08:00
HaHaWTH b014da245d Del all files 2023-07-11 20:42:24 +08:00
99 changed files with 1749 additions and 428 deletions
-34
View File
@@ -1,34 +0,0 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: Maven Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
+7 -3
View File
@@ -10,7 +10,7 @@ jobs:
Build:
strategy:
matrix:
jdkversion: [11]
jdkversion: [ 11 ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
@@ -19,6 +19,10 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.jdkversion }}
cache: 'maven'
- name: 使用Maven构建
- name: Build
run: mvn -V -B clean package --file pom.xml
- name: Upload Artifacts
uses: actions/upload-artifact@v3.1.2
with:
name: Download
path: ./target/AuthMe-5.6.0-FORK-Spigot-Universal.jar
+3 -2
View File
@@ -21,10 +21,11 @@ hs_err_pid*
# Ignore IDEA directory
.idea/*
.idea/
# Include the project's code style settings file
!.idea/codeStyleSettings.xml
/target/class/
# File-based project format:
*.ipr
*.iws
+3
View File
@@ -0,0 +1,3 @@
# 默认忽略的文件
/shelf/
/workspace.xml
+28 -17
View File
@@ -1,21 +1,32 @@
# AuthMeReReloaded
**"A Fork of Authme that contains many bug fixes!"**
**请前往Releases下载最新版本**(**Download the latest version from Releases**)
**"A fork of the best authentication plugin for the Bukkit modding API!"**
MCBBS Link: [Click Here](https://www.mcbbs.net/forum.php?mod=viewthread&tid=1471495)
![Graph](https://bstats.org/signatures/bukkit/AuthMeReloaded-Fork.svg)
<p align="center">
<img src="https://img.shields.io/github/languages/code-size/HaHaWTH/AuthMeReReloaded.svg" alt="Code size"/>
<img src="https://img.shields.io/github/repo-size/HaHaWTH/AuthMeReReloaded.svg" alt="GitHub repo size"/>
</p>
**Detailed Changes:**
1. Improved mail sending logic & support more emails
2. Shutdown mail sending(When server is closed, email you)
3. Old bug fixes
4. Anti Ghost Player(Doubled login bug)
5. Use the best performance method by server brand
6. Bedrock Compatibility(Floodgate needed)(based on UUID)
7. Update checker
8. Integrated GUI Captcha feature(Bedrock compatibility & ProtocolLib needed)(70% Asynchronous)
9. Improved listeners
10. Player login logic improvement to reduce lag
11. Automatically purge bot data
12. Folia
compatibility [Here](https://github.com/HaHaWTH/AuthMeReReloaded/releases/download/b20/AuthMe-5.6.0-FORK-Folia.jar)
13. Offhand Menu compatibility(Thats amazing)
14. Automatically fix portal stuck issue
15. More......
**Download links:**
[Releases](https://github.com/HaHaWTH/AuthMeReReloaded/releases/latest)
[Actions(Dev builds, use at your own risk!)](https://github.com/HaHaWTH/AuthMeReReloaded/actions/workflows/maven.yml)
Changes to the original AuthMe(相较于原版AuthMe的变化):
1.Memory improvement
2.Fixed GeoIP database
3.Hook floodgate
4.Choose the best performance method by server brand
5.Anti ghost player
6.GUI captcha for unregistered players
7.Block unsafe passwords by querying API
8.Self hash check to prevent jar virus infection(abandoned)
9.Updater
**Known Folia issue**
1.If the teleport distance too far away,the player may be frozen
**Pull Requests and suggestions are welcome!**
-1
View File
@@ -1 +0,0 @@
d91307767d8526ac84a3055ac0e773e91f88d452b4b0031f7ecfed721ac6b641
-1
View File
@@ -1 +0,0 @@
d0aab9856defbd8ef31a9cd7257c5b5761e61a7e39807708c81decf82f599323
-1
View File
@@ -1 +0,0 @@
176a6c6ea03ad8cc37d1d11c3e3608d8b59c09f9f923eae287e8192731642ec8
-1
View File
@@ -1 +0,0 @@
61b1a691490d78af1028a442143f649d432618b92c5a9a7031eb4f94817d768b
-1
View File
@@ -1 +0,0 @@
222eb5ecb4c58f279b8e2f75d38a45495ceb875f249ae3217e3f2a36e50b7d39
-1
View File
@@ -1 +0,0 @@
da53060e21d7135e479a6a6a6fd090b8f41e1423742b94e4dbb1a9230b5621fd
View File
-1
View File
@@ -1 +0,0 @@
423084f2a50c27f62d1b5c85a95e78b9bc3df49d5bd9cefd6fe1aa9227b856c1
-1
View File
@@ -1 +0,0 @@
410df26b12703b82987b9d739c19211346418f1c954d214827805c13b5f82c98
-1
View File
@@ -1 +0,0 @@
20569ebc44a9847da0946de5a3bf2cd2b7855dffb03abc9d29204afcaa64b8bb
-1
View File
@@ -1 +0,0 @@
51a067778ad9b0938d57fd4e2975e0f8dce4914ee060efd0fd6755a8810da4f3
+32 -19
View File
@@ -6,10 +6,10 @@
<groupId>fr.xephi</groupId>
<artifactId>authme</artifactId>
<version>5.6.0-SNAPSHOT</version>
<version>5.6.0-FORK</version>
<name>AuthMeReloaded</name>
<description>The first authentication plugin for the Bukkit API!</description>
<name>AuthMeReReloaded</name>
<description>Fork of the first authentication plugin for the Bukkit API!</description>
<inceptionYear>2013</inceptionYear>
<url>https://github.com/AuthMe/AuthMeReloaded</url>
@@ -67,11 +67,11 @@
<maven.minimumVersion>3.6.3</maven.minimumVersion>
<!-- Dependencies versions -->
<spigot.version>1.19.2-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.20.2-R0.1-SNAPSHOT</spigot.version>
<!-- Versioning properties -->
<project.outputName>AuthMe</project.outputName>
<project.buildNumber>CUSTOM</project.buildNumber>
<project.buildNumber>28</project.buildNumber>
<project.versionCode>${project.version}-b${project.buildNumber}</project.versionCode>
<project.finalNameBase>${project.outputName}-${project.version}</project.finalNameBase>
@@ -324,7 +324,7 @@
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.finalNameBase}-legacy</finalName>
<finalName>${project.finalNameBase}-Spigot-Universal</finalName>
<relocations>
<relocation>
<pattern>com.google.common</pattern>
@@ -598,6 +598,11 @@
<enabled>true</enabled>
</snapshots>
</repository>
<!-- FoliaLib -->
<repository>
<id>devmart-other</id>
<url>https://nexuslite.gcnt.net/repos/other/</url>
</repository>
<repository>
<id>opencollab-snapshot</id>
<url>https://repo.opencollab.dev/maven-snapshots/</url>
@@ -608,6 +613,16 @@
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>jitpack</id>
<url>https://jitpack.io/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
@@ -677,7 +692,7 @@
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>5.0.1</version> <!-- Latest java 8 release -->
<version>4.0.3</version> <!-- Latest java 8 release -->
<optional>true</optional>
<exclusions>
<exclusion>
@@ -690,7 +705,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.5</version> <!-- We can't update to 2.x as long as we use HikariCP for java 8 -->
<version>1.7.36</version> <!-- We can't update to 2.x as long as we use HikariCP for java 8 -->
<optional>true</optional>
</dependency>
@@ -706,7 +721,7 @@
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.32</version>
<version>8.0.33</version>
<optional>true</optional>
</dependency>
<dependency>
@@ -757,7 +772,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
<version>31.1-jre</version>
<optional>true</optional>
<exclusions>
<exclusion>
@@ -770,17 +785,15 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version>
<version>2.10.1</version>
<optional>true</optional>
</dependency>
<!-- Bukkit Libraries -->
<!-- ConfigMe -->
<dependency>
<groupId>ch.jalu</groupId>
<artifactId>configme</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<optional>true</optional>
<exclusions>
<exclusion>
@@ -794,7 +807,7 @@
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<optional>true</optional>
</dependency>
@@ -802,7 +815,7 @@
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>4.8.0</version>
<version>5.1.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
@@ -945,7 +958,7 @@
<dependency>
<groupId>net.essentialsx</groupId>
<artifactId>EssentialsX</artifactId>
<version>2.19.7</version>
<version>2.20.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
@@ -1060,7 +1073,7 @@
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>3.32.0</version>
<version>3.40.0</version>
<scope>test</scope>
</dependency>
@@ -1068,7 +1081,7 @@
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.39.3.0</version>
<version>3.44.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
+155 -17
View File
@@ -11,12 +11,17 @@ import fr.xephi.authme.initialization.OnShutdownPlayerSaver;
import fr.xephi.authme.initialization.OnStartupTasks;
import fr.xephi.authme.initialization.SettingsProvider;
import fr.xephi.authme.initialization.TaskCloser;
import fr.xephi.authme.listener.BedrockAutoLoginListener;
import fr.xephi.authme.listener.BlockListener;
import fr.xephi.authme.listener.DoubleLoginFixListener;
import fr.xephi.authme.listener.EntityListener;
import fr.xephi.authme.listener.GuiCaptchaHandler;
import fr.xephi.authme.listener.LoginLocationFixListener;
import fr.xephi.authme.listener.PlayerListener;
import fr.xephi.authme.listener.PlayerListener111;
import fr.xephi.authme.listener.PlayerListener19;
import fr.xephi.authme.listener.PlayerListener19Spigot;
import fr.xephi.authme.listener.PlayerListenerHigherThan18;
import fr.xephi.authme.listener.ServerListener;
import fr.xephi.authme.mail.EmailService;
import fr.xephi.authme.output.ConsoleLoggerFactory;
@@ -29,6 +34,7 @@ import fr.xephi.authme.service.yaml.YamlParseException;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.SettingsWarner;
import fr.xephi.authme.settings.properties.EmailSettings;
import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.SecuritySettings;
import fr.xephi.authme.task.CleanupTask;
import fr.xephi.authme.task.purge.PurgeService;
@@ -41,11 +47,16 @@ import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitScheduler;
import org.jetbrains.annotations.NotNull;
import javax.inject.Inject;
import java.io.File;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Objects;
import java.util.Scanner;
import java.util.function.Consumer;
import java.util.logging.Level;
import static fr.xephi.authme.service.BukkitService.TICKS_PER_MINUTE;
import static fr.xephi.authme.util.Utils.isClassLoaded;
@@ -61,25 +72,26 @@ public class AuthMe extends JavaPlugin {
private static final int CLEANUP_INTERVAL = 5 * TICKS_PER_MINUTE;
// Version and build number values
private static String pluginVersion = "5.6.0";
private static String pluginBuildNumber = "Custom";
private static String pluginVersion = "5.6.0-Fork";
private static final String pluginBuild = "b";
private static String pluginBuildNumber = "34";
// Private instances
private EmailService emailService;
private CommandHandler commandHandler;
private Settings settings;
@Inject
public static Settings settings;
private DataSource database;
private BukkitService bukkitService;
private Injector injector;
private BackupService backupService;
private ConsoleLogger logger;
public static ConsoleLogger logger;
/**
* Constructor.
*/
public AuthMe() {
}
/**
* Get the plugin's name.
*
@@ -107,6 +119,8 @@ public class AuthMe extends JavaPlugin {
return pluginBuildNumber;
}
/**
* Method called when the server enables the plugin.
*/
@@ -118,6 +132,8 @@ public class AuthMe extends JavaPlugin {
// Set the Logger instance and log file path
ConsoleLogger.initialize(getLogger(), new File(getDataFolder(), LOG_FILENAME));
logger = ConsoleLoggerFactory.get(AuthMe.class);
logger.info("You are running an unofficial fork version of AuthMe!");
// Check server version
if (!isClassLoaded("org.spigotmc.event.player.PlayerSpawnLocationEvent")
@@ -146,7 +162,7 @@ public class AuthMe extends JavaPlugin {
th.printStackTrace();
} else {
logger.logException("File '" + yamlParseException.getFile() + "' contains invalid YAML. "
+ "Please run its contents through https://yamllint.com", yamlParseException);
+ "Please run its contents through http://yamllint.com", yamlParseException);
}
stopOrUnload();
return;
@@ -158,26 +174,53 @@ public class AuthMe extends JavaPlugin {
// Schedule clean up task
CleanupTask cleanupTask = injector.getSingleton(CleanupTask.class);
cleanupTask.runTaskTimerAsynchronously(this, CLEANUP_INTERVAL, CLEANUP_INTERVAL);
// Do a backup on start
backupService.doBackup(BackupService.BackupCause.START);
// Set up Metrics
OnStartupTasks.sendMetrics(this, settings);
if(settings.getProperty(SecuritySettings.SHOW_STARTUP_BANNER)) {
String loadColorConfig = settings.getProperty(SecuritySettings.STARTUP_BANNER_COLOR);
if (loadColorConfig.startsWith("§")) {
logger.info("\n" + loadColorConfig + " ___ __ __ __ ___ \n" +
loadColorConfig + " / | __ __/ /_/ /_ / |/ /__ \n" +
loadColorConfig + " / /| |/ / / / __/ __ \\/ /|_/ / _ \\\n" +
loadColorConfig + " / ___ / /_/ / /_/ / / / / / / __/\n" +
loadColorConfig + "/_/ |_\\__,_/\\__/_/ /_/_/ /_/\\___/ \n" +
loadColorConfig + " ");
}else {
logger.info("\n"+" ___ __ __ __ ___ \n" +
" / | __ __/ /_/ /_ / |/ /__ \n" +
" / /| |/ / / / __/ __ \\/ /|_/ / _ \\\n" +
" / ___ / /_/ / /_/ / / / / / / __/\n" +
"/_/ |_\\__,_/\\__/_/ /_/_/ /_/\\___/ \n" +
" ");
}
}
// Successful message
logger.info("AuthMeReloaded successfully enabled!");
//detect server brand with classloader
checkServerType();
logger.info("AuthMeReReloaded is enabled successfully!");
// Purge on start if enabled
PurgeService purgeService = injector.getSingleton(PurgeService.class);
purgeService.runAutoPurge();
// 注册玩家加入事件监听
// register3rdPartyListeners();
logger.info("GitHub: https://github.com/HaHaWTH/AuthMeReReloaded/");
if (settings.getProperty(SecuritySettings.CHECK_FOR_UPDATES)) {
checkForUpdates();
}
}
//Migrated
/**
* Load the version and build number of the plugin from the description file.
*
* @param versionRaw the version as given by the plugin description file
*/
private static void loadPluginInfo(String versionRaw) {
int index = versionRaw.lastIndexOf("-");
if (index != -1) {
@@ -266,10 +309,17 @@ public class AuthMe extends JavaPlugin {
pluginManager.registerEvents(injector.getSingleton(EntityListener.class), this);
pluginManager.registerEvents(injector.getSingleton(ServerListener.class), this);
// Try to register 1.9 player listeners
if (isClassLoaded("org.bukkit.event.player.PlayerSwapHandItemsEvent")) {
// Try to register 1.8+ player listeners
if (isClassLoaded("org.bukkit.event.entity.EntityPickupItemEvent") && isClassLoaded("org.bukkit.event.player.PlayerSwapHandItemsEvent")) {
pluginManager.registerEvents(injector.getSingleton(PlayerListenerHigherThan18.class), this);
} else if (isClassLoaded("org.bukkit.event.player.PlayerSwapHandItemsEvent")) {
pluginManager.registerEvents(injector.getSingleton(PlayerListener19.class), this);
}
// Try to register 1.9 player listeners(Moved to else-if)
// if (isClassLoaded("org.bukkit.event.player.PlayerSwapHandItemsEvent")) {
// pluginManager.registerEvents(injector.getSingleton(PlayerListener19.class), this);
// }
// Try to register 1.9 spigot player listeners
if (isClassLoaded("org.spigotmc.event.player.PlayerSpawnLocationEvent")) {
@@ -280,6 +330,26 @@ public class AuthMe extends JavaPlugin {
if (isClassLoaded("org.bukkit.event.entity.EntityAirChangeEvent")) {
pluginManager.registerEvents(injector.getSingleton(PlayerListener111.class), this);
}
//Register 3rd party listeners
if (settings.getProperty(SecuritySettings.GUI_CAPTCHA) && getServer().getPluginManager().getPlugin("ProtocolLib") != null) {
pluginManager.registerEvents(injector.getSingleton(GuiCaptchaHandler.class), this);
logger.info("(Beta)GUICaptcha is enabled successfully!");
logger.info("These features are still in early development, if you encountered any problem, please report.");
} else if (settings.getProperty(SecuritySettings.GUI_CAPTCHA) && getServer().getPluginManager().getPlugin("ProtocolLib") == null) {
logger.warning("ProtocolLib is not loaded, can't enable GUI Captcha.");
}
if (settings.getProperty(SecuritySettings.FORCE_LOGIN_BEDROCK) && settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && getServer().getPluginManager().getPlugin("floodgate") != null) {
pluginManager.registerEvents(injector.getSingleton(BedrockAutoLoginListener.class), this);
} else if (settings.getProperty(SecuritySettings.FORCE_LOGIN_BEDROCK) && (!settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) || getServer().getPluginManager().getPlugin("floodgate") == null)) {
logger.warning("Failed to enable BedrockAutoLogin, ensure hookFloodgate: true and floodgate is loaded.");
}
if (settings.getProperty(SecuritySettings.LOGIN_LOC_FIX_SUB_UNDERGROUND) || settings.getProperty(SecuritySettings.LOGIN_LOC_FIX_SUB_PORTAL)) {
pluginManager.registerEvents(injector.getSingleton(LoginLocationFixListener.class), this);
}
if (settings.getProperty(SecuritySettings.ANTI_GHOST_PLAYERS)) {
pluginManager.registerEvents(injector.getSingleton(DoubleLoginFixListener.class), this);
}
}
/**
@@ -305,7 +375,7 @@ public class AuthMe extends JavaPlugin {
onShutdownPlayerSaver.saveAllPlayers();
}
if (settings.getProperty(EmailSettings.SHUTDOWN_MAIL)){
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy''MM''dd'' HH:mm:ss");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy'.'MM'.'dd'.' HH:mm:ss");
Date date = new Date(System.currentTimeMillis());
emailService.sendShutDown(settings.getProperty(EmailSettings.SHUTDOWN_MAIL_ADDRESS),dateFormat.format(date));
}
@@ -320,10 +390,78 @@ public class AuthMe extends JavaPlugin {
// Disabled correctly
Consumer<String> infoLogMethod = logger == null ? getLogger()::info : logger::info;
infoLogMethod.accept("AuthMe " + this.getDescription().getVersion() + " disabled!");
infoLogMethod.accept("AuthMe " + this.getDescription().getVersion() + " is unloaded successfully!");
ConsoleLogger.closeFileWriter();
}
private static final String owner = "HaHaWTH";
// private static final String owner_gitee = "Shixuehan114514";
private static final String repo = "AuthMeReReloaded";
private void checkForUpdates() {
logger.info("Checking for updates...");
bukkitService.runTaskAsynchronously(() -> {
try {
// 从南通集线器获取最新版本号
URL url = new URL("https://api.github.com/repos/" + owner + "/" + repo + "/releases/latest");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(10000); // 设置连接超时为10秒
conn.setReadTimeout(10000); // 设置读取超时为10秒
Scanner scanner = new Scanner(conn.getInputStream());
String response = scanner.useDelimiter("\\Z").next();
scanner.close();
// 处理JSON响应
String latestVersion = response.substring(response.indexOf("tag_name") + 11);
latestVersion = latestVersion.substring(0, latestVersion.indexOf("\""));
if (isUpdateAvailable(latestVersion)) {
String message = "New version available! Latest:" + latestVersion + " Current:" + pluginBuild + pluginBuildNumber;
getLogger().log(Level.WARNING, message);
getLogger().log(Level.WARNING, "Download from here: github.com/HaHaWTH/AuthMeReReloaded/releases/latest");
} else {
getLogger().log(Level.INFO, "You are running the latest version.");
}
} catch (IOException e) {
String formattedException = ExceptionUtils.formatException(e);
getLogger().log(Level.WARNING, "Error occurred while checking updates from GitHub. Reason: " + formattedException);
}
});
}
private boolean isUpdateAvailable(String latestVersion) {
// Extract the first character and the remaining digits from the version string
char latestChar = latestVersion.charAt(0);
int latestNumber = Integer.parseInt(latestVersion.substring(1));
char currentChar = pluginBuild.charAt(0);
int currentNumber = Integer.parseInt(pluginBuildNumber);
// Compare the characters first
if (latestChar > currentChar) {
return true;
} else if (latestChar < currentChar) {
return false;
} else {
// If the characters are the same, compare the numbers
return latestNumber > currentNumber;
}
}
private void checkServerType() {
if (isClassLoaded("com.destroystokyo.paper.PaperConfig")) {
logger.info("AuthMeReReloaded is running on Paper");
}else if (isClassLoaded("catserver.server.CatServerConfig")) {
logger.info("AuthMeReReloaded is running on CatServer");
} else if (isClassLoaded("org.spigotmc.SpigotConfig")) {
logger.info("AuthMeReReloaded is running on Spigot");
} else if (isClassLoaded("org.bukkit.craftbukkit.CraftServer")) {
logger.info("AuthMeReReloaded is running on Bukkit");
} else {
logger.info("AuthMeReReloaded is running on Unknown*");
}
}
/**
* Handle Bukkit commands.
*
@@ -142,7 +142,7 @@ public final class ConsoleLogger {
public void fine(String message) {
if (logLevel.includes(LogLevel.FINE)) {
logger.info(message);
writeLog("[FINE] " + message);
writeLog("[INFO:FINE] " + message);
}
}
@@ -215,7 +215,7 @@ public final class ConsoleLogger {
}
private void logAndWriteWithDebugPrefix(String message) {
String debugMessage = "[DEBUG] " + message;
String debugMessage = "[INFO:DEBUG] " + message;
logger.info(debugMessage);
writeLog(debugMessage);
}
@@ -29,7 +29,6 @@ import fr.xephi.authme.command.executable.authme.TotpViewStatusCommand;
import fr.xephi.authme.command.executable.authme.UnregisterAdminCommand;
import fr.xephi.authme.command.executable.authme.UpdateHelpMessagesCommand;
import fr.xephi.authme.command.executable.authme.VersionCommand;
import fr.xephi.authme.command.executable.authme.WhitelistCommand;
import fr.xephi.authme.command.executable.authme.debug.DebugCommand;
import fr.xephi.authme.command.executable.captcha.CaptchaCommand;
import fr.xephi.authme.command.executable.changepassword.ChangePasswordCommand;
@@ -421,16 +420,6 @@ public class CommandInitializer {
.executableCommand(SwitchAntiBotCommand.class)
.register();
CommandDescription.builder()
.parent(authmeBase)
.labels("whitelist")
.description("Switch whitelist mode")
.detailedDescription("Switch or toggle the whitelist mode to the specified state.")
.withArgument("mode", "ON / OFF", OPTIONAL)
.permission(AdminPermission.SWITCH_ANTIBOT)
.executableCommand(WhitelistCommand.class)
.register();
// Register the reload command
CommandDescription.builder()
.parent(authmeBase)
@@ -1,9 +1,13 @@
package fr.xephi.authme.command.executable.authme;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.command.PlayerCommand;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.SpawnLoader;
import fr.xephi.authme.settings.properties.SecuritySettings;
import fr.xephi.authme.util.TeleportUtils;
import org.bukkit.entity.Player;
import fr.xephi.authme.AuthMe;
import javax.inject.Inject;
import java.util.List;
@@ -11,16 +15,22 @@ import java.util.List;
* Teleports the player to the first spawn.
*/
public class FirstSpawnCommand extends PlayerCommand {
@Inject
private Settings settings;
@Inject
private SpawnLoader spawnLoader;
@Override
public void runCommand(Player player, List<String> arguments) {
if (spawnLoader.getFirstSpawn() == null) {
player.sendMessage("[AuthMe] First spawn has failed, please try to define the first spawn");
} else {
//String name= player.getName();
if(settings.getProperty(SecuritySettings.SMART_ASYNC_TELEPORT)) {
TeleportUtils.teleport(player, spawnLoader.getFirstSpawn());
} else {
player.teleport(spawnLoader.getFirstSpawn());
}
//player.teleport(spawnLoader.getFirstSpawn());
}
}
}
@@ -1,40 +0,0 @@
package fr.xephi.authme.command.executable.authme;
import fr.xephi.authme.command.ExecutableCommand;
import fr.xephi.authme.service.WhiteListService;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import javax.inject.Inject;
import java.util.List;
/**
* Display or change the status of the antibot mod.
*/
public class WhitelistCommand implements ExecutableCommand {
@Inject
private WhiteListService whiteListService;
@Override
public void executeCommand(final CommandSender sender, List<String> arguments) {
if (arguments.isEmpty()) {
sender.sendMessage("[AuthMe] WhiteList: " + whiteListService.getWhiteListStatus().name());
return;
}
String newState = arguments.get(0);
// Enable or disable the mod
if ("ON".equalsIgnoreCase(newState)) {
whiteListService.overrideWhiteListStatus(true);
sender.sendMessage("[AuthMe] WhiteList enabled!");
} else if ("OFF".equalsIgnoreCase(newState)) {
sender.sendMessage("[AuthMe] WhiteList disabled!");
whiteListService.overrideWhiteListStatus(false);
} else {
sender.sendMessage(ChatColor.GOLD + "Detailed help: " + ChatColor.WHITE + "/authme help whitelist");
}
}
}
@@ -42,6 +42,12 @@ public class ChangePasswordCommand extends PlayerCommand {
commonService.send(player, MessageKey.NOT_LOGGED_IN);
return;
}
// Check if the user has been verified or not
if (codeManager.isVerificationRequired(player)) {
codeManager.codeExistOrGenerateNew(name);
commonService.send(player, MessageKey.VERIFICATION_CODE_REQUIRED);
return;
}
String oldPassword = arguments.get(0);
String newPassword = arguments.get(1);
@@ -70,7 +70,7 @@ public class TotpCodeCommand extends PlayerCommand {
boolean isCodeValid = totpAuthenticator.checkCode(auth, inputCode);
if (isCodeValid) {
logger.debug("Successfully checked TOTP code for `{0}`", player.getName());
asynchronousLogin.performLogin(player, auth,false);
asynchronousLogin.performLogin(player, auth);
} else {
logger.debug("Input TOTP code was invalid for player `{0}`", player.getName());
messages.send(player, MessageKey.TWO_FACTOR_INVALID_CODE);
@@ -4,6 +4,7 @@ package fr.xephi.authme.datasource;
* DataSource type.
*/
public enum DataSourceType {
// H2,
MYSQL,
@@ -0,0 +1,408 @@
//package fr.xephi.authme.datasource;
//
//import com.google.common.annotations.VisibleForTesting;
//import fr.xephi.authme.ConsoleLogger;
//import fr.xephi.authme.data.auth.PlayerAuth;
//import fr.xephi.authme.datasource.columnshandler.AuthMeColumnsHandler;
//import fr.xephi.authme.output.ConsoleLoggerFactory;
//import fr.xephi.authme.settings.Settings;
//import fr.xephi.authme.settings.properties.DatabaseSettings;
//
//import java.io.File;
//import java.sql.Connection;
//import java.sql.DatabaseMetaData;
//import java.sql.DriverManager;
//import java.sql.PreparedStatement;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//import java.sql.Statement;
//import java.util.ArrayList;
//import java.util.Collection;
//import java.util.HashSet;
//import java.util.List;
//import java.util.Locale;
//import java.util.Set;
//
//import static fr.xephi.authme.datasource.SqlDataSourceUtils.getNullableLong;
//import static fr.xephi.authme.datasource.SqlDataSourceUtils.logSqlException;
//
///**
// * H2 data source.
// */
//@SuppressWarnings({"checkstyle:AbbreviationAsWordInName"}) // Justification: Class name cannot be changed anymore
//public class H2 extends AbstractSqlDataSource {
//
// private final ConsoleLogger logger = ConsoleLoggerFactory.get(H2.class);
// private final Settings settings;
// private final File dataFolder;
// private final String database;
// private final String tableName;
// private final Columns col;
// private Connection con;
//
// /**
// * Constructor for H2.
// *
// * @param settings The settings instance
// * @param dataFolder The data folder
// * @throws SQLException when initialization of a SQL datasource failed
// */
// public H2(Settings settings, File dataFolder) throws SQLException {
// this.settings = settings;
// this.dataFolder = dataFolder;
// this.database = settings.getProperty(DatabaseSettings.MYSQL_DATABASE);
// this.tableName = settings.getProperty(DatabaseSettings.MYSQL_TABLE);
// this.col = new Columns(settings);
//
// try {
// this.connect();
// this.setup();
// } catch (Exception ex) {
// logger.logException("Error during H2 initialization:", ex);
// throw ex;
// }
// }
//
// @VisibleForTesting
// H2(Settings settings, File dataFolder, Connection connection) {
// this.settings = settings;
// this.dataFolder = dataFolder;
// this.database = settings.getProperty(DatabaseSettings.MYSQL_DATABASE);
// this.tableName = settings.getProperty(DatabaseSettings.MYSQL_TABLE);
// this.col = new Columns(settings);
// this.con = connection;
// this.columnsHandler = AuthMeColumnsHandler.createForSqlite(con, settings);
// }
//
// /**
// * Initializes the connection to the H2 database.
// *
// * @throws SQLException when an SQL error occurs while connecting
// */
// protected void connect() throws SQLException {
// try {
// Class.forName("org.h2.Driver");
// } catch (ClassNotFoundException e) {
// throw new IllegalStateException("Failed to load H2 JDBC class", e);
// }
//
// logger.debug("H2 driver loaded");
// this.con = DriverManager.getConnection(this.getJdbcUrl(this.dataFolder.getAbsolutePath(), "", this.database));
// this.columnsHandler = AuthMeColumnsHandler.createForSqlite(con, settings);
// }
//
// /**
// * Creates the table if necessary, or adds any missing columns to the table.
// *
// * @throws SQLException when an SQL error occurs while initializing the database
// */
// @VisibleForTesting
// @SuppressWarnings("checkstyle:CyclomaticComplexity")
// protected void setup() throws SQLException {
// try (Statement st = con.createStatement()) {
// // Note: cannot add unique fields later on in SQLite, so we add it on initialization
// st.executeUpdate("CREATE TABLE IF NOT EXISTS " + tableName + " ("
// + col.ID + " INTEGER AUTO_INCREMENT, "
// + col.NAME + " VARCHAR(255) NOT NULL UNIQUE, "
// + "CONSTRAINT table_const_prim PRIMARY KEY (" + col.ID + "));");
//
// DatabaseMetaData md = con.getMetaData();
//
// if (isColumnMissing(md, col.REAL_NAME)) {
// st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN "
// + col.REAL_NAME + " VARCHAR(255) NOT NULL DEFAULT 'Player';");
// }
//
// if (isColumnMissing(md, col.PASSWORD)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.PASSWORD + " VARCHAR(255) NOT NULL DEFAULT '';");
// }
//
// if (!col.SALT.isEmpty() && isColumnMissing(md, col.SALT)) {
// st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + col.SALT + " VARCHAR(255);");
// }
//
// if (isColumnMissing(md, col.LAST_IP)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.LAST_IP + " VARCHAR(40);");
// }
//
// if (isColumnMissing(md, col.LAST_LOGIN)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.LAST_LOGIN + " TIMESTAMP;");
// }
//
// if (isColumnMissing(md, col.REGISTRATION_IP)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.REGISTRATION_IP + " VARCHAR(40);");
// }
//
// if (isColumnMissing(md, col.REGISTRATION_DATE)) {
// addRegistrationDateColumn(st);
// }
//
// if (isColumnMissing(md, col.LASTLOC_X)) {
// st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + col.LASTLOC_X
// + " DOUBLE NOT NULL DEFAULT '0.0';");
// st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + col.LASTLOC_Y
// + " DOUBLE NOT NULL DEFAULT '0.0';");
// st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + col.LASTLOC_Z
// + " DOUBLE NOT NULL DEFAULT '0.0';");
// }
//
// if (isColumnMissing(md, col.LASTLOC_WORLD)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.LASTLOC_WORLD + " VARCHAR(255) NOT NULL DEFAULT 'world';");
// }
//
// if (isColumnMissing(md, col.LASTLOC_YAW)) {
// st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN "
// + col.LASTLOC_YAW + " FLOAT;");
// }
//
// if (isColumnMissing(md, col.LASTLOC_PITCH)) {
// st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN "
// + col.LASTLOC_PITCH + " FLOAT;");
// }
//
// if (isColumnMissing(md, col.EMAIL)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.EMAIL + " VARCHAR(255);");
// }
//
// if (isColumnMissing(md, col.IS_LOGGED)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.IS_LOGGED + " INT NOT NULL DEFAULT '0';");
// }
//
// if (isColumnMissing(md, col.HAS_SESSION)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.HAS_SESSION + " INT NOT NULL DEFAULT '0';");
// }
//
// if (isColumnMissing(md, col.TOTP_KEY)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.TOTP_KEY + " VARCHAR(32);");
// }
//
// if (!col.PLAYER_UUID.isEmpty() && isColumnMissing(md, col.PLAYER_UUID)) {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.PLAYER_UUID + " VARCHAR(36)");
// }
// }
// logger.info("H2 Setup finished");
// }
//
//
// private boolean isColumnMissing(DatabaseMetaData metaData, String columnName) throws SQLException {
// try (ResultSet rs = metaData.getColumns(null, null, tableName, columnName)) {
// return !rs.next();
// }
// }
//
// @Override
// public void reload() {
// close(con);
// try {
// this.connect();
// this.setup();
// } catch (SQLException ex) {
// logger.logException("Error while reloading H2:", ex);
// }
// }
//
// @Override
// public PlayerAuth getAuth(String user) {
// String sql = "SELECT * FROM " + tableName + " WHERE LOWER(" + col.NAME + ")=LOWER(?);";
// try (PreparedStatement pst = con.prepareStatement(sql)) {
// pst.setString(1, user);
// try (ResultSet rs = pst.executeQuery()) {
// if (rs.next()) {
// return buildAuthFromResultSet(rs);
// }
// }
// } catch (SQLException ex) {
// logSqlException(ex);
// }
// return null;
// }
//
// @Override
// public Set<String> getRecordsToPurge(long until) {
// Set<String> list = new HashSet<>();
// String select = "SELECT " + col.NAME + " FROM " + tableName + " WHERE MAX("
// + " COALESCE(" + col.LAST_LOGIN + ", 0),"
// + " COALESCE(" + col.REGISTRATION_DATE + ", 0)"
// + ") < ?;";
// try (PreparedStatement selectPst = con.prepareStatement(select)) {
// selectPst.setLong(1, until);
// try (ResultSet rs = selectPst.executeQuery()) {
// while (rs.next()) {
// list.add(rs.getString(col.NAME));
// }
// }
// } catch (SQLException ex) {
// logSqlException(ex);
// }
//
// return list;
// }
//
// @Override
// public void purgeRecords(Collection<String> toPurge) {
// String delete = "DELETE FROM " + tableName + " WHERE " + col.NAME + "=?;";
// try (PreparedStatement deletePst = con.prepareStatement(delete)) {
// for (String name : toPurge) {
// deletePst.setString(1, name.toLowerCase(Locale.ROOT));
// deletePst.executeUpdate();
// }
// } catch (SQLException ex) {
// logSqlException(ex);
// }
// }
//
// @Override
// public boolean removeAuth(String user) {
// String sql = "DELETE FROM " + tableName + " WHERE " + col.NAME + "=?;";
// try (PreparedStatement pst = con.prepareStatement(sql)) {
// pst.setString(1, user.toLowerCase(Locale.ROOT));
// pst.executeUpdate();
// return true;
// } catch (SQLException ex) {
// logSqlException(ex);
// }
// return false;
// }
//
// @Override
// public void closeConnection() {
// try {
// if (con != null && !con.isClosed()) {
// con.close();
// }
// } catch (SQLException ex) {
// logSqlException(ex);
// }
// }
//
// @Override
// public DataSourceType getType() {
// return DataSourceType.H2;
// }
//
// @Override
// public List<PlayerAuth> getAllAuths() {
// List<PlayerAuth> auths = new ArrayList<>();
// String sql = "SELECT * FROM " + tableName + ";";
// try (PreparedStatement pst = con.prepareStatement(sql); ResultSet rs = pst.executeQuery()) {
// while (rs.next()) {
// PlayerAuth auth = buildAuthFromResultSet(rs);
// auths.add(auth);
// }
// } catch (SQLException ex) {
// logSqlException(ex);
// }
// return auths;
// }
//
// @Override
// public List<String> getLoggedPlayersWithEmptyMail() {
// List<String> players = new ArrayList<>();
// String sql = "SELECT " + col.REAL_NAME + " FROM " + tableName + " WHERE " + col.IS_LOGGED + " = 1"
// + " AND (" + col.EMAIL + " = 'your@email.com' OR " + col.EMAIL + " IS NULL);";
// try (Statement st = con.createStatement(); ResultSet rs = st.executeQuery(sql)) {
// while (rs.next()) {
// players.add(rs.getString(1));
// }
// } catch (SQLException ex) {
// logSqlException(ex);
// }
// return players;
// }
//
// @Override
// public List<PlayerAuth> getRecentlyLoggedInPlayers() {
// List<PlayerAuth> players = new ArrayList<>();
// String sql = "SELECT * FROM " + tableName + " ORDER BY " + col.LAST_LOGIN + " DESC LIMIT 10;";
// try (Statement st = con.createStatement(); ResultSet rs = st.executeQuery(sql)) {
// while (rs.next()) {
// players.add(buildAuthFromResultSet(rs));
// }
// } catch (SQLException e) {
// logSqlException(e);
// }
// return players;
// }
//
//
// @Override
// public boolean setTotpKey(String user, String totpKey) {
// String sql = "UPDATE " + tableName + " SET " + col.TOTP_KEY + " = ? WHERE " + col.NAME + " = ?";
// try (PreparedStatement pst = con.prepareStatement(sql)) {
// pst.setString(1, totpKey);
// pst.setString(2, user.toLowerCase(Locale.ROOT));
// pst.executeUpdate();
// return true;
// } catch (SQLException e) {
// logSqlException(e);
// }
// return false;
// }
//
// private PlayerAuth buildAuthFromResultSet(ResultSet row) throws SQLException {
// String salt = !col.SALT.isEmpty() ? row.getString(col.SALT) : null;
//
// return PlayerAuth.builder()
// .name(row.getString(col.NAME))
// .email(row.getString(col.EMAIL))
// .realName(row.getString(col.REAL_NAME))
// .password(row.getString(col.PASSWORD), salt)
// .totpKey(row.getString(col.TOTP_KEY))
// .lastLogin(getNullableLong(row, col.LAST_LOGIN))
// .lastIp(row.getString(col.LAST_IP))
// .registrationDate(row.getLong(col.REGISTRATION_DATE))
// .registrationIp(row.getString(col.REGISTRATION_IP))
// .locX(row.getDouble(col.LASTLOC_X))
// .locY(row.getDouble(col.LASTLOC_Y))
// .locZ(row.getDouble(col.LASTLOC_Z))
// .locWorld(row.getString(col.LASTLOC_WORLD))
// .locYaw(row.getFloat(col.LASTLOC_YAW))
// .locPitch(row.getFloat(col.LASTLOC_PITCH))
// .build();
// }
//
// /**
// * Creates the column for registration date and sets all entries to the current timestamp.
// * We do so in order to avoid issues with purging, where entries with 0 / NULL might get
// * purged immediately on startup otherwise.
// *
// * @param st Statement object to the database
// */
// private void addRegistrationDateColumn(Statement st) throws SQLException {
// st.executeUpdate("ALTER TABLE " + tableName
// + " ADD COLUMN " + col.REGISTRATION_DATE + " TIMESTAMP NOT NULL DEFAULT '0';");
//
// // Use the timestamp from Java to avoid timezone issues in case JVM and database are out of sync
// long currentTimestamp = System.currentTimeMillis();
// int updatedRows = st.executeUpdate(String.format("UPDATE %s SET %s = %d;",
// tableName, col.REGISTRATION_DATE, currentTimestamp));
// logger.info("Created column '" + col.REGISTRATION_DATE + "' and set the current timestamp, "
// + currentTimestamp + ", to all " + updatedRows + " rows");
// }
//
// @Override
// String getJdbcUrl(String dataPath, String ignored, String database) {
// return "jdbc:h2:" + dataPath + File.separator + database + ".db";
// }
//
// private static void close(Connection con) {
// if (con != null) {
// try {
// con.close();
// } catch (SQLException ex) {
// logSqlException(ex);
// }
// }
// }
//}
//
@@ -76,6 +76,9 @@ public class DataSourceProvider implements Provider<DataSource> {
case SQLITE:
dataSource = new SQLite(settings, dataFolder);
break;
// case H2:
// dataSource = new H2(settings, dataFolder);
// break;
default:
throw new UnsupportedOperationException("Unknown data source type '" + dataSourceType + "'");
}
@@ -53,7 +53,7 @@ public class OnStartupTasks {
* @param settings the settings
*/
public static void sendMetrics(AuthMe plugin, Settings settings) {
final Metrics metrics = new Metrics(plugin, 164);
final Metrics metrics = new Metrics(plugin, 18479);
metrics.addCustomChart(new SimplePie("messages_language",
() -> settings.getProperty(PluginSettings.MESSAGES_LANGUAGE)));
@@ -0,0 +1,52 @@
package fr.xephi.authme.listener;
/* Inspired by DongShaoNB/BedrockPlayerSupport **/
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.api.v3.AuthMeApi;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.message.Messages;
import fr.xephi.authme.service.BukkitService;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.SecuritySettings;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import javax.inject.Inject;
import java.util.UUID;
import static org.bukkit.Bukkit.getServer;
public class BedrockAutoLoginListener implements Listener {
private final AuthMeApi authmeApi = AuthMeApi.getInstance();
@Inject
private BukkitService bukkitService;
@Inject
private AuthMe plugin;
@Inject
private Messages messages;
@Inject
private Settings settings;
public BedrockAutoLoginListener() {
}
private boolean isBedrockPlayer(UUID uuid) {
return settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && settings.getProperty(SecuritySettings.FORCE_LOGIN_BEDROCK) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(uuid) && getServer().getPluginManager().getPlugin("floodgate") != null;
}
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
String name = event.getPlayer().getName();
UUID uuid = event.getPlayer().getUniqueId();
if (isBedrockPlayer(uuid) && !authmeApi.isAuthenticated(player) && authmeApi.isRegistered(name)) {
authmeApi.forceLogin(player);
messages.send(player, MessageKey.BEDROCK_AUTO_LOGGED_IN);
}
}
}
@@ -0,0 +1,35 @@
package fr.xephi.authme.listener;
//Prevent Ghost Players
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.service.CommonService;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import javax.inject.Inject;
import java.util.Collection;
import java.util.HashSet;
public class DoubleLoginFixListener implements Listener {
@Inject
private CommonService service;
public DoubleLoginFixListener() {
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Collection<? extends Player> PlayerList = Bukkit.getServer().getOnlinePlayers();
HashSet<String> PlayerSet = new HashSet<String>();
for (Player ep : PlayerList) {
if (PlayerSet.contains(ep.getName().toLowerCase())) {
ep.kickPlayer(service.retrieveSingleMessage(ep.getPlayer(), MessageKey.DOUBLE_LOGIN_FIX));
break;
}
PlayerSet.add(ep.getName().toLowerCase());
}
}
}
@@ -0,0 +1,291 @@
package fr.xephi.authme.listener;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.events.ListenerPriority;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketEvent;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.api.v3.AuthMeApi;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.message.Messages;
import fr.xephi.authme.service.BukkitService;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.settings.properties.SecuritySettings;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import javax.inject.Inject;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import static fr.xephi.authme.util.PlayerUtils.getPlayerIp;
import static fr.xephi.authme.util.PlayerUtils.isNpc;
import static org.bukkit.Bukkit.getLogger;
import static org.bukkit.Bukkit.getServer;
public class GuiCaptchaHandler implements Listener {
//define AuthMeApi
private final AuthMeApi authmeApi = AuthMeApi.getInstance();
@Inject
private BukkitService bukkitService;
@Inject
private AuthMe plugin;
@Inject
private Messages messages;
@Inject
private CommonService service;
@Inject
private Settings settings;
private PacketAdapter chatPacketListener;
private PacketAdapter windowPacketListener;
//define timesLeft
private int timesLeft = 3;
//Use ConcurrentHashMap to store player and their close reason
/* We used many async tasks so there is concurrent**/
public static HashMap<Player, String> closeReasonMap = new HashMap<>();
//define randomStringSet
String randomSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz!@#%&*()_+";
String randomString = "";
Random randomItemSet = new Random();
Random howManyRandom = new Random();
private boolean isPacketListenersActive = false;
int howLongIsRandomString;
public GuiCaptchaHandler() {
}
protected List<String> whiteList = AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA_COUNTRY_WHITELIST);
private boolean isBedrockPlayer(UUID uuid) {
return settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && settings.getProperty(SecuritySettings.GUI_CAPTCHA_BE_COMPATIBILITY) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(uuid) && getServer().getPluginManager().getPlugin("floodgate") != null;
}
private void addPacketListeners() {
if (!isPacketListenersActive) {
ProtocolLibrary.getProtocolManager().addPacketListener(windowPacketListener);
ProtocolLibrary.getProtocolManager().addPacketListener(chatPacketListener);
isPacketListenersActive = true;
}
}
@EventHandler
public void onInventoryClick(InventoryClickEvent event) {
if (event.getWhoClicked() instanceof Player) {
Player player = (Player) event.getWhoClicked();
ItemStack currentItem = event.getCurrentItem();
if (!authmeApi.isRegistered(player.getName()) && !closeReasonMap.containsKey(player)) {
if (isBedrockPlayer(player.getUniqueId())) {
return;
}
if (currentItem != null && currentItem.getType().equals(Material.REDSTONE_BLOCK)) {
event.setCancelled(true);
closeReasonMap.put(player, "verified");
player.closeInventory();
messages.send(player, MessageKey.GUI_CAPTCHA_VERIFIED);
}
}
}
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
public void onPlayerJoin(PlayerJoinEvent event) {
randomString = "";
Player playerunreg = event.getPlayer();
String name = playerunreg.getName();
if (!authmeApi.isRegistered(name) && !isNpc(playerunreg)) {
if (!whiteList.isEmpty()) {
String ip = getPlayerIp(playerunreg);
if (whiteList.contains(authmeApi.getCountryCode(ip)) && ip != null) {
return;
}
}
if (isBedrockPlayer(playerunreg.getUniqueId())) {
closeReasonMap.put(playerunreg, "verified");
messages.send(playerunreg, MessageKey.GUI_CAPTCHA_VERIFIED_AUTO_BEDROCK);
return;
}
bukkitService.runTaskAsynchronously(() -> {
StringBuilder sb = new StringBuilder();
howLongIsRandomString = (howManyRandom.nextInt(3) + 1);
for (int i = 0; i < howLongIsRandomString; i++) {
//生成随机索引号
int index = randomItemSet.nextInt(randomSet.length());
// 从字符串中获取由索引 index 指定的字符
char randomChar = randomSet.charAt(index);
// 将字符追加到字符串生成器
sb.append(randomChar);
}
bukkitService.runTask(() -> {
randomString = sb.toString();
Random random_blockpos = new Random();
AtomicInteger random_num = new AtomicInteger(random_blockpos.nextInt(26));
Inventory menu = Bukkit.createInventory(playerunreg, 27, messages.retrieveSingle(playerunreg, MessageKey.GUI_CAPTCHA_WINDOW_NAME, randomString));
ItemStack item = new ItemStack(Material.REDSTONE_BLOCK);
ItemMeta meta = item.getItemMeta();
try {
if (meta != null) {
meta.setDisplayName(messages.retrieveSingle(playerunreg, MessageKey.GUI_CAPTCHA_CLICKABLE_NAME, randomString));
item.setItemMeta(meta);
}
} catch (NullPointerException e) {
getLogger().log(Level.WARNING, "Unexpected error occurred while setting item meta.");
}
windowPacketListener = new PacketAdapter(this.plugin, ListenerPriority.HIGHEST, PacketType.Play.Client.CLOSE_WINDOW) {
@Override
public void onPacketReceiving(PacketEvent event) {
if (!closeReasonMap.containsKey(playerunreg) && !authmeApi.isRegistered(playerunreg.getName())) {
if (timesLeft <= 0) {
bukkitService.runTask(() -> {
playerunreg.kickPlayer(service.retrieveSingleMessage(playerunreg, MessageKey.GUI_CAPTCHA_KICK_FAILED));
});
timesLeft = 3;
} else {
--timesLeft;
if (timesLeft <= 0) {
bukkitService.runTask(() -> {
playerunreg.kickPlayer(service.retrieveSingleMessage(playerunreg, MessageKey.GUI_CAPTCHA_KICK_FAILED));
});
timesLeft = 3;
return;
}
messages.send(playerunreg, MessageKey.GUI_CAPTCHA_RETRY_MESSAGE, String.valueOf(timesLeft));
event.setCancelled(true);
random_num.set(random_blockpos.nextInt(26));
bukkitService.runTask(() -> {
menu.clear();
menu.setItem(random_num.get(), item);
playerunreg.openInventory(menu);
});
}
}
}
};
chatPacketListener = new PacketAdapter(this.plugin, ListenerPriority.HIGHEST, PacketType.Play.Client.CHAT) {
@Override
public void onPacketReceiving(PacketEvent event) {
if (!closeReasonMap.containsKey(playerunreg) && !authmeApi.isRegistered(playerunreg.getName())) {
messages.send(playerunreg, MessageKey.GUI_CAPTCHA_DENIED_MESSAGE);
event.setCancelled(true);
}
}
};
addPacketListeners();
//Open captcha inventory
menu.setItem(random_num.get(), item);
playerunreg.openInventory(menu);
if (settings.getProperty(SecuritySettings.GUI_CAPTCHA_TIMEOUT) > 0) {
long timeOut = settings.getProperty(SecuritySettings.GUI_CAPTCHA_TIMEOUT);
if (settings.getProperty(SecuritySettings.GUI_CAPTCHA_TIMEOUT) > settings.getProperty(RestrictionSettings.TIMEOUT)) {
bukkitService.runTask(() -> {
getLogger().warning("AuthMe detected that your GUI captcha timeout seconds(" + settings.getProperty(SecuritySettings.GUI_CAPTCHA_TIMEOUT) + ") is bigger than the Login timeout seconds(" +
settings.getProperty(RestrictionSettings.TIMEOUT) + "). To prevent issues, we will let the GUI captcha follow the Login timeout seconds, please check and modify your config.");
});
timeOut = settings.getProperty(RestrictionSettings.TIMEOUT);
}
long finalTimeOut = timeOut;
bukkitService.runTask(() -> {
bukkitService.runTaskLater(() -> {
if (!closeReasonMap.containsKey(playerunreg) && !authmeApi.isRegistered(playerunreg.getName())) {
playerunreg.kickPlayer(service.retrieveSingleMessage(playerunreg, MessageKey.GUI_CAPTCHA_KICK_TIMEOUT));
timesLeft = 3; // Reset the attempt counter
}
}, finalTimeOut * 20L);
});
}
});
});
}
}
private void deletePlayerData(UUID playerUUID) {
// 获取服务器的存储文件夹路径
File serverFolder = Bukkit.getServer().getWorldContainer();
String worldFolderName = settings.getProperty(SecuritySettings.DELETE_PLAYER_DATA_WORLD);
// 构建playerdata文件夹路径
File playerDataFolder = new File(serverFolder, File.separator + worldFolderName + File.separator + "playerdata");
// 构建玩家数据文件路径
File playerDataFile = new File(playerDataFolder, File.separator + playerUUID + ".dat");
// 删除玩家数据文件
if (playerDataFile.exists()) {
playerDataFile.delete();
}
}
private void deletePlayerStats(UUID playerUUID) {
// 获取服务器的存储文件夹路径
File serverFolder = Bukkit.getServer().getWorldContainer();
String worldFolderName = settings.getProperty(SecuritySettings.DELETE_PLAYER_DATA_WORLD);
// 构建stats文件夹路径
File statsFolder = new File(serverFolder, File.separator + worldFolderName + File.separator + "stats");
// 构建玩家统计数据文件路径
File statsFile = new File(statsFolder, File.separator + playerUUID + ".json");
// 删除玩家统计数据文件
if (statsFile.exists()) {
statsFile.delete();
}
}
private void deleteAuthMePlayerData(UUID playerUUID) {
File pluginFolder = plugin.getDataFolder();
File path = new File(pluginFolder, File.separator + "playerdata" + File.separator + playerUUID);
File dataFile = new File(path, File.separator + "data.json");
if (dataFile.exists()) {
dataFile.delete();
path.delete();
}
}
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) {
Player player = event.getPlayer();
String name = player.getName();
UUID playerUUID = event.getPlayer().getUniqueId();
if (!authmeApi.isRegistered(name)) {
if (settings.getProperty(SecuritySettings.DELETE_UNVERIFIED_PLAYER_DATA) && !closeReasonMap.containsKey(player)) {
bukkitService.runTaskLater(() -> {
if (!player.isOnline()) {
deletePlayerData(playerUUID);
deletePlayerStats(playerUUID);
deleteAuthMePlayerData(playerUUID);
}
}, 100L);
return;
}
closeReasonMap.remove(player);
}
}
}
@@ -1,11 +1,14 @@
package fr.xephi.authme.listener;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.api.v3.AuthMeApi;
import fr.xephi.authme.data.auth.PlayerCache;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.initialization.SettingsDependent;
import fr.xephi.authme.service.ValidationService;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.RegistrationSettings;
import fr.xephi.authme.settings.properties.SecuritySettings;
import fr.xephi.authme.util.PlayerUtils;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@@ -18,13 +21,13 @@ import javax.inject.Inject;
* Service class for the AuthMe listeners to determine whether an event should be canceled.
*/
class ListenerService implements SettingsDependent {
private final AuthMeApi authmeApi = AuthMeApi.getInstance();
private final DataSource dataSource;
private final PlayerCache playerCache;
private final ValidationService validationService;
private boolean isRegistrationForced;
@Inject
ListenerService(Settings settings, DataSource dataSource, PlayerCache playerCache,
ValidationService validationService) {
@@ -76,9 +79,18 @@ class ListenerService implements SettingsDependent {
* @param player the player to verify
* @return true if the associated event should be canceled, false otherwise
*/
public boolean shouldCancelEvent(Player player) {
return player != null && !checkAuth(player.getName()) && !PlayerUtils.isNpc(player);
}
public boolean shouldCancelInvEvent(Player player) {
try {
return !AuthMe.settings.getProperty(SecuritySettings.GUI_CAPTCHA) || authmeApi.isRegistered(player.getName()) || GuiCaptchaHandler.closeReasonMap.containsKey(player)/* || !player.getOpenInventory().getTitle().equals("请验证你是真人")*/;
} catch (Exception e) {
return true;
}
}
@Override
public void reload(Settings settings) {
@@ -93,7 +105,7 @@ class ListenerService implements SettingsDependent {
* @return true if the player may play, false otherwise
*/
private boolean checkAuth(String name) {
if (validationService.isUnrestricted(name) || playerCache.isAuthenticated(name)) {
if (validationService.isUnrestricted(name) || playerCache.isAuthenticated(name)){
return true;
}
if (!isRegistrationForced && !dataSource.isAuthAvailable(name)) {
@@ -0,0 +1,109 @@
package fr.xephi.authme.listener;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.api.v3.AuthMeApi;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.message.Messages;
import fr.xephi.authme.settings.properties.SecuritySettings;
import fr.xephi.authme.util.TeleportUtils;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import javax.inject.Inject;
public class LoginLocationFixListener implements Listener {
@Inject
private AuthMe plugin;
@Inject
private Messages messages;
private final AuthMeApi authmeApi = AuthMeApi.getInstance();
public LoginLocationFixListener() {
}
private static Material materialPortal = Material.matchMaterial("PORTAL");
private final boolean isSmartAsyncTeleport = AuthMe.settings.getProperty(SecuritySettings.SMART_ASYNC_TELEPORT);
private final boolean isFixPortalStuck = AuthMe.settings.getProperty(SecuritySettings.LOGIN_LOC_FIX_SUB_PORTAL);
private final boolean isFixGroundStuck = AuthMe.settings.getProperty(SecuritySettings.LOGIN_LOC_FIX_SUB_UNDERGROUND);
BlockFace[] faces = {BlockFace.WEST, BlockFace.EAST, BlockFace.NORTH, BlockFace.SOUTH, BlockFace.SOUTH_EAST, BlockFace.SOUTH_WEST, BlockFace.NORTH_EAST, BlockFace.NORTH_WEST};
static {
if (materialPortal == null) {
materialPortal = Material.matchMaterial("PORTAL_BLOCK");
if (materialPortal == null) {
materialPortal = Material.matchMaterial("NETHER_PORTAL");
}
}
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
Location JoinLocation = player.getLocation().getBlock().getLocation().add(0.5, 0.1, 0.5);
if (isFixPortalStuck) {
if (!JoinLocation.getBlock().getType().equals(materialPortal) && !JoinLocation.getBlock().getRelative(BlockFace.UP).getType().equals(materialPortal)) {
return;
}
Block JoinBlock = JoinLocation.getBlock();
boolean solved = false;
for (BlockFace face : faces) {
if (JoinBlock.getRelative(face).getType().equals(Material.AIR) && JoinBlock.getRelative(face).getRelative(BlockFace.UP).getType().equals(Material.AIR)) {
if (isSmartAsyncTeleport) {
TeleportUtils.teleport(player, JoinBlock.getRelative(face).getLocation().add(0.5, 0.1, 0.5));
} else {
player.teleport(JoinBlock.getRelative(face).getLocation().add(0.5, 0.1, 0.5));
}
solved = true;
break;
}
}
if (!solved) {
JoinBlock.getRelative(BlockFace.UP).breakNaturally();
JoinBlock.breakNaturally();
}
messages.send(player, MessageKey.LOCATION_FIX_PORTAL);
} else if (isFixGroundStuck) {
Material UpType = JoinLocation.getBlock().getRelative(BlockFace.UP).getType();
World world = player.getWorld();
int MaxHeight = world.getMaxHeight();
int MinHeight = world.getMinHeight();
if (!UpType.isOccluding() && !UpType.equals(Material.LAVA)) {
return;
}
for (int i = MinHeight; i <= MaxHeight; i++) {
JoinLocation.setY(i);
Block JoinBlock = JoinLocation.getBlock();
if ((JoinBlock.getRelative(BlockFace.DOWN).getType().isBlock())
&& JoinBlock.getType().equals(Material.AIR)
&& JoinBlock.getRelative(BlockFace.UP).getType().equals(Material.AIR)) {
if (JoinBlock.getRelative(BlockFace.DOWN).getType().equals(Material.LAVA)) {
JoinBlock.getRelative(BlockFace.DOWN).setType(Material.DIRT);
}
if (isSmartAsyncTeleport) {
TeleportUtils.teleport(player, JoinBlock.getLocation().add(0.5, 0.1, 0.5));
} else {
player.teleport(JoinBlock.getLocation().add(0.5, 0.1, 0.5));
}
messages.send(player, MessageKey.LOCATION_FIX_UNDERGROUND);
break;
}
if (i == MaxHeight) {
if (isSmartAsyncTeleport) {
TeleportUtils.teleport(player, JoinBlock.getLocation().add(0.5, 1.1, 0.5));
} else {
player.teleport(JoinBlock.getLocation().add(0.5, 1.1, 0.5));
}
messages.send(player, MessageKey.LOCATION_FIX_UNDERGROUND_CANT_FIX);
}
}
}
}
}
@@ -7,13 +7,11 @@ import fr.xephi.authme.initialization.Reloadable;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.message.Messages;
import fr.xephi.authme.output.ConsoleLoggerFactory;
import fr.xephi.authme.permission.AdminPermission;
import fr.xephi.authme.permission.PermissionsManager;
import fr.xephi.authme.permission.PlayerStatePermission;
import fr.xephi.authme.service.AntiBotService;
import fr.xephi.authme.service.BukkitService;
import fr.xephi.authme.service.ValidationService;
import fr.xephi.authme.service.WhiteListService;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.ProtectionSettings;
import fr.xephi.authme.settings.properties.RegistrationSettings;
@@ -48,8 +46,6 @@ public class OnJoinVerifier implements Reloadable {
@Inject
private AntiBotService antiBotService;
@Inject
private WhiteListService whiteListService;
@Inject
private ValidationService validationService;
@Inject
private BukkitService bukkitService;
@@ -85,18 +81,6 @@ public class OnJoinVerifier implements Reloadable {
throw new FailedVerificationException(MessageKey.KICK_ANTIBOT);
}
}
public void checkWhitelist(String name, boolean isAuthAvailable) throws FailedVerificationException {
if (isAuthAvailable || permissionsManager.hasPermissionOffline(name, PlayerStatePermission.WHITELIST)) {
return;
} else {
bukkitService.getOnlinePlayers().stream()
.filter(player -> permissionsManager.hasPermission(player, AdminPermission.WHITELIST_MESSAGE))
.forEach(player -> messages.send(player, MessageKey.WHITELIST_KICK, name));
}
if (whiteListService.shouldKick()) {
throw new FailedVerificationException(MessageKey.KICK_WHITELIST);
}
}
/**
* Checks whether non-registered players should be kicked, and if so, whether the player should be kicked.
@@ -1,5 +1,7 @@
package fr.xephi.authme.listener;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.api.v3.AuthMeApi;
import fr.xephi.authme.data.QuickCommandsProtectionManager;
import fr.xephi.authme.data.auth.PlayerAuth;
import fr.xephi.authme.datasource.DataSource;
@@ -18,6 +20,8 @@ import fr.xephi.authme.settings.SpawnLoader;
import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.RegistrationSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.settings.properties.SecuritySettings;
import fr.xephi.authme.util.TeleportUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@@ -28,7 +32,7 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityPickupItemEvent;
//import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryOpenEvent;
import org.bukkit.event.player.AsyncPlayerChatEvent;
@@ -50,9 +54,11 @@ import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRespawnEvent;
import org.bukkit.event.player.PlayerShearEntityEvent;
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
//import org.bukkit.event.player.PlayerSwapHandItemsEvent;
import org.bukkit.inventory.InventoryView;
import static org.bukkit.Bukkit.getServer;
import javax.inject.Inject;
import java.util.Locale;
import java.util.Set;
@@ -63,7 +69,11 @@ import static fr.xephi.authme.settings.properties.RestrictionSettings.ALLOW_UNAU
/**
* Listener class for player events.
*/
public class PlayerListener implements Listener {
public class PlayerListener implements Listener{
private final AuthMeApi authmeApi = AuthMeApi.getInstance();
@Inject
private Settings settings;
@@ -93,9 +103,12 @@ public class PlayerListener implements Listener {
private PermissionsManager permissionsManager;
@Inject
private QuickCommandsProtectionManager quickCommandsProtectionManager;
// Lowest priority to apply fast protection checks
@EventHandler(priority = EventPriority.LOWEST)
public void onAsyncPlayerPreLoginEventLowest(AsyncPlayerPreLoginEvent event) {
if (event.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) {
return;
}
@@ -111,9 +124,10 @@ public class PlayerListener implements Listener {
if (validationService.isUnrestricted(name)) {
return;
}
if (settings.getProperty(RestrictionSettings.HOOK_FLOODGATE_PLAYER) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(event.getUniqueId())){
return;
if (settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER)) {
if (getServer().getPluginManager().getPlugin("floodgate") != null) {
if (org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(event.getUniqueId())) return;
}
}
// Non-blocking checks
try {
@@ -121,9 +135,9 @@ public class PlayerListener implements Listener {
} catch (FailedVerificationException e) {
event.setKickMessage(messages.retrieveSingle(name, e.getReason(), e.getArgs()));
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
}
}
}
/*
* Login/join/leave events
@@ -148,7 +162,6 @@ public class PlayerListener implements Listener {
final PlayerAuth auth = dataSource.getAuth(name);
final boolean isAuthAvailable = auth != null;
onJoinVerifier.checkKickNonRegistered(isAuthAvailable);
onJoinVerifier.checkWhitelist(name, isAuthAvailable);
onJoinVerifier.checkAntibot(name, isAuthAvailable);
onJoinVerifier.checkNameCasing(name, auth);
final String ip = event.getAddress().getHostAddress();
@@ -185,7 +198,7 @@ public class PlayerListener implements Listener {
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerJoin(PlayerJoinEvent event) {
final Player player = event.getPlayer();
final AuthMeApi authmeApi = AuthMeApi.getInstance();
if (!PlayerListener19Spigot.isPlayerSpawnLocationEventCalled()) {
teleportationService.teleportOnJoin(player);
}
@@ -195,12 +208,15 @@ public class PlayerListener implements Listener {
management.performJoin(player);
teleportationService.teleportNewPlayerToFirstSpawn(player);
}
@EventHandler(priority = EventPriority.HIGH) // HIGH as EssentialsX listens at HIGHEST
public void onJoinMessage(PlayerJoinEvent event) {
final Player player = event.getPlayer();
// Note: join message can be null, despite api documentation says not
if (settings.getProperty(RegistrationSettings.REMOVE_JOIN_MESSAGE)) {
event.setJoinMessage(null);
@@ -335,12 +351,12 @@ public class PlayerListener implements Listener {
}
/*
* Limit player X and Z movements to 1 block
* Limit player X and Z movements
* Deny player Y+ movements (allows falling)
*/
if (from.getBlockX() == to.getBlockX()
&& from.getBlockZ() == to.getBlockZ()
if (from.getX() == to.getX()
&& from.getZ() == to.getZ()
&& from.getY() - to.getY() >= 0) {
return;
}
@@ -363,12 +379,20 @@ public class PlayerListener implements Listener {
Location spawn = spawnLoader.getSpawnLocation(player);
if (spawn != null && spawn.getWorld() != null) {
if (!player.getWorld().equals(spawn.getWorld())) {
if(settings.getProperty(SecuritySettings.SMART_ASYNC_TELEPORT)) {
TeleportUtils.teleport(player,spawn);
} else {
player.teleport(spawn);
}
} else if (spawn.distance(player.getLocation()) > settings.getProperty(ALLOWED_MOVEMENT_RADIUS)) {
if(settings.getProperty(SecuritySettings.SMART_ASYNC_TELEPORT)) {
TeleportUtils.teleport(player,spawn);
} else {
player.teleport(spawn);
}
}
}
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
public void onPlayerRespawn(PlayerRespawnEvent event) {
@@ -456,12 +480,12 @@ public class PlayerListener implements Listener {
* Inventory interactions
*/
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onPlayerPickupItem(EntityPickupItemEvent event) {
if (listenerService.shouldCancelEvent(event)) {
event.setCancelled(true);
}
}
// @EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
// public void onPlayerPickupItem(EntityPickupItemEvent event) {
// if (listenerService.shouldCancelEvent(event)) {
// event.setCancelled(true);
// }
// }
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onPlayerDropItem(PlayerDropItemEvent event) {
@@ -489,15 +513,16 @@ public class PlayerListener implements Listener {
return false;
}
Set<String> whitelist = settings.getProperty(RestrictionSettings.UNRESTRICTED_INVENTORIES);
//append a string for String whitelist
return whitelist.contains(ChatColor.stripColor(inventory.getTitle()).toLowerCase(Locale.ROOT));
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onPlayerInventoryOpen(InventoryOpenEvent event) {
final HumanEntity player = event.getPlayer();
Player ply = (Player) event.getPlayer();
if (listenerService.shouldCancelEvent(player)
&& !isInventoryWhitelisted(event.getView())) {
&& !isInventoryWhitelisted(event.getView()) && listenerService.shouldCancelInvEvent(ply)) {
event.setCancelled(true);
/*
@@ -515,12 +540,12 @@ public class PlayerListener implements Listener {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onSwitchHand(PlayerSwapHandItemsEvent event) {
Player player = event.getPlayer();
if (!player.isSneaking() || !player.hasPermission("keybindings.use"))
return;
event.setCancelled(true);
Bukkit.dispatchCommand(event.getPlayer(), "help");
}
// @EventHandler(priority = EventPriority.LOWEST)
// public void onSwitchHand(PlayerSwapHandItemsEvent event) {
// Player player = event.getPlayer();
// if (!player.isSneaking() || !player.hasPermission("keybindings.use"))
// return;
// event.setCancelled(true);
// Bukkit.dispatchCommand(event.getPlayer(), "help");
// }
}
@@ -0,0 +1,41 @@
package fr.xephi.authme.listener;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.PluginSettings;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
import javax.inject.Inject;
public class PlayerListenerHigherThan18 implements Listener {
@Inject
private ListenerService listenerService;
@Inject
private Settings settings;
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onPlayerPickupItem(EntityPickupItemEvent event) {
if (listenerService.shouldCancelEvent(event)) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onSwitchHand(PlayerSwapHandItemsEvent event) {
Player player = event.getPlayer();
if ((!player.isSneaking() || !player.hasPermission("keybindings.use")) &&
settings.getProperty(PluginSettings.MENU_UNREGISTER_COMPATIBILITY)) {
return;
}
event.setCancelled(true);
if (settings.getProperty(PluginSettings.MENU_UNREGISTER_COMPATIBILITY)) {
Bukkit.dispatchCommand(event.getPlayer(), "help");
}
}
}
@@ -114,10 +114,6 @@ class InventoryPacketAdapter extends PacketAdapter {
itemListModifier.write(0, Arrays.asList(blankInventory));
}
try {
protocolManager.sendServerPacket(player, inventoryPacket, false);
} catch (InvocationTargetException invocationExc) {
logger.logException("Error during sending blank inventory", invocationExc);
}
}
}
@@ -4,21 +4,88 @@ package fr.xephi.authme.message;
* Keys for translatable messages managed by {@link Messages}.
*/
public enum MessageKey {
/**
* You have been disconnected due to doubled login.
*/
DOUBLE_LOGIN_FIX("double_login_fix.fix_message"),
/** In order to use this command you must be authenticated! */
/**
* You are stuck in portal during Login.
*/
LOCATION_FIX_PORTAL("login_location_fix.fix_portal"),
/**
* You are stuck underground during Login.
*/
LOCATION_FIX_UNDERGROUND("login_location_fix.fix_underground"),
/**
* You are stuck underground during Login, but we cant fix it.
*/
LOCATION_FIX_UNDERGROUND_CANT_FIX("login_location_fix.cannot_fix_underground"),
/**
* Bedrock auto login success!
*/
BEDROCK_AUTO_LOGGED_IN("bedrock_auto_login.success"),
/**
* %random Verification
*/
GUI_CAPTCHA_WINDOW_NAME("gui_captcha.captcha_window_name", "%random"),
/**
* %random I am human
*/
GUI_CAPTCHA_CLICKABLE_NAME("gui_captcha.captcha_clickable_name", "%random"),
/**
* Verification failed, you have %times retries left
*/
GUI_CAPTCHA_RETRY_MESSAGE("gui_captcha.message_on_retry", "%times"),
/**
* Bedrock verification success!
*/
GUI_CAPTCHA_VERIFIED_AUTO_BEDROCK("gui_captcha.bedrock_auto_verify_success"),
/**
* Please be verified before chatting!
*/
GUI_CAPTCHA_DENIED_MESSAGE("gui_captcha.denied_message_sending"),
/**
* Verification timed out!
*/
GUI_CAPTCHA_KICK_TIMEOUT("gui_captcha.kick_on_timeout"),
/**
* Please complete the verification!
*/
GUI_CAPTCHA_KICK_FAILED("gui_captcha.kick_on_failed"),
/**
* Verification success!
*/
GUI_CAPTCHA_VERIFIED("gui_captcha.success"),
/**
* In order to use this command you must be authenticated!
*/
DENIED_COMMAND("error.denied_command"),
/** A player with the same IP is already in game! */
/**
* A player with the same IP is already in game!
*/
SAME_IP_ONLINE("on_join_validation.same_ip_online"),
/** In order to chat you must be authenticated! */
/**
* In order to chat you must be authenticated!
*/
DENIED_CHAT("error.denied_chat"),
/** AntiBot protection mode is enabled! You have to wait some minutes before joining the server. */
KICK_ANTIBOT("antibot.kick_antibot"),
KICK_WHITELIST("on_join_validation.kick_whitelist"),
WHITELIST_ENABLED_MESSAGE("misc.whitelist_enabled"),
WHITELIST_DISABLED_MESSAGE("misc.whitelist_disabled"),
/** This user isn't registered! */
UNKNOWN_USER("error.unregistered_user"),
@@ -38,6 +105,9 @@ public enum MessageKey {
/** In-game registration is disabled! */
REGISTRATION_DISABLED("registration.disabled"),
/** Logged-in due to Session Reconnection. */
SESSION_RECONNECTION("session.valid_session"),
/** Successful login! */
LOGIN_SUCCESS("login.success"),
@@ -80,6 +150,9 @@ public enum MessageKey {
/** The chosen password isn't safe, please choose another one... */
PASSWORD_UNSAFE_ERROR("password.unsafe_password"),
/** Your chosen password is not secure. It was used %pwned_count times already! Please use a stronger password... */
PASSWORD_PWNED_ERROR("password.pwned_password", "%pwned_count"),
/** Your password contains illegal characters. Allowed chars: %valid_chars */
PASSWORD_CHARACTERS_ERROR("password.forbidden_characters", "%valid_chars"),
@@ -199,7 +272,6 @@ public enum MessageKey {
/** [AntiBotService] AntiBot disabled after %m minutes! */
ANTIBOT_AUTO_DISABLED_MESSAGE("antibot.auto_disabled", "%m"),
WHITELIST_KICK("misc.whitelist_kick", "%p"),
/** The email address is already being used */
EMAIL_ALREADY_USED_ERROR("email.already_used"),
@@ -149,6 +149,10 @@ public class MessageUpdater {
.put("verification", "Verification code")
.put("time", "Time units")
.put("two_factor", "Two-factor authentication")
.put("gui_captcha", "3rd party features: GUI Captcha")
.put("bedrock_auto_login", "3rd party features: Bedrock Auto Login")
.put("login_location_fix", "3rd party features: Login Location Fix")
.put("double_login_fix", "3rd party features: Double Login Fix")
.build();
Set<String> addedKeys = new HashSet<>();
@@ -30,6 +30,7 @@ final class OldMessageKeysMigrater {
.put(MessageKey.WRONG_PASSWORD, "wrong_pwd")
.put(MessageKey.UNREGISTERED_SUCCESS, "unregistered")
.put(MessageKey.REGISTRATION_DISABLED, "reg_disabled")
.put(MessageKey.SESSION_RECONNECTION, "valid_session")
.put(MessageKey.ACCOUNT_NOT_ACTIVATED, "vb_nonActiv")
.put(MessageKey.NAME_ALREADY_REGISTERED, "user_regged")
.put(MessageKey.NO_PERMISSION, "no_perm")
@@ -124,7 +124,6 @@ public enum AdminPermission implements PermissionNode {
* Permission to see Antibot messages.
*/
ANTIBOT_MESSAGES("authme.admin.antibotmessages"),
WHITELIST_MESSAGE("authme.admin.whitelistmessage"),
/**
* Permission to use the update messages command.
@@ -10,7 +10,6 @@ public enum PlayerStatePermission implements PermissionNode {
* Permission node to bypass AntiBot protection.
*/
BYPASS_ANTIBOT("authme.bypassantibot", DefaultPermission.OP_ONLY),
WHITELIST("authme.whitelist", DefaultPermission.OP_ONLY),
/**
* Permission node to bypass BungeeCord server teleportation.
@@ -54,7 +54,7 @@ public class Management {
}
public void forceLogin(Player player) {
runTask(() -> asynchronousLogin.forceLogin(player,0));
runTask(() -> asynchronousLogin.forceLogin(player));
}
public void forceLogin(Player player, boolean quiet) {
@@ -19,7 +19,6 @@ import fr.xephi.authme.service.bungeecord.BungeeSender;
import fr.xephi.authme.service.bungeecord.MessageType;
import fr.xephi.authme.settings.commandconfig.CommandManager;
import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.PluginSettings;
import fr.xephi.authme.settings.properties.RegistrationSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.util.InternetProtocolUtils;
@@ -129,16 +128,18 @@ public class AsynchronousJoin implements AsynchronousProcess {
// Session logic
if (sessionService.canResumeSession(player)) {
service.send(player, MessageKey.SESSION_RECONNECTION);
// Run commands
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(
() -> commandManager.runCommandsOnSessionLogin(player));
bukkitService.runTaskOptionallyAsync(() -> asynchronousLogin.forceLogin(player,service.getProperty(PluginSettings.HIDE_SESSIONS_LOGIN) ? 1 : 0));
bukkitService.runTaskOptionallyAsync(() -> asynchronousLogin.forceLogin(player));
return;
} else if (proxySessionManager.shouldResumeSession(name)) {
service.send(player, MessageKey.SESSION_RECONNECTION);
// Run commands
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(
() -> commandManager.runCommandsOnSessionLogin(player));
bukkitService.runTaskOptionallyAsync(() -> asynchronousLogin.forceLogin(player,service.getProperty(PluginSettings.HIDE_SESSIONS_LOGIN) ? 1 : 0));
bukkitService.runTaskOptionallyAsync(() -> asynchronousLogin.forceLogin(player));
logger.info("The user " + player.getName() + " has been automatically logged in, "
+ "as present in autologin queue.");
return;
@@ -102,7 +102,7 @@ public class AsynchronousLogin implements AsynchronousProcess {
limboService.getLimboPlayer(player.getName()).setState(LimboPlayerState.TOTP_REQUIRED);
// TODO #1141: Check if we should check limbo state before processing password
} else {
performLogin(player, auth, false);
performLogin(player, auth);
}
}
}
@@ -112,10 +112,10 @@ public class AsynchronousLogin implements AsynchronousProcess {
*
* @param player the player to log in
*/
public void forceLogin(Player player,int quiet) {
public void forceLogin(Player player) {
PlayerAuth auth = getPlayerAuth(player);
if (auth != null) {
performLogin(player, auth, quiet == 1);
performLogin(player, auth);
}
}
@@ -128,7 +128,7 @@ public class AsynchronousLogin implements AsynchronousProcess {
public void forceLogin(Player player, boolean quiet) {
PlayerAuth auth = getPlayerAuth(player, quiet);
if (auth != null) {
performLogin(player, auth, false);
performLogin(player, auth);
}
}
@@ -265,7 +265,7 @@ public class AsynchronousLogin implements AsynchronousProcess {
* @param player the player to log in
* @param auth the associated PlayerAuth object
*/
public void performLogin(Player player, PlayerAuth auth, boolean quiet) {
public void performLogin(Player player, PlayerAuth auth) {
if (player.isOnline()) {
boolean isFirstLogin = (auth.getLastLogin() == null);
@@ -284,7 +284,7 @@ public class AsynchronousLogin implements AsynchronousProcess {
tempbanManager.resetCount(ip, name);
player.setNoDamageTicks(0);
if (!quiet) {service.send(player, MessageKey.LOGIN_SUCCESS);}
service.send(player, MessageKey.LOGIN_SUCCESS);
// Other auths
List<String> auths = dataSource.getAllAuthsByIp(auth.getLastIp());
@@ -89,9 +89,9 @@ abstract class AbstractPasswordRegisterExecutor<P extends AbstractPasswordRegist
final Player player = params.getPlayer();
if (performLoginAfterRegister(params)) {
if (commonService.getProperty(PluginSettings.USE_ASYNC_TASKS)) {
bukkitService.runTaskAsynchronously(() -> asynchronousLogin.forceLogin(player,0));
bukkitService.runTaskAsynchronously(() -> asynchronousLogin.forceLogin(player));
} else {
bukkitService.scheduleSyncDelayedTask(() -> asynchronousLogin.forceLogin(player,0), SYNC_LOGIN_DELAY);
bukkitService.scheduleSyncDelayedTask(() -> asynchronousLogin.forceLogin(player), SYNC_LOGIN_DELAY);
}
}
syncProcessManager.processSyncPasswordRegister(player);
@@ -308,7 +308,7 @@ public class Whirlpool extends UnsaltedMethod {
if (bufferRem + sourceBits < 8) {
// all remaining data fits on buffer[bufferPos], and there still
// remains some space.
bufferBits += sourceBits;
bufferBits += (int) sourceBits;
} else {
// buffer[bufferPos] is full:
bufferPos++;
@@ -73,7 +73,7 @@ public class AntiBotService implements SettingsDependent {
// Delay the schedule on first start
if (startup) {
int delay = settings.getProperty(ProtectionSettings.ANTIBOT_DELAY);
bukkitService.scheduleSyncDelayedTask(enableTask, delay * TICKS_PER_SECOND);
bukkitService.scheduleSyncDelayedTask(enableTask, (long) delay * TICKS_PER_SECOND);
startup = false;
} else {
enableTask.run();
@@ -91,7 +91,7 @@ public class AntiBotService implements SettingsDependent {
disableTask.cancel();
}
// Schedule auto-disable
disableTask = bukkitService.runTaskLater(this::stopProtection, duration * TICKS_PER_MINUTE);
disableTask = bukkitService.runTaskLater(this::stopProtection, (long) duration * TICKS_PER_MINUTE);
antiBotStatus = AntiBotStatus.ACTIVE;
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(() -> {
// Inform admins
@@ -42,18 +42,21 @@ import java.util.zip.GZIPInputStream;
public class GeoIpService {
private static final String LICENSE =
"[LICENSE] This product includes GeoLite2 data created by MaxMind, available at https://www.maxmind.com";
//private static final String LICENSE =
//"[LICENSE] This product includes GeoLite2 data created by MaxMind, available at https://www.maxmind.com";
private static final String DATABASE_NAME = "GeoLite2-Country";
private static final String DATABASE_FILE = DATABASE_NAME + ".mmdb";
private final ConsoleLogger logger = ConsoleLoggerFactory.get(GeoIpService.class);
private final Path dataFile;
private GeoIp2Provider databaseReader;
private volatile boolean downloading;
@Inject
GeoIpService(@DataFolder File dataFolder) {
GeoIpService(@DataFolder File dataFolder){
this.dataFile = dataFolder.toPath().resolve(DATABASE_FILE);
// Fires download of recent data or the initialization of the look up service
@@ -86,27 +89,63 @@ public class GeoIpService {
if (Files.exists(dataFile)) {
try {
startReading();
// don't fire the update task - we are up to date
return true;
} catch (IOException ioEx) {
logger.logException("Failed to load GeoLiteAPI database", ioEx);
return false;
}
}
// File is outdated or doesn't exist - let's try to download the data file!
// use bukkit's cached threads
return false;
}
/**
*
*/
private void startReading() throws IOException {
databaseReader = new Reader(dataFile.toFile(), FileMode.MEMORY, new CHMCache());
logger.info(LICENSE);
// clear downloading flag, because we now have working reader instance
downloading = false;
}
/**
* Downloads the archive to the destination file if it's newer than the locally version.
*
* @param lastModified modification timestamp of the already present file
* @param destination save file
* @return null if no updates were found, the MD5 hash of the downloaded archive if successful
* @throws IOException if failed during downloading and writing to destination file
*/
/**
* Downloads the archive to the destination file if it's newer than the locally version.
*
* @param destination save file
* @return null if no updates were found, the MD5 hash of the downloaded archive if successful
* @throws IOException if failed during downloading and writing to destination file
*/
/**
* Verify if the expected checksum is equal to the checksum of the given file.
*
* @param function the checksum function like MD5, SHA256 used to generate the checksum from the file
* @param file the file we want to calculate the checksum from
* @param expectedChecksum the expected checksum
* @throws IOException on I/O error reading the file or the checksum verification failed
*/
/**
* Extract the database from gzipped data. Existing outputFile will be replaced if it already exists.
*
* @param inputFile gzipped database input file
* @param outputFile destination file for the database
* @throws IOException on I/O error reading the archive, or writing the output
*/
/**
* Get the country code of the given IP address.
*
@@ -11,6 +11,7 @@ import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.output.ConsoleLoggerFactory;
import fr.xephi.authme.permission.PermissionsManager;
import fr.xephi.authme.permission.PlayerStatePermission;
import fr.xephi.authme.security.HashUtils;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.EmailSettings;
import fr.xephi.authme.settings.properties.ProtectionSettings;
@@ -21,6 +22,11 @@ import fr.xephi.authme.util.Utils;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.io.DataInputStream;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
import java.util.Arrays;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.net.InetSocketAddress;
@@ -28,6 +34,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static fr.xephi.authme.util.StringUtils.isInsideString;
@@ -84,7 +91,15 @@ public class ValidationService implements Reloadable {
return new ValidationResult(MessageKey.INVALID_PASSWORD_LENGTH);
} else if (settings.getProperty(SecuritySettings.UNSAFE_PASSWORDS).contains(passLow)) {
return new ValidationResult(MessageKey.PASSWORD_UNSAFE_ERROR);
} else if (settings.getProperty(SecuritySettings.HAVE_I_BEEN_PWNED_CHECK)) {
HaveIBeenPwnedResults results = validatePasswordHaveIBeenPwned(password);
if (results != null
&& results.isPwned()
&& results.getPwnCount() > settings.getProperty(SecuritySettings.HAVE_I_BEEN_PWNED_LIMIT)) {
return new ValidationResult(MessageKey.PASSWORD_PWNED_ERROR, String.valueOf(results.getPwnCount()));
}
}
return new ValidationResult();
}
@@ -225,6 +240,47 @@ public class ValidationService implements Reloadable {
}
return restrictions;
}
/**
* Check haveibeenpwned.com for the given password.
*
* @param password password to check for
* @return Results of the check
*/
public HaveIBeenPwnedResults validatePasswordHaveIBeenPwned(String password) {
String hash = HashUtils.sha1(password);
String hashPrefix = hash.substring(0, 5);
try {
String url = String.format("https://api.pwnedpasswords.com/range/%s", hashPrefix);
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "AuthMeReloaded");
connection.setConnectTimeout(5000);
connection.setReadTimeout(5000);
connection.setDoInput(true);
StringBuilder outStr = new StringBuilder();
try (DataInputStream input = new DataInputStream(connection.getInputStream())) {
for (int c = input.read(); c != -1; c = input.read())
outStr.append((char) c);
}
String[] hashes = outStr.toString().split("\n");
for (String hashSuffix : hashes) {
String[] hashSuffixParts = hashSuffix.trim().split(":");
if (hashSuffixParts[0].equalsIgnoreCase(hash.substring(5))) {
return new HaveIBeenPwnedResults(true, Integer.parseInt(hashSuffixParts[1]));
}
}
return new HaveIBeenPwnedResults(false, 0);
} catch (java.io.IOException e) {
logger.warning("验证密码时出现错误,这可能是由于网络问题,如果无法解决,请关闭HaveIBeenPwned检查");
}
return null;
}
public static final class ValidationResult {
private final MessageKey messageKey;
@@ -266,4 +322,22 @@ public class ValidationService implements Reloadable {
return args;
}
}
public static final class HaveIBeenPwnedResults {
private final boolean isPwned;
private final int pwnCount;
public HaveIBeenPwnedResults(boolean isPwned, int pwnCount) {
this.isPwned = isPwned;
this.pwnCount = pwnCount;
}
public boolean isPwned() {
return isPwned;
}
public int getPwnCount() {
return pwnCount;
}
}
}
@@ -1,82 +0,0 @@
package fr.xephi.authme.service;
import fr.xephi.authme.initialization.SettingsDependent;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.message.Messages;
import fr.xephi.authme.permission.AdminPermission;
import fr.xephi.authme.permission.PermissionsManager;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.ProtectionSettings;
import org.bukkit.scheduler.BukkitTask;
import javax.inject.Inject;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArrayList;
/**
* The AntiBot Service Management class.
*/
public class WhiteListService implements SettingsDependent {
private final PermissionsManager permissionsManager;
private final Messages messages;
private final BukkitService bukkitService;
private WhiteListStatus whiteListStatus;
@Inject
WhiteListService(Settings settings, Messages messages, PermissionsManager permissionsManager,
BukkitService bukkitService) {
// Instances
this.messages = messages;
this.permissionsManager = permissionsManager;
this.bukkitService = bukkitService;
// Initial status
whiteListStatus = WhiteListStatus.DISABLED;
// Load settings and start if required
reload(settings);
}
@Override
public void reload(Settings settings) {
}
private void startProtection() {
if (whiteListStatus == WhiteListStatus.ACTIVE) {
return;
}
whiteListStatus = WhiteListStatus.ACTIVE;
bukkitService.getOnlinePlayers().stream()
.filter(player -> permissionsManager.hasPermission(player, AdminPermission.WHITELIST_MESSAGE))
.forEach(player -> messages.send(player, MessageKey.WHITELIST_ENABLED_MESSAGE));
}
private void stopProtection() {
if (whiteListStatus == WhiteListStatus.DISABLED) {
return;
}
whiteListStatus = WhiteListStatus.DISABLED;
bukkitService.getOnlinePlayers().stream()
.filter(player -> permissionsManager.hasPermission(player, AdminPermission.WHITELIST_MESSAGE))
.forEach(player -> messages.send(player, MessageKey.WHITELIST_DISABLED_MESSAGE));
}
public WhiteListStatus getWhiteListStatus() {
return whiteListStatus;
}
public void overrideWhiteListStatus(boolean started) {
if (started) {
startProtection();
} else {
stopProtection();
}
}
public boolean shouldKick() {
return whiteListStatus != WhiteListStatus.DISABLED;
}
public enum WhiteListStatus {
DISABLED,
ACTIVE
}
}
@@ -19,6 +19,11 @@ public final class HooksSettings implements SettingsHolder {
public static final Property<Boolean> BUNGEECORD =
newProperty("Hooks.bungeecord", false);
@Comment("Allow FloodGatePlayer Join Without checkIsValidName()")
public static final Property<Boolean> HOOK_FLOODGATE_PLAYER =
newProperty("Hooks.floodgate", false);
@Comment("Send player to this BungeeCord server after register/login")
public static final Property<String> BUNGEECORD_SERVER =
newProperty("Hooks.sendPlayerTo", "");
@@ -8,6 +8,13 @@ import fr.xephi.authme.output.LogLevel;
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
public final class PluginSettings implements SettingsHolder {
@Comment({
"Should we execute /help command when unregistered players press Shift+F?",
"This keeps compatibility with some menu plugins",
"If you are using TrMenu, don't enable this because TrMenu already implemented this."
})
public static final Property<Boolean> MENU_UNREGISTER_COMPATIBILITY =
newProperty("3rdPartyFeature.compatibility.menuPlugins", true);
@Comment({
"Do you want to enable the session feature?",
@@ -20,12 +27,6 @@ public final class PluginSettings implements SettingsHolder {
public static final Property<Boolean> SESSIONS_ENABLED =
newProperty("settings.sessions.enabled", true);
@Comment({
"Do you want to hide login success message to player?"
})
public static final Property<Boolean> HIDE_SESSIONS_LOGIN =
newProperty("settings.sessions.hidelogin", true);
@Comment({
"After how many minutes should a session expire?",
"A player's session ends after the timeout or if his IP has changed"
@@ -19,9 +19,7 @@ public final class ProtectionSettings implements SettingsHolder {
@Comment("Apply the protection also to registered usernames")
public static final Property<Boolean> ENABLE_PROTECTION_REGISTERED =
newProperty("Protection.enableProtectionRegistered", true);
@Comment("Only allow registed usernames join server")
public static final Property<Boolean> ENABLE_WHITELIST =
newProperty("Protection.enableWhiteList", true);
@Comment({
"Countries allowed to join the server and register. For country codes, see",
"https://dev.maxmind.com/geoip/legacy/codes/iso3166/",
@@ -18,7 +18,7 @@ public final class RegistrationSettings implements SettingsHolder {
"Send every X seconds a message to a player to",
"remind him that he has to login/register"})
public static final Property<Integer> MESSAGE_INTERVAL =
newProperty("settings.registration.messageInterval", 600);
newProperty("settings.registration.messageInterval", 5);
@Comment({
"Only registered and logged in players can play.",
@@ -33,7 +33,7 @@ public final class RegistrationSettings implements SettingsHolder {
"More info at https://github.com/AuthMe/AuthMeReloaded/wiki/Registration"
})
public static final Property<RegistrationType> REGISTRATION_TYPE =
newProperty(RegistrationType.class, "settings.registration.type", RegistrationType.EMAIL);
newProperty(RegistrationType.class, "settings.registration.type", RegistrationType.PASSWORD);
@Comment({
"Second argument the /register command should take: ",
@@ -44,7 +44,7 @@ public final class RegistrationSettings implements SettingsHolder {
})
public static final Property<RegisterSecondaryArgument> REGISTER_SECOND_ARGUMENT =
newProperty(RegisterSecondaryArgument.class, "settings.registration.secondArg",
RegisterSecondaryArgument.NONE);
RegisterSecondaryArgument.CONFIRMATION);
@Comment({
"Do we force kick a player after a successful registration?",
@@ -4,6 +4,8 @@ import ch.jalu.configme.Comment;
import ch.jalu.configme.SettingsHolder;
import ch.jalu.configme.properties.Property;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -113,21 +115,19 @@ public final class RestrictionSettings implements SettingsHolder {
@Comment("Can unregistered players walk around?")
public static final Property<Boolean> ALLOW_UNAUTHED_MOVEMENT =
newProperty("settings.restrictions.allowMovement", true);
newProperty("settings.restrictions.allowMovement", false);
@Comment({
"After how many seconds should players who fail to login or register",
"be kicked? Set to 0 to disable."})
public static final Property<Integer> TIMEOUT =
newProperty("settings.restrictions.timeout", 0);
newProperty("settings.restrictions.timeout", 120);
@Comment("Regex pattern of allowed characters in the player name.")
public static final Property<String> ALLOWED_NICKNAME_CHARACTERS =
newProperty("settings.restrictions.allowedNicknameCharacters", "[a-zA-Z0-9_]*");
@Comment("Allow FloodGatePlayer Join Without checkIsValidName()")
public static final Property<Boolean> HOOK_FLOODGATE_PLAYER =
newProperty("settings.restrictions.hookFloodGatePlayer", false);
@Comment({
"How far can unregistered players walk?",
"Set to 0 for unlimited radius"
@@ -163,7 +163,7 @@ public final class RestrictionSettings implements SettingsHolder {
@Comment("AuthMe will NEVER teleport players if set to true!")
public static final Property<Boolean> NO_TELEPORT =
newProperty("settings.restrictions.noTeleport", true);
newProperty("settings.restrictions.noTeleport", false);
@Comment({
"Regex syntax for allowed chars in passwords. The default [!-~] allows all visible ASCII",
@@ -175,7 +175,7 @@ public final class RestrictionSettings implements SettingsHolder {
@Comment("Regex syntax for allowed chars in email.")
public static final Property<String> ALLOWED_EMAIL_REGEX =
newProperty("settings.restrictions.allowedEmailCharacters", "^[A-Za-z0-9]{4,15}@(outlook|163|gmail|icloud).com$");
newProperty("settings.restrictions.allowedEmailCharacters", "^[A-Za-z0-9_]{4,15}@(qq|outlook|163|gmail|icloud)\\.com$");
@Comment("Force survival gamemode when player joins?")
@@ -194,6 +194,7 @@ public final class RestrictionSettings implements SettingsHolder {
public static final Property<Set<String>> UNRESTRICTED_NAMES =
newLowercaseStringSetProperty("settings.unrestrictions.UnrestrictedName");
@Comment({
"Below you can list all inventories names that AuthMe will ignore",
"for registration or login. Configure it at your own risk!!",
@@ -206,7 +207,9 @@ public final class RestrictionSettings implements SettingsHolder {
public static final Property<Set<String>> UNRESTRICTED_INVENTORIES =
newLowercaseStringSetProperty("settings.unrestrictions.UnrestrictedInventories");
private RestrictionSettings() {
}
}
@@ -6,8 +6,10 @@ import ch.jalu.configme.properties.Property;
import fr.xephi.authme.security.HashAlgorithm;
import fr.xephi.authme.settings.EnumSetProperty;
import java.util.List;
import java.util.Set;
import static ch.jalu.configme.properties.PropertyInitializer.newListProperty;
import static ch.jalu.configme.properties.PropertyInitializer.newLowercaseStringSetProperty;
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
@@ -17,16 +19,91 @@ public final class SecuritySettings implements SettingsHolder {
"Take care with this, if you set this to false,",
"AuthMe will automatically disable and the server won't be protected!"})
public static final Property<Boolean> STOP_SERVER_ON_PROBLEM =
newProperty("Security.SQLProblem.stopServer", true);
newProperty("Security.SQLProblem.stopServer", false);
@Comment({"Should send GUI captcha by country code whitelist?",
"If the country of the player is in this list, the captcha won't be sent."})
public static final Property<List<String>> GUI_CAPTCHA_COUNTRY_WHITELIST =
newListProperty("3rdPartyFeature.captcha.whiteList");
@Comment({"Should we let Bedrock players login automatically?",
"(Requires hookFloodgate to be true & floodgate loaded)"})
public static final Property<Boolean> FORCE_LOGIN_BEDROCK = newProperty("3rdPartyFeature.features.bedrockAutoLogin", false);
@Comment("Enable the new feature to prevent ghost players?")
public static final Property<Boolean> ANTI_GHOST_PLAYERS = newProperty("3rdPartyFeature.fixes.antiGhostPlayer", false);
@Comment({"Choose the best teleport method by server brand?",
"(Enable this if you are using Paper)"})
public static final Property<Boolean> SMART_ASYNC_TELEPORT = newProperty("3rdPartyFeature.optimizes.smartAsyncTeleport", false);
@Comment("Send a GUI captcha to unregistered players?(Requires ProtocolLib)")
public static final Property<Boolean> GUI_CAPTCHA = newProperty("3rdPartyFeature.captcha.guiCaptcha", false);
@Comment({"Should we kick the players when they don't finish the GUI captcha in seconds?",
"(less than or equals 0 is disabled)"})
public static final Property<Integer> GUI_CAPTCHA_TIMEOUT = newProperty("3rdPartyFeature.captcha.timeOut",0);
@Comment({"Should we ignore floodgate players when sending GUI captcha?",
"(Requires floodgate and hookFloodgate: true)"})
public static final Property<Boolean> GUI_CAPTCHA_BE_COMPATIBILITY = newProperty("3rdPartyFeature.captcha.ignoreBedrock",false);
@Comment("Should we delete player data and stats when they didn't finish the captcha?")
public static final Property<Boolean> DELETE_UNVERIFIED_PLAYER_DATA = newProperty("3rdPartyFeature.captcha.purgePlayerData",false);
@Comment("Which world's player data should be deleted?(Enter the world *FOLDER* name where your players first logged in)")
public static final Property<String> DELETE_PLAYER_DATA_WORLD = newProperty("3rdPartyFeature.captcha.purgeWorldFolderName","world");
@Comment("Should we fix the location when players logged in the portal?")
public static final Property<Boolean> LOGIN_LOC_FIX_SUB_PORTAL = newProperty("3rdPartyFeature.fixes.loginLocationFix.fixPortalStuck", false);
@Comment("Should we fix the location when players logged underground?")
public static final Property<Boolean> LOGIN_LOC_FIX_SUB_UNDERGROUND = newProperty("3rdPartyFeature.fixes.loginLocationFix.fixGroundStuck", false);
// @Comment({"Should we kick the players when they failed captcha too many times?",
// "(Minimum value is 1)(Default: 3)"})
// public static final Property<Integer> GUI_CAPTCHA_MAX_TRY = newProperty("3rdPartyFeature.captcha.maxTryTimes",3);
//@Comment({"Using which API to get hash data?",
//"Available options: github, gitee, ghproxy (if your server is in China, please use gitee or ghproxy.)"})
//public static final Property<String> SHA_CHECK_METHOD = newProperty("Plugin.hashing.hashApi","github");
//@Comment("Should we use the local cache sometimes instead of requesting API?")
//public static final Property<Boolean> USE_LOCAL_CACHE = newProperty("Plugin.hashing.useLocalCache",false);
//@Comment("DON'T TOUCH!!!")
//public static final Property<String> SHA_CHECK_CACHE = newProperty("Plugin.hashing.hashCached","");
@Comment("Copy AuthMe log output in a separate file as well?")
public static final Property<Boolean> USE_LOGGING =
newProperty("Security.console.logConsole", true);
@Comment({"Query haveibeenpwned.com with a hashed version of the password.",
"This is used to check whether it is safe."})
public static final Property<Boolean> HAVE_I_BEEN_PWNED_CHECK =
newProperty("Security.account.haveIBeenPwned.check", false);
@Comment({"If the password is used more than this number of times, it is considered unsafe."})
public static final Property<Integer> HAVE_I_BEEN_PWNED_LIMIT =
newProperty("Security.account.haveIBeenPwned.limit", 0);
@Comment("Enable captcha when a player uses wrong password too many times")
public static final Property<Boolean> ENABLE_LOGIN_FAILURE_CAPTCHA =
newProperty("Security.captcha.useCaptcha", false);
@Comment("Check for updates on enabled from GitHub?")
public static final Property<Boolean> CHECK_FOR_UPDATES =
newProperty("Plugin.updates.checkForUpdates", true);
@Comment("Should we show the AuthMe banner on startup?")
public static final Property<Boolean> SHOW_STARTUP_BANNER =
newProperty("Plugin.banners.showBanners", true);
@Comment("Change the banner colors here (Default: §r)")
public static final Property<String> STARTUP_BANNER_COLOR =
newProperty("Plugin.banners.bannerColor", "§r");
@Comment("Max allowed tries before a captcha is required")
public static final Property<Integer> MAX_LOGIN_TRIES_BEFORE_CAPTCHA =
newProperty("Security.captcha.maxLoginTry", 8);
@@ -0,0 +1,34 @@
package fr.xephi.authme.util;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class TeleportUtils {
private static Method teleportAsyncMethod;
static {
try {//Detect Paper class
Class<?> paperClass = Class.forName("com.destroystokyo.paper.PaperConfig");
teleportAsyncMethod = Player.class.getMethod("teleportAsync", Location.class);
teleportAsyncMethod.setAccessible(true);
// if detected,use teleportAsync()
} catch (ClassNotFoundException | NoSuchMethodException e) {
teleportAsyncMethod = null;
//if not, set method to null
}
}
public static void teleport(Player player, Location location) {
if (teleportAsyncMethod != null) {
try {
teleportAsyncMethod.invoke(player, location);
} catch (IllegalAccessException | InvocationTargetException e) {
player.teleport(location);
}
} else {
player.teleport(location);
}
}
}
Binary file not shown.
+1 -4
View File
@@ -41,10 +41,7 @@
# executor: CONSOLE
# ifNumberOfAccountsAtLeast: 5
# Commands to run for players logging in whose 'last login date' was empty
onFirstLogin:
broadcast:
command: 'cmi broadcast &b欢迎 &r%p &7( %ip ) &b光临服务器,请大家多多关照!'
executor: CONSOLE
onFirstLogin: {}
onJoin: {}
onLogin: {}
# These commands are called whenever a logged in player uses /logout or quits.
+3 -2
View File
@@ -102,8 +102,9 @@
<tbody>
<tr>
<td>
<p style="color:#b0adc5;">© 2023 IrisCraft. All rights reserved.</p>
<a href="https://www.mcbbs.net/thread-1263385-1-1.html" target="_blank" style="text-decoration: none; font-size: 16px">iriscraft.work</a>
<p style="color:#b0adc5;">© 2023 HomoCraft. All rights reserved.</p>
<a href="1919810.com" target="_blank"
style="text-decoration: none; font-size: 16px">wdsj.io</a>
</td>
</tr>
</tbody>
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Сесията е продължена.'
invalid_session: '&cТвоят IP се е променил и сесията беше прекратена.'
# Error messages when joining
+1 -1
View File
@@ -69,7 +69,7 @@ misc:
# Mensagens de sessão
session:
valid_session: '&2Você deslogou recentemente, então sua sessão foi retomada!'
invalid_session: '&fO seu IP foi alterado e sua sessão expirou!'
# Mensagens de erro ao entrar
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&cAutomatické znovupřihlášení.'
invalid_session: '&cChyba: Počkej než vyprší tvoje relace.'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Erfolgreich eingeloggt!'
invalid_session: '&cUngültige Session. Bitte starte das Spiel neu oder warte, bis die Session abgelaufen ist.'
# Error messages when joining
+27 -1
View File
@@ -20,6 +20,7 @@ password:
unsafe_password: '&cThe chosen password isn''t safe, please choose another one...'
forbidden_characters: '&4Your password contains illegal characters. Allowed chars: %valid_chars'
wrong_length: '&cYour password is too short or too long! Please try with another one!'
pwned_password: '&cYour chosen password is not secure. It was used %pwned_count times already! Please use a strong password...'
# Login
login:
@@ -66,7 +67,7 @@ misc:
# Session messages
session:
invalid_session: '&cYour IP has been changed and your session data has expired!'
valid_session: '&2Logged-in due to Session Reconnection.'
# Error messages when joining
on_join_validation:
@@ -154,3 +155,28 @@ time:
hours: 'hours'
day: 'day'
days: 'days'
# 3rd party features: GUI Captcha
gui_captcha:
success: '&aVerification success!'
bedrock_auto_verify_success: '&aBedrock verification success!'
captcha_window_name: '%random Verification'
captcha_clickable_name: '%random I am human'
message_on_retry: '&cVerification failed, you have %times retries left'
denied_message_sending: '&cPlease be verified before chatting!'
kick_on_failed: '&cPlease complete the verification!'
kick_on_timeout: '&cVerification timed out!'
# 3rd party features: Bedrock Auto Login
bedrock_auto_login:
success: '&aBedrock auto login success!'
# 3rd party features: Login Location Fix
login_location_fix:
fix_portal: '&aYou are stuck in portal during Login.'
fix_underground: '&aYou are stuck underground during Login.'
cannot_fix_underground: '&aYou are stuck underground during Login, but we cant fix it.'
# 3rd party features: Double Login Fix
double_login_fix:
fix_message: '&cYou have been disconnected due to doubled login.'
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Ensalutantojn pro Sesio Rekonektas.'
invalid_session: '&cVia IP estis ŝanĝita kaj via seanco datumoj finiĝis!'
# Error messages when joining
+1 -1
View File
@@ -67,7 +67,7 @@ misc:
# Session messages
session:
valid_session: '&cInicio de sesión'
invalid_session: '&fLos datos de sesión no corresponden. Por favor espera a terminar la sesión.'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
invalid_session: '&cSinu IP-aadress muutus, seega sinu sessioon aegus!'
valid_session: '&2Sisse logitud sessiooni jätkumise tõttu.'
# Error messages when joining
on_join_validation:
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&cSesioa mantendu eta beraz ez daukazu saioa hasi beharrik.'
invalid_session: '&cZure IP helbidea aldatu da, eta horregatik zure sesioa iraungi da!'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&cIstunto jatkettu!'
invalid_session: '&fIstunto ei täsmää! Ole hyvä ja odota istunnon loppuun'
# Error messages when joining
+1 -1
View File
@@ -69,7 +69,7 @@ misc:
# Session
session:
valid_session: '&aVous avez été automatiquement connecté !'
invalid_session: 'Session expirée suite à un changement d''IP.'
# Erreurs lors d'une tentative connexion
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&cIdentificado mediante a sesión'
invalid_session: '&fOs datos de sesión non corresponden, por favor, espere a que remate a sesión'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2A megadott időkereten belül csatlakoztál vissza, így a rendszer automatikusan beléptetett.'
invalid_session: '&cAz IP címed megváltozott, ezért a visszacsatlakozási időkereted lejárt.'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Otomatis login, karena sesi masih terhubung.'
invalid_session: '&cIP kamu telah berubah, dan sesi kamu telah berakhir!'
# Error messages when joining
+1 -1
View File
@@ -67,7 +67,7 @@ misc:
# Session messages
session:
valid_session: '&2Autenticato automaticamente attraverso la precedente sessione!'
invalid_session: '&cIl tuo indirizzo IP è cambiato e la tua sessione è stata terminata!'
# Error messages when joining
+1 -1
View File
@@ -68,7 +68,7 @@ misc:
# Session messages
session:
valid_session: '&2세션 재 연결로 인해 로그인 되었습니다.'
invalid_session: '&cIP가 변경되어 세션이 만료되었습니다!'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&aSesijos prisijungimas'
invalid_session: '&cSesijos laikai nesutampa, prasome palaukti kol secija baigsis.'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Ingelogd wegens sessie-herverbinding.'
invalid_session: '&cJouw IP-adres is veranderd en je sessie is verlopen!'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&aZalogowano automatycznie z powodu sesji logowania.'
invalid_session: '&fSesja logowania zakończona!'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&cSessão válida'
invalid_session: '&fDados de sessão não correspondem. Por favor aguarde o fim da sessão'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
invalid_session: '&cIP-ul tau a fost schimbat si sesiunea ta a expirat!'
valid_session: '&2Conectat datorita reconectarii sesiunii.'
# Error messages when joining
on_join_validation:
+1 -1
View File
@@ -61,7 +61,7 @@ misc:
# Session messages
session:
valid_session: '&2Вы автоматически авторизовались!'
invalid_session: '&cСессия некорректна. Дождитесь, пока она закончится.'
# Error messages when joining
+2 -1
View File
@@ -65,7 +65,7 @@ misc:
# Session messages
session:
valid_session: '&2Uspešna povezava.'
invalid_session: '&cVas IP je bil spremenjen in vasa seja je potekla!'
# Error messages when joining
@@ -154,3 +154,4 @@ time:
hours: 'ure'
day: 'dan'
days: 'dni'
+1 -1
View File
@@ -72,7 +72,7 @@ misc:
# Session messages
session:
valid_session: '&cAutomatické prihlásenie z dôvodu pokračovania relácie.'
invalid_session: '&fTvoja IP sa zmenila a tvoje prihlásenie(relácia) vypršalo(/a).'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Ulogovani ste zbog ponovnog povezivanja sesije.'
invalid_session: '&cVaš IP je promenjen i vaši podaci o sesiji su istekli!'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Oturuma girisiniz otomatikmen yapilmistir.'
invalid_session: '&cIP adresin degistirildi ve oturum suren doldu!'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Сесію відновлено.'
invalid_session: '&cСесію було розірвано внаслідок зміни IP.'
# Error messages when joining
+1 -1
View File
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2Phiên đăng nhập đã được kết nối trở lại.'
invalid_session: '&cIP của bạn đã bị thay đổi và phiên đăng nhập của bạn đã hết hạn!'
# Error messages when joining
+34 -11
View File
@@ -7,8 +7,8 @@
registration:
disabled: '&c注册已被禁止'
name_taken: '&c此用户已经在此服务器注册过'
register_request: '&7请输入“/register <邮箱>”以注册'
command_usage: '&c正确用法:“/register <邮箱>”'
register_request: '&b请输入“&a/reg <密码> <重复密码>&b”以注册'
command_usage: '&c正确用法:“/reg <密码> <重复密码>”'
reg_only: '&c只允许注册过的玩家进服!'
success: '&a*** 已成功注册 ***'
@@ -19,13 +19,14 @@ password:
unsafe_password: '&c您不能使用安全性过低的密码。 '
forbidden_characters: '&4您的密码包含了非法字符.可使用的字符: %valid_chars'
wrong_length: '&4您的密码没有达到要求!'
pwned_password: '&c你使用的密码并不安全。它已经被使用了 %pwned_count 次! 请使用一个更强大的密码...'
# Login
login:
command_usage: '&c正确用法:“/login <密码>”'
command_usage: '&c正确用法:“/l <密码>”'
wrong_password: '&c*** 密码错误 ***'
success: '&a*** 已成功登录 ***'
login_request: '&c请输入“/login <密码>”以登录'
login_request: '&c请输入“/l <密码>”以登录'
timeout_error: '给您登录的时间已经过了'
# Errors
@@ -65,12 +66,10 @@ misc:
usage_change_password: '&a正确用法:“/changepassword 旧密码 新密码”'
accounts_owned_self: '您拥有 %count 个账户:'
accounts_owned_other: '玩家 %name 拥有 %count 个账户:'
whitelist_enabled: '&c*** 服务器已暂停注册 ***'
whitelist_disabled: '&a*** 服务器已开放注册 ***'
whitelist_kick: '&7玩家 &c%p &7请求加入服务器,但是被拒绝了.'
# Session messages
session:
valid_session: ''
invalid_session: '&c*** 请重新登录 ***'
# Error messages when joining
@@ -90,10 +89,7 @@ on_join_validation:
&c如果您并不知情,请更换您的用户名重新加入该服务器.
invalid_name_case: '&c您应该使用 %valid 登录服务器,当前名字: %invalid .'
quick_command: '&c您发送命令的速度太快了,请重新加入服务器等待一会后再使用命令'
kick_whitelist: |-
&6[&b&lAccount Security System&6]
&c本服务器已经暂停注册,请用下面的联系方式了解详细情况.
&cQQ群聊号码: 550984860 &b| &c QQ: 2125368097 &b| &cTelegram: @Stabrinai
# Email
email:
add_email_request: ''
@@ -168,3 +164,30 @@ two_factor:
not_enabled_error: '&c双重验证未在您的账号上启用,请使用“/totp add”来启用'
removed_success: '&c双重验证已从您的账号上禁用'
invalid_code: '&c无效的验证码'
# 3rd party features: GUI Captcha
gui_captcha:
success: '&a*** 验证完成 ***'
bedrock_auto_verify_success: '&a*** 基岩版自动验证完成 ***'
captcha_window_name: '&k%random&r&n请验证你是真人'
captcha_clickable_name: '&k%random&r&n我是真人'
message_on_retry: '&c验证失败,你还有 %times 次机会'
denied_message_sending: '&c请先完成验证再聊天!'
kick_on_failed: '&c请先完成验证!'
kick_on_timeout: '&c验证超时'
# 3rd party features: Bedrock Auto Login
bedrock_auto_login:
success: "&a基岩版自动登录完成"
# 3rd party features: Login Location Fix
login_location_fix:
fix_portal: '&a你在登录时卡在了地狱门, 现已修正'
fix_underground: '&a你被埋住了, 坐标已修正, 下次下线之前请小心!'
cannot_fix_underground: '&a你被埋住了, 坐标无法修正, 只好送你去了最高点, 自求多福吧少年~'
# 3rd party features: Double Login Fix
double_login_fix:
fix_message: '&a已修复幽灵玩家, 请重新进入'
@@ -69,7 +69,7 @@ misc:
# Session messages
session:
valid_session: '&8[&6用戶系統&8] &b嗨 歡迎回來喔~'
invalid_session: '&8[&6用戶系統&8] &f登入階段資料已損壞,請等待登入階段結束。'
# Error messages when joining
@@ -66,7 +66,7 @@ misc:
# Session messages
session:
valid_session: '&2由於會話重新連接而登錄.'
invalid_session: '&c您的IP已更改,並且您的會話數據已過期!'
# Error messages when joining
@@ -68,7 +68,7 @@ misc:
# Session messages
session:
valid_session: '&b【AuthMe】&6您已經成功登入!'
invalid_session: '&b【AuthMe】&6Session驗證不相符!'
# Error messages when joining
+3 -2
View File
@@ -108,8 +108,9 @@
<tbody>
<tr>
<td>
<p style="color:#b0adc5;">© 2023 IrisCraft. All rights reserved.</p>
<a href="https://www.mcbbs.net/thread-1263385-1-1.html" target="_blank" style="text-decoration: none; font-size: 16px">iriscraft.work</a>
<p style="color:#b0adc5;">© 2023 HomoCraft. All rights reserved.</p>
<a href="1919810.com" target="_blank"
style="text-decoration: none; font-size: 16px">wdsj.io</a>
</td>
</tr>
</tbody>
+3 -7
View File
@@ -1,9 +1,9 @@
name: ${pluginDescription.name}
authors: [${pluginDescription.authors}]
website: ${project.url}
description: ${project.description}
website: http://github.com/HaHaWTH/AuthMeReReloaded/
description: A fork of AuthMeReloaded that contains bug fixes
main: ${pluginDescription.main}
version: ${pluginDescription.version}
version: 5.6.0-FORK-b34
api-version: 1.13
softdepend:
- Vault
@@ -28,7 +28,6 @@ commands:
usage: /login <password>
aliases:
- l
- log
logout:
description: Logout command
usage: /logout
@@ -184,9 +183,6 @@ permissions:
authme.bypassantibot:
description: Permission node to bypass AntiBot protection.
default: op
authme.whitelist:
description: Permission node to whitelist.
default: op
authme.bypasscountrycheck:
description: Permission to bypass the GeoIp country code check.
default: false
+3 -2
View File
@@ -101,8 +101,9 @@
<tbody>
<tr>
<td>
<p style="color:#b0adc5;">© 2023 IrisCraft. All rights reserved.</p>
<a href="https://www.mcbbs.net/thread-1263385-1-1.html" target="_blank" style="text-decoration: none; font-size: 16px">iriscraft.work</a>
<p style="color:#b0adc5;">© 2023 HomoCraft. All rights reserved.</p>
<a href="1919810.com" target="_blank"
style="text-decoration: none; font-size: 16px">wdsj.io</a>
</td>
</tr>
</tbody>
+3 -2
View File
@@ -99,8 +99,9 @@
<tbody>
<tr>
<td>
<p style="color:#b0adc5;">© 2023 IrisCraft. All rights reserved.</p>
<a href="https://www.mcbbs.net/thread-1263385-1-1.html" target="_blank" style="text-decoration: none; font-size: 16px">iriscraft.work</a>
<p style="color:#b0adc5;">© 2023 HomoCraft. All rights reserved.</p>
<a href="1919810.com" target="_blank"
style="text-decoration: none; font-size: 16px">wdsj.io</a>
</td>
</tr>
</tbody>
@@ -101,8 +101,9 @@
<tbody>
<tr>
<td>
<p style="color:#b0adc5;">© 2023 IrisCraft. All rights reserved.</p>
<a href="https://www.mcbbs.net/thread-1263385-1-1.html" target="_blank" style="text-decoration: none; font-size: 16px">iriscraft.work</a>
<p style="color:#b0adc5;">© 2023 HomoCraft. All rights reserved.</p>
<a href="1919810.com" target="_blank"
style="text-decoration: none; font-size: 16px">wdsj.io</a>
</td>
</tr>
</tbody>