Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a18a6bd3a5 | |||
| 2f5c423e53 | |||
| ba1bc04b9c | |||
| 6d1790a02e | |||
| 598c6736a6 | |||
| 44e4790e45 | |||
| 409eb21b85 | |||
| 54872f102d | |||
| b1c655bbc7 | |||
| 50219cc4a9 | |||
| 01e46b566a | |||
| 93c97cf94b | |||
| 8e9b580745 | |||
| 70104d73aa | |||
| aa3e56f98f | |||
| eee560a7fe | |||
| e8a1c33d40 | |||
| abeaa249b8 | |||
| 797905d050 | |||
| 797aadb328 | |||
| 4c918925d8 | |||
| 640eb9335e | |||
| cdce697ae6 | |||
| ef85e2de25 | |||
| 3128b821f4 |
@@ -182,7 +182,7 @@
|
||||
<version>${maven.minimumVersion}</version>
|
||||
</requireMavenVersion>
|
||||
<requireJavaVersion>
|
||||
<version>[11,)</version>
|
||||
<version>[17,)</version>
|
||||
</requireJavaVersion>
|
||||
</rules>
|
||||
<fail>true</fail>
|
||||
@@ -323,7 +323,7 @@
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>shaded-jar-relocate</id>
|
||||
<id>shaded-jar-legacy</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
@@ -339,10 +339,6 @@
|
||||
<pattern>com.google.thirdparty</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.com.google.thirdparty</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>com.cryptomorin.xseries</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.xseries</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>com.google.j2objc</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.com.google.j2objc</shadedPattern>
|
||||
@@ -359,46 +355,6 @@
|
||||
<pattern>org.h2</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.org.h2</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.apache.http</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern>
|
||||
</relocation>
|
||||
<relocation>
|
||||
<pattern>org.apache.commons</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern>
|
||||
</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>
|
||||
<pattern>waffle</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern>
|
||||
</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>
|
||||
<pattern>com.github.benmanes.caffeine</pattern>
|
||||
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
</execution>
|
||||
@@ -1170,9 +1126,9 @@
|
||||
|
||||
<!-- Universal Scheduler -->
|
||||
<dependency>
|
||||
<groupId>com.github.Anon8281</groupId>
|
||||
<groupId>com.github.HomoMC</groupId>
|
||||
<artifactId>UniversalScheduler</artifactId>
|
||||
<version>0.1.6</version>
|
||||
<version>0.1.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public class AuthMe extends JavaPlugin {
|
||||
// Version and build number values
|
||||
private static String pluginVersion = "5.6.0-Fork";
|
||||
private static final String pluginBuild = "b";
|
||||
private static String pluginBuildNumber = "44";
|
||||
private static String pluginBuildNumber = "45";
|
||||
// Private instances
|
||||
private EmailService emailService;
|
||||
private CommandHandler commandHandler;
|
||||
@@ -405,7 +405,7 @@ public class AuthMe extends JavaPlugin {
|
||||
}
|
||||
|
||||
// Wait for tasks and close data source
|
||||
new TaskCloser(this, database).run();
|
||||
new TaskCloser(database).run();
|
||||
|
||||
// Disabled correctly
|
||||
Consumer<String> infoLogMethod = logger == null ? getLogger()::info : logger::info;
|
||||
|
||||
@@ -24,7 +24,6 @@ public class LimboPlayer {
|
||||
private final float flySpeed;
|
||||
private MyScheduledTask timeoutTask = null;
|
||||
private MessageTask messageTask = null;
|
||||
private MyScheduledTask inter;
|
||||
|
||||
private LimboPlayerState state = LimboPlayerState.PASSWORD_REQUIRED;
|
||||
|
||||
@@ -114,19 +113,18 @@ public class LimboPlayer {
|
||||
*
|
||||
* @param messageTask The message task to set
|
||||
*/
|
||||
public void setMessageTask(MessageTask messageTask, MyScheduledTask inter) {
|
||||
if (this.messageTask != null && this.inter != null) {
|
||||
this.inter.cancel();
|
||||
public void setMessageTask(MessageTask messageTask) {
|
||||
if (this.messageTask != null) {
|
||||
this.messageTask.cancel();
|
||||
}
|
||||
this.messageTask = messageTask;
|
||||
this.inter = inter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all tasks associated to the player.
|
||||
*/
|
||||
public void clearTasks() {
|
||||
setMessageTask(null, null);
|
||||
setMessageTask(null);
|
||||
setTimeoutTask(null);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ class LimboPlayerTaskManager {
|
||||
if (interval > 0) {
|
||||
String[] joinMessage = messages.retrieveSingle(player, result.messageKey, result.args).split("\n");
|
||||
MessageTask messageTask = new MessageTask(player, joinMessage);
|
||||
MyScheduledTask task = bukkitService.runTaskTimer(messageTask, 2 * TICKS_PER_SECOND, (long) interval * TICKS_PER_SECOND);
|
||||
limbo.setMessageTask(messageTask, task);
|
||||
bukkitService.runTaskTimer(messageTask, 2 * TICKS_PER_SECOND, (long) interval * TICKS_PER_SECOND);
|
||||
limbo.setMessageTask(messageTask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ import com.github.Anon8281.universalScheduler.scheduling.schedulers.TaskSchedule
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Waits for asynchronous tasks to complete before closing the data source
|
||||
* so the plugin can shut down properly.
|
||||
@@ -13,20 +11,15 @@ import java.util.logging.Logger;
|
||||
public class TaskCloser implements Runnable {
|
||||
|
||||
private final TaskScheduler scheduler;
|
||||
private final Logger logger;
|
||||
private final AuthMe plugin;
|
||||
private final DataSource dataSource;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param plugin the plugin instance
|
||||
* @param dataSource the data source (nullable)
|
||||
*/
|
||||
public TaskCloser(AuthMe plugin, DataSource dataSource) {
|
||||
public TaskCloser(DataSource dataSource) {
|
||||
this.scheduler = AuthMe.getScheduler();
|
||||
this.logger = plugin.getLogger();
|
||||
this.plugin = plugin;
|
||||
this.dataSource = dataSource;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import static fr.xephi.authme.process.register.executors.PlayerAuthBuilderHelper
|
||||
class PasswordRegisterExecutor extends AbstractPasswordRegisterExecutor<PasswordRegisterParams> {
|
||||
|
||||
@Override
|
||||
public PlayerAuth createPlayerAuthObject(PasswordRegisterParams params) {
|
||||
public synchronized PlayerAuth createPlayerAuthObject(PasswordRegisterParams params) {
|
||||
return createPlayerAuth(params.getPlayer(), params.getHashedPassword(), params.getEmail());
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class BukkitService implements SettingsDependent {
|
||||
* @param task Task to be executed
|
||||
*/
|
||||
public void scheduleSyncDelayedTask(Runnable task) {
|
||||
getScheduler().runTask(task);
|
||||
runTask(task);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,7 +68,11 @@ public class BukkitService implements SettingsDependent {
|
||||
* @param delay Delay in server ticks before executing task
|
||||
*/
|
||||
public void scheduleSyncDelayedTask(Runnable task, long delay) {
|
||||
getScheduler().runTaskLater(task, delay);
|
||||
if (IS_FOLIA) {
|
||||
runTaskLater(task, delay);
|
||||
} else {
|
||||
Bukkit.getScheduler().runTaskLater(authMe, task, delay); // We must do this to keep compatibility
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,8 +145,6 @@ public class BukkitService implements SettingsDependent {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns a task that will run after the specified number of server
|
||||
* ticks.
|
||||
@@ -182,7 +184,11 @@ public class BukkitService implements SettingsDependent {
|
||||
* @throws IllegalArgumentException if task is null
|
||||
*/
|
||||
public void runTaskAsynchronously(Runnable task) {
|
||||
getScheduler().runTaskAsynchronously(task);
|
||||
if (IS_FOLIA) {
|
||||
getScheduler().runTaskAsynchronously(task);
|
||||
} else {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(authMe, task);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ website: http://github.com/HaHaWTH/AuthMeReReloaded/
|
||||
description: A fork of AuthMeReloaded that contains bug fixes
|
||||
main: ${pluginDescription.main}
|
||||
folia-supported: true
|
||||
version: 5.6.0-FORK-b44
|
||||
version: 5.6.0-FORK-b45
|
||||
api-version: 1.13
|
||||
softdepend:
|
||||
- Vault
|
||||
|
||||
Reference in New Issue
Block a user