mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-28 05:05:14 +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,12 +35,21 @@ 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));
|
||||
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(nwMsg);
|
||||
|
Loading…
Reference in New Issue
Block a user