Merge branch 'multipaper' into mp-1

This commit is contained in:
DGun Otto 2024-04-14 19:39:03 +08:00 committed by GitHub
commit 3d1392f0e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 26 additions and 58 deletions

View File

@ -1,56 +1 @@
# AuthMeReReloaded
**"A fork of the best authentication plugin for the Bukkit modding API!⭐"**
[English](https://github.com/HaHaWTH/AuthMeReReloaded) | [简体中文](https://github.com/HaHaWTH/AuthMeReReloaded/blob/master/README-zh.md)
![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"/>
<img src="https://www.codefactor.io/repository/github/hahawth/authmerereloaded/badge" alt="CodeFactor" />
<img alt="GitHub Downloads (all assets, all releases)" src="https://img.shields.io/github/downloads/HaHaWTH/AuthMeReReloaded/total?logo=github&label=GitHub%20Downloads&color=black">
<img alt="Spiget Downloads" src="https://img.shields.io/spiget/downloads/114010?logo=spigotmc&label=SpigotMC%20Downloads&color=orange">
<img alt="Modrinth Downloads" src="https://img.shields.io/modrinth/dt/3IEZ9vol?logo=modrinth&label=Modrinth%20Downloads&color=light-green">
<img alt="Hangar Downloads" src="https://img.shields.io/hangar/dt/AuthMeReReloaded?logo=hangar&label=Hangar%20Downloads&color=white">
</p>
**Detailed Changes:**
1. Improved mail sending logic & support more emails
2. Shutdown mail sending(When server is closed, email you)
3. Legacy 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 support (in active testing)**
13. Offhand Menu compatibility(Thats amazing)
14. **Velocity support (See [Velocity Support](./vc-support.md))**
15. Support Virtual Threads caching
16. Automatically fix portal stuck issue
17. Automatically login for Bedrock players(configurable)
18. Fix shulker box crash bug on legacy versions(MC 1.13-)
19. **H2 database support**
20. **100% compatibility with original authme and extensions**
21. 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)
If you are using FRP(内网穿透) for your server, this plugin may help [HAProxy-Detector](https://github.com/HaHaWTH/HAProxy-Detector)
**Pull Requests and suggestions are welcome!**
<picture>
<source
media="(prefers-color-scheme: dark)"
srcset="
https://api.star-history.com/svg?repos=HaHaWTH/AuthMeReReloaded&type=Date&theme=dark
"
/>
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=HaHaWTH/AuthMeReReloaded&type=Date" />
</picture>
**This branch adds Multipaper support, requires Java17 or higher**

18
pom.xml
View File

@ -409,6 +409,10 @@
<pattern>com.github.benmanes.caffeine</pattern>
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
</relocation>
<relocation>
<pattern>com.github.puregero.multilib</pattern>
<shadedPattern>fr.xephi.authme.libs.com.github.puregero.multilib</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
@ -639,6 +643,12 @@
</snapshots>
</repository>
<!-- MultiLib -->
<repository>
<id>clojars</id>
<url>https://repo.clojars.org</url>
</repository>
<!-- ProtocolLib Repo -->
<repository>
<id>dmulloy2-repo-releases</id>
@ -1186,6 +1196,14 @@
<scope>compile</scope>
</dependency>
<!-- MultiLib -->
<dependency>
<groupId>com.github.puregero</groupId>
<artifactId>multilib</artifactId>
<version>1.1.13</version>
<scope>compile</scope>
</dependency>
<!-- JDBC drivers for datasource integration tests -->
<dependency>
<groupId>org.xerial</groupId>

View File

@ -29,7 +29,7 @@ import static fr.xephi.authme.datasource.SqlDataSourceUtils.logSqlException;
/**
* H2 data source.
*/
@SuppressWarnings({"checkstyle:AbbreviationAsWordInName"}) // Justification: Class name cannot be changed anymore
@SuppressWarnings({"all"}) // Justification: Class name cannot be changed anymore
public class H2 extends AbstractSqlDataSource {
private final ConsoleLogger logger = ConsoleLoggerFactory.get(H2.class);

View File

@ -1,5 +1,6 @@
package fr.xephi.authme.listener;
import com.github.puregero.multilib.MultiLib;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.api.v3.AuthMeApi;
import fr.xephi.authme.data.auth.PlayerCache;
@ -81,7 +82,11 @@ class ListenerService implements SettingsDependent {
*/
public boolean shouldCancelEvent(Player player) {
if (MultiLib.isMultiPaper()) {
if (MultiLib.isExternalPlayer(player)) {
return false;
}
}
return player != null && !checkAuth(player.getName()) && !PlayerUtils.isNpc(player);
}
public boolean shouldCancelInvEvent(Player player) {