mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-28 03:27:34 +01:00
First attempt to fix the email registation issue
This commit is contained in:
parent
ba70b17394
commit
cd3e7b5d43
@ -2,6 +2,7 @@ package fr.xephi.authme.process.register;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
@ -34,11 +35,20 @@ public class ProcessSyncronousEmailRegister implements Runnable {
|
||||
m.send(player, "vb_nonActiv");
|
||||
int time = Settings.getRegistrationTimeout * 20;
|
||||
int msgInterval = Settings.getWarnMessageInterval;
|
||||
|
||||
BukkitScheduler sched = plugin.getServer().getScheduler();
|
||||
|
||||
// if (time != 0) {
|
||||
// LimboCache.getInstance().getLimboPlayer(name).getTimeoutTaskId().cancel();
|
||||
// BukkitTask id = Bukkit.getScheduler().runTaskLaterAsynchronously(plugin, new TimeoutTask(plugin, name, player), time);
|
||||
// LimboCache.getInstance().getLimboPlayer(name).setTimeoutTaskId(id);
|
||||
// }
|
||||
|
||||
if (time != 0) {
|
||||
LimboCache.getInstance().getLimboPlayer(name).getTimeoutTaskId().cancel();
|
||||
BukkitTask id = Bukkit.getScheduler().runTaskLaterAsynchronously(plugin, new TimeoutTask(plugin, name, player), time);
|
||||
BukkitTask id = sched.runTaskLaterAsynchronously(plugin, new TimeoutTask(plugin, name, player), time);
|
||||
LimboCache.getInstance().getLimboPlayer(name).setTimeoutTaskId(id);
|
||||
}
|
||||
|
||||
|
||||
LimboCache.getInstance().getLimboPlayer(name).getMessageTaskId().cancel();
|
||||
BukkitTask nwMsg = Bukkit.getScheduler().runTaskAsynchronously(plugin, new MessageTask(plugin, name, m.send("login_msg"), msgInterval));
|
||||
|
Loading…
Reference in New Issue
Block a user