mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-23 09:08:15 +01:00
Correctly call these methods Async !
This commit is contained in:
parent
bfc2fbd546
commit
0691236826
@ -1,5 +1,6 @@
|
|||||||
package fr.xephi.authme.process;
|
package fr.xephi.authme.process;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
@ -34,11 +35,21 @@ public class Management extends Thread {
|
|||||||
|
|
||||||
public void performLogin(final Player player, final String password,
|
public void performLogin(final Player player, final String password,
|
||||||
final boolean forceLogin) {
|
final boolean forceLogin) {
|
||||||
new AsyncronousLogin(player, password, forceLogin, plugin, database).process();
|
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable(){
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
new AsyncronousLogin(player, password, forceLogin, plugin, database).process();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void performRegister(final Player player, final String password,
|
public void performRegister(final Player player, final String password,
|
||||||
final String email) {
|
final String email) {
|
||||||
new AsyncronousRegister(player, password, email, plugin, database).process();
|
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable(){
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
new AsyncronousRegister(player, password, email, plugin, database).process();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user