Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 778edac895 | |||
| 17d1cf1665 | |||
| 3f3671c95c | |||
| 52c06917c3 | |||
| b2ea5cbef8 | |||
| 99c7466b37 | |||
| e60c18d8a8 | |||
| 8c4da6288e | |||
| 1a73adf414 | |||
| cb76ae01e1 | |||
| 89df4e451c | |||
| fe39310eca | |||
| b9790d458e | |||
| dc8d5f741a | |||
| b3288e9c72 | |||
| c88aa79377 | |||
| 2327c07f9a | |||
| 8e93d4cd19 | |||
| a963bde749 | |||
| 10b6997c32 | |||
| 970c77678b | |||
| 07c479746b | |||
| d90a8a36cf | |||
| c1eee8e139 | |||
| dd831a65a5 | |||
| 51783604c6 | |||
| 9f8471d4e9 | |||
| c4ac2601ad | |||
| b4a0994871 | |||
| b619e1dac5 | |||
| ba1703c684 | |||
| 131b5b7805 | |||
| 099415e823 | |||
| 91261f4315 |
@@ -10,11 +10,11 @@ jobs:
|
|||||||
Build:
|
Build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
jdkversion: [ 17 ]
|
jdkversion: [ 21 ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: ${{ matrix.jdkversion }}
|
java-version: ${{ matrix.jdkversion }}
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: mvn -V -B clean package --file pom.xml
|
run: mvn -V -B clean package --file pom.xml
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Download
|
name: Download
|
||||||
path: ./target/AuthMe-5.6.0-FORK-Universal.jar
|
path: ./target/AuthMe-5.6.0-FORK-Universal.jar
|
||||||
@@ -37,8 +37,10 @@ jobs:
|
|||||||
javaVersion: '8'
|
javaVersion: '8'
|
||||||
- mcVersion: '1.12.2'
|
- mcVersion: '1.12.2'
|
||||||
javaVersion: '8'
|
javaVersion: '8'
|
||||||
- mcVersion: '1.20.1'
|
- mcVersion: '1.18.2'
|
||||||
javaVersion: '17'
|
javaVersion: '17'
|
||||||
|
- mcVersion: '1.20.4'
|
||||||
|
javaVersion: '21'
|
||||||
steps:
|
steps:
|
||||||
- uses: HaHaWTH/minecraft-plugin-runtime-test@paper
|
- uses: HaHaWTH/minecraft-plugin-runtime-test@paper
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ If you are using FRP(内网穿透) for your server, this plugin may help [HAProx
|
|||||||
|
|
||||||
**Pull Requests and suggestions are welcome!**
|
**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>
|
<picture>
|
||||||
<source
|
<source
|
||||||
media="(prefers-color-scheme: dark)"
|
media="(prefers-color-scheme: dark)"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
<maven.minimumVersion>3.6.3</maven.minimumVersion>
|
<maven.minimumVersion>3.6.3</maven.minimumVersion>
|
||||||
|
|
||||||
<!-- Dependencies versions -->
|
<!-- Dependencies versions -->
|
||||||
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version>
|
<spigot.version>1.20.6-R0.1-SNAPSHOT</spigot.version>
|
||||||
|
|
||||||
<!-- Versioning properties -->
|
<!-- Versioning properties -->
|
||||||
<project.outputName>AuthMe</project.outputName>
|
<project.outputName>AuthMe</project.outputName>
|
||||||
@@ -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.3.0</version>
|
<version>3.4.1</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.2</version>
|
<version>3.5.3</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>shaded-jar</id>
|
<id>shaded-jar</id>
|
||||||
@@ -279,10 +279,6 @@
|
|||||||
</excludes>
|
</excludes>
|
||||||
</artifactSet>
|
</artifactSet>
|
||||||
<relocations>
|
<relocations>
|
||||||
<relocation>
|
|
||||||
<pattern>org.h2</pattern>
|
|
||||||
<shadedPattern>fr.xephi.authme.libs.org.h2</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>org.apache.http</pattern>
|
<pattern>org.apache.http</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern>
|
||||||
@@ -291,34 +287,10 @@
|
|||||||
<pattern>org.apache.commons</pattern>
|
<pattern>org.apache.commons</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
<relocation>
|
|
||||||
<pattern>javax.activation</pattern>
|
|
||||||
<shadedPattern>fr.xephi.authme.libs.javax.activation</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
|
||||||
<pattern>javax.annotation</pattern>
|
|
||||||
<shadedPattern>fr.xephi.authme.libs.javax.annotation</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
|
||||||
<pattern>javax.mail</pattern>
|
|
||||||
<shadedPattern>fr.xephi.authme.libs.javax.mail</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
<relocation>
|
||||||
<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>
|
||||||
@@ -365,10 +337,6 @@
|
|||||||
<pattern>com.google.gson</pattern>
|
<pattern>com.google.gson</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.com.google.gson</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.com.google.gson</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
<relocation>
|
|
||||||
<pattern>org.h2</pattern>
|
|
||||||
<shadedPattern>fr.xephi.authme.libs.org.h2</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>org.apache.http</pattern>
|
<pattern>org.apache.http</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern>
|
||||||
@@ -377,34 +345,10 @@
|
|||||||
<pattern>org.apache.commons</pattern>
|
<pattern>org.apache.commons</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
<relocation>
|
|
||||||
<pattern>javax.activation</pattern>
|
|
||||||
<shadedPattern>fr.xephi.authme.libs.javax.activation</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
|
||||||
<pattern>javax.annotation</pattern>
|
|
||||||
<shadedPattern>fr.xephi.authme.libs.javax.annotation</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
|
||||||
<pattern>javax.mail</pattern>
|
|
||||||
<shadedPattern>fr.xephi.authme.libs.javax.mail</shadedPattern>
|
|
||||||
</relocation>
|
|
||||||
<relocation>
|
<relocation>
|
||||||
<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>
|
||||||
@@ -515,6 +459,10 @@
|
|||||||
<pattern>org.apache.commons.validator</pattern>
|
<pattern>org.apache.commons.validator</pattern>
|
||||||
<shadedPattern>fr.xephi.authme.libs.org.apache.commons.validator</shadedPattern>
|
<shadedPattern>fr.xephi.authme.libs.org.apache.commons.validator</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.alessiodp.libby</pattern>
|
||||||
|
<shadedPattern>fr.xephi.authme.libs.com.alessiodp.libby</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
|
|
||||||
<filters>
|
<filters>
|
||||||
@@ -661,6 +609,12 @@
|
|||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
|
<!-- Maven Central Snapshots Repository -->
|
||||||
|
<repository>
|
||||||
|
<id>maven-snapshots</id>
|
||||||
|
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
<!-- Multiverse Repo -->
|
<!-- Multiverse Repo -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>onarandombox-repo-releases</id>
|
<id>onarandombox-repo-releases</id>
|
||||||
@@ -763,7 +717,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-email</artifactId>
|
<artifactId>commons-email</artifactId>
|
||||||
<version>1.6.0</version>
|
<version>1.6-SNAPSHOT</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -775,6 +729,14 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Libby -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alessiodp.libby</groupId>
|
||||||
|
<artifactId>libby-bukkit</artifactId>
|
||||||
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Database Connection Pool -->
|
<!-- Database Connection Pool -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.zaxxer</groupId>
|
<groupId>com.zaxxer</groupId>
|
||||||
@@ -1190,14 +1152,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xerial</groupId>
|
<groupId>org.xerial</groupId>
|
||||||
<artifactId>sqlite-jdbc</artifactId>
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
<version>3.45.2.0</version>
|
<version>3.45.3.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
<version>2.2.224</version>
|
<version>2.2.224</version>
|
||||||
<scope>compile</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package fr.xephi.authme;
|
|||||||
|
|
||||||
import ch.jalu.injector.Injector;
|
import ch.jalu.injector.Injector;
|
||||||
import ch.jalu.injector.InjectorBuilder;
|
import ch.jalu.injector.InjectorBuilder;
|
||||||
|
import com.alessiodp.libby.BukkitLibraryManager;
|
||||||
import com.github.Anon8281.universalScheduler.UniversalScheduler;
|
import com.github.Anon8281.universalScheduler.UniversalScheduler;
|
||||||
import com.github.Anon8281.universalScheduler.scheduling.schedulers.TaskScheduler;
|
import com.github.Anon8281.universalScheduler.scheduling.schedulers.TaskScheduler;
|
||||||
import fr.xephi.authme.api.v3.AuthMeApi;
|
import fr.xephi.authme.api.v3.AuthMeApi;
|
||||||
@@ -80,7 +81,7 @@ public class AuthMe extends JavaPlugin {
|
|||||||
// Version and build number values
|
// Version and build number values
|
||||||
private static String pluginVersion = "5.6.0-Fork";
|
private static String pluginVersion = "5.6.0-Fork";
|
||||||
private static final String pluginBuild = "b";
|
private static final String pluginBuild = "b";
|
||||||
private static String pluginBuildNumber = "47";
|
private static String pluginBuildNumber = "49";
|
||||||
// Private instances
|
// Private instances
|
||||||
private EmailService emailService;
|
private EmailService emailService;
|
||||||
private CommandHandler commandHandler;
|
private CommandHandler commandHandler;
|
||||||
@@ -143,6 +144,11 @@ public class AuthMe extends JavaPlugin {
|
|||||||
return scheduler;
|
return scheduler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The library manager
|
||||||
|
*/
|
||||||
|
public static BukkitLibraryManager libraryManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method called when the server enables the plugin.
|
* Method called when the server enables the plugin.
|
||||||
*/
|
*/
|
||||||
@@ -151,6 +157,7 @@ public class AuthMe extends JavaPlugin {
|
|||||||
// Load the plugin version data from the plugin description file
|
// Load the plugin version data from the plugin description file
|
||||||
loadPluginInfo(getDescription().getVersion());
|
loadPluginInfo(getDescription().getVersion());
|
||||||
scheduler = UniversalScheduler.getScheduler(this);
|
scheduler = UniversalScheduler.getScheduler(this);
|
||||||
|
libraryManager = new BukkitLibraryManager(this);
|
||||||
|
|
||||||
// Set the Logger instance and log file path
|
// Set the Logger instance and log file path
|
||||||
ConsoleLogger.initialize(getLogger(), new File(getDataFolder(), LOG_FILENAME));
|
ConsoleLogger.initialize(getLogger(), new File(getDataFolder(), LOG_FILENAME));
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package fr.xephi.authme.initialization;
|
package fr.xephi.authme.initialization;
|
||||||
|
|
||||||
|
import com.alessiodp.libby.Library;
|
||||||
import fr.xephi.authme.ConsoleLogger;
|
import fr.xephi.authme.ConsoleLogger;
|
||||||
import fr.xephi.authme.data.auth.PlayerCache;
|
import fr.xephi.authme.data.auth.PlayerCache;
|
||||||
import fr.xephi.authme.datasource.CacheDataSource;
|
import fr.xephi.authme.datasource.CacheDataSource;
|
||||||
@@ -21,6 +22,8 @@ import javax.inject.Provider;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
import static fr.xephi.authme.AuthMe.libraryManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the AuthMe data source.
|
* Creates the AuthMe data source.
|
||||||
*/
|
*/
|
||||||
@@ -78,8 +81,14 @@ public class DataSourceProvider implements Provider<DataSource> {
|
|||||||
dataSource = new SQLite(settings, dataFolder);
|
dataSource = new SQLite(settings, dataFolder);
|
||||||
break;
|
break;
|
||||||
case H2:
|
case H2:
|
||||||
|
Library h2 = Library.builder()
|
||||||
|
.groupId("com.h2database")
|
||||||
|
.artifactId("h2")
|
||||||
|
.version("2.2.224")
|
||||||
|
.build();
|
||||||
|
libraryManager.addMavenCentral();
|
||||||
|
libraryManager.loadLibrary(h2);
|
||||||
dataSource = new H2(settings, dataFolder);
|
dataSource = new H2(settings, dataFolder);
|
||||||
logger.warning("You are using H2 database, which is still in development!\nMake sure to backup and report any issues you encounter on GitHub!");
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new UnsupportedOperationException("Unknown data source type '" + dataSourceType + "'");
|
throw new UnsupportedOperationException("Unknown data source type '" + dataSourceType + "'");
|
||||||
|
|||||||
@@ -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 recovery code:", e);
|
logger.logException("Failed to create email for shutdown:", e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package fr.xephi.authme.process.quit;
|
package fr.xephi.authme.process.quit;
|
||||||
|
|
||||||
|
import com.github.Anon8281.universalScheduler.UniversalScheduler;
|
||||||
import fr.xephi.authme.data.limbo.LimboService;
|
import fr.xephi.authme.data.limbo.LimboService;
|
||||||
import fr.xephi.authme.process.SynchronousProcess;
|
import fr.xephi.authme.process.SynchronousProcess;
|
||||||
import fr.xephi.authme.settings.commandconfig.CommandManager;
|
import fr.xephi.authme.settings.commandconfig.CommandManager;
|
||||||
@@ -27,8 +28,10 @@ public class ProcessSyncPlayerQuit implements SynchronousProcess {
|
|||||||
commandManager.runCommandsOnLogout(player);
|
commandManager.runCommandsOnLogout(player);
|
||||||
} else {
|
} else {
|
||||||
limboService.restoreData(player);
|
limboService.restoreData(player);
|
||||||
|
if (!UniversalScheduler.isFolia) { // AuthMeReReloaded - Fix #146 (Very stupid solution, but works)
|
||||||
player.saveData(); // #1238: Speed is sometimes not restored properly
|
player.saveData(); // #1238: Speed is sometimes not restored properly
|
||||||
}
|
}
|
||||||
|
}
|
||||||
player.leaveVehicle();
|
player.leaveVehicle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class AsynchronousUnregister implements AsynchronousProcess {
|
|||||||
public void adminUnregister(CommandSender initiator, String name, Player player) {
|
public void adminUnregister(CommandSender initiator, String name, Player player) {
|
||||||
if (dataSource.removeAuth(name)) {
|
if (dataSource.removeAuth(name)) {
|
||||||
performPostUnregisterActions(name, player);
|
performPostUnregisterActions(name, player);
|
||||||
velocitySender.sendAuthMeVelocityMessage(player, VMessageType.FORCE_UNREGISTER);
|
if (player != null) velocitySender.sendAuthMeVelocityMessage(player, VMessageType.FORCE_UNREGISTER);
|
||||||
bukkitService.createAndCallEvent(isAsync -> new UnregisterByAdminEvent(player, name, isAsync, initiator));
|
bukkitService.createAndCallEvent(isAsync -> new UnregisterByAdminEvent(player, name, isAsync, initiator));
|
||||||
if (initiator == null) {
|
if (initiator == null) {
|
||||||
logger.info(name + " was unregistered");
|
logger.info(name + " was unregistered");
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package fr.xephi.authme.service;
|
package fr.xephi.authme.service;
|
||||||
|
|
||||||
import com.github.Anon8281.universalScheduler.UniversalRunnable;
|
import com.github.Anon8281.universalScheduler.UniversalRunnable;
|
||||||
|
import com.github.Anon8281.universalScheduler.UniversalScheduler;
|
||||||
import com.github.Anon8281.universalScheduler.scheduling.tasks.MyScheduledTask;
|
import com.github.Anon8281.universalScheduler.scheduling.tasks.MyScheduledTask;
|
||||||
import fr.xephi.authme.AuthMe;
|
import fr.xephi.authme.AuthMe;
|
||||||
import fr.xephi.authme.initialization.SettingsDependent;
|
import fr.xephi.authme.initialization.SettingsDependent;
|
||||||
import fr.xephi.authme.settings.Settings;
|
import fr.xephi.authme.settings.Settings;
|
||||||
import fr.xephi.authme.settings.properties.PluginSettings;
|
import fr.xephi.authme.settings.properties.PluginSettings;
|
||||||
import fr.xephi.authme.util.Utils;
|
|
||||||
import org.bukkit.BanEntry;
|
import org.bukkit.BanEntry;
|
||||||
import org.bukkit.BanList;
|
import org.bukkit.BanList;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@@ -38,7 +38,7 @@ public class BukkitService implements SettingsDependent {
|
|||||||
/** Number of ticks per minute. */
|
/** Number of ticks per minute. */
|
||||||
public static final int TICKS_PER_MINUTE = 60 * TICKS_PER_SECOND;
|
public static final int TICKS_PER_MINUTE = 60 * TICKS_PER_SECOND;
|
||||||
/** Whether the server is running Folia. */
|
/** Whether the server is running Folia. */
|
||||||
private static final boolean IS_FOLIA = Utils.isClassLoaded("io.papermc.paper.threadedregions.RegionizedServer");
|
private static final boolean isFolia = UniversalScheduler.isFolia;
|
||||||
private final AuthMe authMe;
|
private final AuthMe authMe;
|
||||||
private boolean useAsyncTasks;
|
private boolean useAsyncTasks;
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ public class BukkitService implements SettingsDependent {
|
|||||||
* @param delay Delay in server ticks before executing task
|
* @param delay Delay in server ticks before executing task
|
||||||
*/
|
*/
|
||||||
public void scheduleSyncDelayedTask(Runnable task, long delay) {
|
public void scheduleSyncDelayedTask(Runnable task, long delay) {
|
||||||
if (IS_FOLIA) {
|
if (isFolia) {
|
||||||
runTaskLater(task, delay);
|
runTaskLater(task, delay);
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getScheduler().runTaskLater(authMe, task, delay); // We must do this to keep compatibility
|
Bukkit.getScheduler().runTaskLater(authMe, task, delay); // We must do this to keep compatibility
|
||||||
@@ -98,7 +98,7 @@ public class BukkitService implements SettingsDependent {
|
|||||||
* @throws IllegalArgumentException if task is null
|
* @throws IllegalArgumentException if task is null
|
||||||
*/
|
*/
|
||||||
public void runTask(Runnable task) {
|
public void runTask(Runnable task) {
|
||||||
if (IS_FOLIA) {
|
if (isFolia) {
|
||||||
getScheduler().runTask(task);
|
getScheduler().runTask(task);
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getScheduler().runTask(authMe, task);
|
Bukkit.getScheduler().runTask(authMe, task);
|
||||||
@@ -106,7 +106,7 @@ public class BukkitService implements SettingsDependent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void runTask(Entity entity, Runnable task) {
|
public void runTask(Entity entity, Runnable task) {
|
||||||
if (IS_FOLIA) {
|
if (isFolia) {
|
||||||
getScheduler().runTask(entity, task);
|
getScheduler().runTask(entity, task);
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getScheduler().runTask(authMe, task);
|
Bukkit.getScheduler().runTask(authMe, task);
|
||||||
@@ -122,7 +122,7 @@ public class BukkitService implements SettingsDependent {
|
|||||||
* @param task the task to be run
|
* @param task the task to be run
|
||||||
*/
|
*/
|
||||||
public void runTaskIfFolia(Runnable task) {
|
public void runTaskIfFolia(Runnable task) {
|
||||||
if (IS_FOLIA) {
|
if (isFolia) {
|
||||||
runTask(task);
|
runTask(task);
|
||||||
} else {
|
} else {
|
||||||
task.run();
|
task.run();
|
||||||
@@ -134,7 +134,7 @@ public class BukkitService implements SettingsDependent {
|
|||||||
* @param task the task to be run
|
* @param task the task to be run
|
||||||
*/
|
*/
|
||||||
public void runTaskIfFolia(Entity entity, Runnable task) {
|
public void runTaskIfFolia(Entity entity, Runnable task) {
|
||||||
if (IS_FOLIA) {
|
if (isFolia) {
|
||||||
runTask(entity, task);
|
runTask(entity, task);
|
||||||
} else {
|
} else {
|
||||||
task.run();
|
task.run();
|
||||||
@@ -146,7 +146,7 @@ public class BukkitService implements SettingsDependent {
|
|||||||
* @param task the task to be run
|
* @param task the task to be run
|
||||||
*/
|
*/
|
||||||
public void runTaskIfFolia(Location location, Runnable task) {
|
public void runTaskIfFolia(Location location, Runnable task) {
|
||||||
if (IS_FOLIA) {
|
if (isFolia) {
|
||||||
runTask(location, task);
|
runTask(location, task);
|
||||||
} else {
|
} else {
|
||||||
task.run();
|
task.run();
|
||||||
@@ -196,7 +196,7 @@ public class BukkitService implements SettingsDependent {
|
|||||||
* @throws IllegalArgumentException if task is null
|
* @throws IllegalArgumentException if task is null
|
||||||
*/
|
*/
|
||||||
public void runTaskAsynchronously(Runnable task) {
|
public void runTaskAsynchronously(Runnable task) {
|
||||||
if (IS_FOLIA) {
|
if (isFolia) {
|
||||||
getScheduler().runTaskAsynchronously(task);
|
getScheduler().runTaskAsynchronously(task);
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(authMe, task);
|
Bukkit.getScheduler().runTaskAsynchronously(authMe, task);
|
||||||
|
|||||||
@@ -144,7 +144,9 @@ public class TeleportationService implements Reloadable {
|
|||||||
} else if (settings.getProperty(TELEPORT_UNAUTHED_TO_SPAWN)) {
|
} else if (settings.getProperty(TELEPORT_UNAUTHED_TO_SPAWN)) {
|
||||||
if (settings.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
|
if (settings.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
|
||||||
Location location = buildLocationFromAuth(player, auth);
|
Location location = buildLocationFromAuth(player, auth);
|
||||||
if (location.equals(player.getLocation())) return;
|
Location playerLoc = player.getLocation();
|
||||||
|
if (location.getX() == playerLoc.getX() && location.getY() == location.getY() && location.getZ() == playerLoc.getZ()
|
||||||
|
&& location.getWorld() == playerLoc.getWorld()) return;
|
||||||
logger.debug("Teleporting `{0}` after login, based on the player auth", player.getName());
|
logger.debug("Teleporting `{0}` after login, based on the player auth", player.getName());
|
||||||
teleportBackFromSpawn(player, location);
|
teleportBackFromSpawn(player, location);
|
||||||
} else if (limbo != null && limbo.getLocation() != null) {
|
} else if (limbo != null && limbo.getLocation() != null) {
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ 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.
@@ -4,7 +4,7 @@ website: http://github.com/HaHaWTH/AuthMeReReloaded/
|
|||||||
description: A fork of AuthMeReloaded that contains bug fixes
|
description: A fork of AuthMeReloaded that contains bug fixes
|
||||||
main: ${pluginDescription.main}
|
main: ${pluginDescription.main}
|
||||||
folia-supported: true
|
folia-supported: true
|
||||||
version: 5.6.0-FORK-b47
|
version: 5.6.0-FORK-b49
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
softdepend:
|
softdepend:
|
||||||
- Vault
|
- Vault
|
||||||
|
|||||||
Reference in New Issue
Block a user