Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cffd16ff2 | |||
| 3d1392f0e1 | |||
| c2cd561e27 | |||
| 12880a5cfd | |||
| b5a8df2c4e | |||
| a035ba0a4b | |||
| bf6de0e161 |
@@ -1,60 +1 @@
|
|||||||
# AuthMeReReloaded
|
**This branch adds Multipaper support, requires Java17 or higher**
|
||||||
**"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)
|
|
||||||
|
|
||||||

|
|
||||||
<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!**
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Only additions to AuthMeReloaded is under AGPL-3.0 license, AuthMeReloaded is licensed under GPL-3.0.
|
|
||||||
|
|
||||||
<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>
|
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.4.1</version>
|
<version>3.3.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- Generate a jar containing the source javadoc -->
|
<!-- Generate a jar containing the source javadoc -->
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -256,7 +256,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.5.3</version>
|
<version>3.5.2</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>shaded-jar</id>
|
<id>shaded-jar</id>
|
||||||
@@ -307,6 +307,18 @@
|
|||||||
<pattern>waffle</pattern>
|
<pattern>waffle</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.sun.mail</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.sun.mail</shadedPattern>
|
||||||
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.sun.jna</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.sun.jna</shadedPattern>
|
||||||
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.sun.activation</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.sun.activation</shadedPattern>
|
||||||
|
</relocation>
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>com.github.benmanes.caffeine</pattern>
|
<pattern>com.github.benmanes.caffeine</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
|
||||||
@@ -381,10 +393,26 @@
|
|||||||
<pattern>waffle</pattern>
|
<pattern>waffle</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.sun.mail</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.sun.mail</shadedPattern>
|
||||||
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.sun.jna</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.sun.jna</shadedPattern>
|
||||||
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.sun.activation</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.sun.activation</shadedPattern>
|
||||||
|
</relocation>
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>com.github.benmanes.caffeine</pattern>
|
<pattern>com.github.benmanes.caffeine</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.github.puregero.multilib</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.github.puregero.multilib</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@@ -615,6 +643,12 @@
|
|||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
|
<!-- MultiLib -->
|
||||||
|
<repository>
|
||||||
|
<id>clojars</id>
|
||||||
|
<url>https://repo.clojars.org</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
<!-- ProtocolLib Repo -->
|
<!-- ProtocolLib Repo -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>dmulloy2-repo-releases</id>
|
<id>dmulloy2-repo-releases</id>
|
||||||
@@ -739,7 +773,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-email</artifactId>
|
<artifactId>commons-email</artifactId>
|
||||||
<version>1.6-SNAPSHOT</version>
|
<version>1.6.0</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -1162,11 +1196,19 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</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 -->
|
<!-- JDBC drivers for datasource integration tests -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
<version>3.45.3.0</version>
|
<version>3.45.2.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import static fr.xephi.authme.datasource.SqlDataSourceUtils.logSqlException;
|
|||||||
/**
|
/**
|
||||||
* H2 data source.
|
* 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 {
|
public class H2 extends AbstractSqlDataSource {
|
||||||
|
|
||||||
private final ConsoleLogger logger = ConsoleLoggerFactory.get(H2.class);
|
private final ConsoleLogger logger = ConsoleLoggerFactory.get(H2.class);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package fr.xephi.authme.listener;
|
package fr.xephi.authme.listener;
|
||||||
|
|
||||||
|
import com.github.puregero.multilib.MultiLib;
|
||||||
import fr.xephi.authme.AuthMe;
|
import fr.xephi.authme.AuthMe;
|
||||||
import fr.xephi.authme.api.v3.AuthMeApi;
|
import fr.xephi.authme.api.v3.AuthMeApi;
|
||||||
import fr.xephi.authme.data.auth.PlayerCache;
|
import fr.xephi.authme.data.auth.PlayerCache;
|
||||||
@@ -81,7 +82,11 @@ class ListenerService implements SettingsDependent {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public boolean shouldCancelEvent(Player player) {
|
public boolean shouldCancelEvent(Player player) {
|
||||||
|
if (MultiLib.isMultiPaper()) {
|
||||||
|
if (MultiLib.isExternalPlayer(player)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return player != null && !checkAuth(player.getName()) && !PlayerUtils.isNpc(player);
|
return player != null && !checkAuth(player.getName()) && !PlayerUtils.isNpc(player);
|
||||||
}
|
}
|
||||||
public boolean shouldCancelInvEvent(Player player) {
|
public boolean shouldCancelInvEvent(Player player) {
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class EmailService {
|
|||||||
try {
|
try {
|
||||||
htmlEmail = sendMailSsl.initializeMail(email);
|
htmlEmail = sendMailSsl.initializeMail(email);
|
||||||
} catch (EmailException e) {
|
} catch (EmailException e) {
|
||||||
logger.logException("Failed to create email for shutdown:", e);
|
logger.logException("Failed to create email for recovery code:", e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import fr.xephi.authme.service.bungeecord.BungeeSender;
|
|||||||
import fr.xephi.authme.service.bungeecord.MessageType;
|
import fr.xephi.authme.service.bungeecord.MessageType;
|
||||||
import fr.xephi.authme.service.velocity.VMessageType;
|
import fr.xephi.authme.service.velocity.VMessageType;
|
||||||
import fr.xephi.authme.service.velocity.VelocitySender;
|
import fr.xephi.authme.service.velocity.VelocitySender;
|
||||||
|
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@@ -64,11 +65,11 @@ public class AsynchronousLogout implements AsynchronousProcess {
|
|||||||
PlayerAuth auth = playerCache.getAuth(name);
|
PlayerAuth auth = playerCache.getAuth(name);
|
||||||
database.updateSession(auth);
|
database.updateSession(auth);
|
||||||
// TODO: send an update when a messaging service will be implemented (SESSION)
|
// TODO: send an update when a messaging service will be implemented (SESSION)
|
||||||
//if (service.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
|
if (service.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
|
||||||
auth.setQuitLocation(player.getLocation());
|
auth.setQuitLocation(player.getLocation());
|
||||||
database.updateQuitLoc(auth);
|
database.updateQuitLoc(auth);
|
||||||
// TODO: send an update when a messaging service will be implemented (QUITLOC)
|
// TODO: send an update when a messaging service will be implemented (QUITLOC)
|
||||||
//} AuthMeReReloaded - Always save quit location
|
}
|
||||||
|
|
||||||
playerCache.removePlayer(name);
|
playerCache.removePlayer(name);
|
||||||
codeManager.unverify(name);
|
codeManager.unverify(name);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import fr.xephi.authme.service.SessionService;
|
|||||||
import fr.xephi.authme.service.ValidationService;
|
import fr.xephi.authme.service.ValidationService;
|
||||||
import fr.xephi.authme.settings.SpawnLoader;
|
import fr.xephi.authme.settings.SpawnLoader;
|
||||||
import fr.xephi.authme.settings.properties.PluginSettings;
|
import fr.xephi.authme.settings.properties.PluginSettings;
|
||||||
|
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
||||||
import fr.xephi.authme.util.PlayerUtils;
|
import fr.xephi.authme.util.PlayerUtils;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -67,16 +68,13 @@ public class AsynchronousQuit implements AsynchronousProcess {
|
|||||||
boolean wasLoggedIn = playerCache.isAuthenticated(name);
|
boolean wasLoggedIn = playerCache.isAuthenticated(name);
|
||||||
|
|
||||||
if (wasLoggedIn) {
|
if (wasLoggedIn) {
|
||||||
//if (service.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
|
if (service.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
|
||||||
// AuthMeReReloaded - Always save quit location on quit
|
|
||||||
Location loc = spawnLoader.getPlayerLocationOrSpawn(player);
|
Location loc = spawnLoader.getPlayerLocationOrSpawn(player);
|
||||||
PlayerAuth authLoc = PlayerAuth.builder()
|
PlayerAuth auth = PlayerAuth.builder()
|
||||||
.name(name).location(loc)
|
.name(name).location(loc)
|
||||||
.realName(player.getName()).build();
|
.realName(player.getName()).build();
|
||||||
database.updateQuitLoc(authLoc);
|
database.updateQuitLoc(auth);
|
||||||
// AuthMeReReloaded - Fix AuthMe#2769 -1
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
String ip = PlayerUtils.getPlayerIp(player);
|
String ip = PlayerUtils.getPlayerIp(player);
|
||||||
PlayerAuth auth = PlayerAuth.builder()
|
PlayerAuth auth = PlayerAuth.builder()
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ public final class PluginSettings implements SettingsHolder {
|
|||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"Message language, available languages:",
|
"Message language, available languages:",
|
||||||
"https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/translations.md",
|
"https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/translations.md"
|
||||||
"Example: zhcn, en"
|
|
||||||
})
|
})
|
||||||
public static final Property<String> MESSAGES_LANGUAGE =
|
public static final Property<String> MESSAGES_LANGUAGE =
|
||||||
newProperty("settings.messagesLanguage", "en");
|
newProperty("settings.messagesLanguage", "en");
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user