Fixed various spelling and grammar issues
This commit is contained in:
@@ -1,166 +1,166 @@
|
||||
package fr.xephi.authme.process;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.process.email.AsyncChangeEmail;
|
||||
import fr.xephi.authme.process.join.AsyncronousJoin;
|
||||
import fr.xephi.authme.process.login.AsyncronousLogin;
|
||||
import fr.xephi.authme.process.logout.AsyncronousLogout;
|
||||
import fr.xephi.authme.process.quit.AsyncronousQuit;
|
||||
import fr.xephi.authme.process.register.AsyncRegister;
|
||||
import fr.xephi.authme.process.unregister.AsyncronousUnregister;
|
||||
import fr.xephi.authme.security.RandomString;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
|
||||
/**
|
||||
* @author Gabriele
|
||||
* @version $Revision: 1.0 $
|
||||
*/
|
||||
public class Management {
|
||||
|
||||
public static RandomString rdm = new RandomString(Settings.captchaLength);
|
||||
private final AuthMe plugin;
|
||||
private final BukkitScheduler sched;
|
||||
|
||||
/**
|
||||
* Constructor for Management.
|
||||
*
|
||||
* @param plugin AuthMe
|
||||
*/
|
||||
public Management(AuthMe plugin) {
|
||||
this.plugin = plugin;
|
||||
this.sched = this.plugin.getServer().getScheduler();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performLogin.
|
||||
*
|
||||
* @param player Player
|
||||
* @param password String
|
||||
* @param forceLogin boolean
|
||||
*/
|
||||
public void performLogin(final Player player, final String password, final boolean forceLogin) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncronousLogin(player, password, forceLogin, plugin, plugin.database).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performLogout.
|
||||
*
|
||||
* @param player Player
|
||||
*/
|
||||
public void performLogout(final Player player) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncronousLogout(player, plugin, plugin.database).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performRegister.
|
||||
*
|
||||
* @param player Player
|
||||
* @param password String
|
||||
* @param email String
|
||||
*/
|
||||
public void performRegister(final Player player, final String password, final String email) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncRegister(player, password, email, plugin, plugin.database).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performUnregister.
|
||||
*
|
||||
* @param player Player
|
||||
* @param password String
|
||||
* @param force boolean
|
||||
*/
|
||||
public void performUnregister(final Player player, final String password, final boolean force) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncronousUnregister(player, password, force, plugin).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performJoin.
|
||||
*
|
||||
* @param player Player
|
||||
*/
|
||||
public void performJoin(final Player player) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncronousJoin(player, plugin, plugin.database).process();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performQuit.
|
||||
*
|
||||
* @param player Player
|
||||
* @param isKick boolean
|
||||
*/
|
||||
public void performQuit(final Player player, final boolean isKick) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncronousQuit(player, plugin, plugin.database, isKick).process();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performAddEmail.
|
||||
*
|
||||
* @param player Player
|
||||
* @param newEmail String
|
||||
* @param newEmailVerify String
|
||||
*/
|
||||
public void performAddEmail(final Player player, final String newEmail, final String newEmailVerify) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncChangeEmail(player, plugin, null, newEmail, newEmailVerify).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performChangeEmail.
|
||||
*
|
||||
* @param player Player
|
||||
* @param oldEmail String
|
||||
* @param newEmail String
|
||||
*/
|
||||
public void performChangeEmail(final Player player, final String oldEmail, final String newEmail) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncChangeEmail(player, plugin, oldEmail, newEmail).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
package fr.xephi.authme.process;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.process.email.AsyncChangeEmail;
|
||||
import fr.xephi.authme.process.join.AsynchronousJoin;
|
||||
import fr.xephi.authme.process.login.AsynchronousLogin;
|
||||
import fr.xephi.authme.process.logout.AsynchronousLogout;
|
||||
import fr.xephi.authme.process.quit.AsynchronousQuit;
|
||||
import fr.xephi.authme.process.register.AsyncRegister;
|
||||
import fr.xephi.authme.process.unregister.AsynchronousUnregister;
|
||||
import fr.xephi.authme.security.RandomString;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
|
||||
/**
|
||||
* @author Gabriele
|
||||
* @version $Revision: 1.0 $
|
||||
*/
|
||||
public class Management {
|
||||
|
||||
public static RandomString rdm = new RandomString(Settings.captchaLength);
|
||||
private final AuthMe plugin;
|
||||
private final BukkitScheduler sched;
|
||||
|
||||
/**
|
||||
* Constructor for Management.
|
||||
*
|
||||
* @param plugin AuthMe
|
||||
*/
|
||||
public Management(AuthMe plugin) {
|
||||
this.plugin = plugin;
|
||||
this.sched = this.plugin.getServer().getScheduler();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performLogin.
|
||||
*
|
||||
* @param player Player
|
||||
* @param password String
|
||||
* @param forceLogin boolean
|
||||
*/
|
||||
public void performLogin(final Player player, final String password, final boolean forceLogin) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsynchronousLogin(player, password, forceLogin, plugin, plugin.database).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performLogout.
|
||||
*
|
||||
* @param player Player
|
||||
*/
|
||||
public void performLogout(final Player player) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsynchronousLogout(player, plugin, plugin.database).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performRegister.
|
||||
*
|
||||
* @param player Player
|
||||
* @param password String
|
||||
* @param email String
|
||||
*/
|
||||
public void performRegister(final Player player, final String password, final String email) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncRegister(player, password, email, plugin, plugin.database).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performUnregister.
|
||||
*
|
||||
* @param player Player
|
||||
* @param password String
|
||||
* @param force boolean
|
||||
*/
|
||||
public void performUnregister(final Player player, final String password, final boolean force) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsynchronousUnregister(player, password, force, plugin).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performJoin.
|
||||
*
|
||||
* @param player Player
|
||||
*/
|
||||
public void performJoin(final Player player) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsynchronousJoin(player, plugin, plugin.database).process();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performQuit.
|
||||
*
|
||||
* @param player Player
|
||||
* @param isKick boolean
|
||||
*/
|
||||
public void performQuit(final Player player, final boolean isKick) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
new AsynchronousQuit(player, plugin, plugin.database, isKick).process();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performAddEmail.
|
||||
*
|
||||
* @param player Player
|
||||
* @param newEmail String
|
||||
* @param newEmailVerify String
|
||||
*/
|
||||
public void performAddEmail(final Player player, final String newEmail, final String newEmailVerify) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncChangeEmail(player, plugin, null, newEmail, newEmailVerify).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Method performChangeEmail.
|
||||
*
|
||||
* @param player Player
|
||||
* @param oldEmail String
|
||||
* @param newEmail String
|
||||
*/
|
||||
public void performChangeEmail(final Player player, final String oldEmail, final String newEmail) {
|
||||
sched.runTaskAsynchronously(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new AsyncChangeEmail(player, plugin, oldEmail, newEmail).process();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -29,7 +29,7 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class AsyncronousJoin {
|
||||
public class AsynchronousJoin {
|
||||
|
||||
private final AuthMe plugin;
|
||||
private final Player player;
|
||||
@@ -39,13 +39,13 @@ public class AsyncronousJoin {
|
||||
private final BukkitScheduler sched;
|
||||
|
||||
/**
|
||||
* Constructor for AsyncronousJoin.
|
||||
* Constructor for AsynchronousJoin.
|
||||
*
|
||||
* @param player Player
|
||||
* @param plugin AuthMe
|
||||
* @param database DataSource
|
||||
*/
|
||||
public AsyncronousJoin(Player player, AuthMe plugin, DataSource database) {
|
||||
public AsynchronousJoin(Player player, AuthMe plugin, DataSource database) {
|
||||
this.player = player;
|
||||
this.plugin = plugin;
|
||||
this.sched = plugin.getServer().getScheduler();
|
||||
@@ -261,10 +261,10 @@ public class AsyncronousJoin {
|
||||
private boolean needFirstSpawn() {
|
||||
if (player.hasPlayedBefore())
|
||||
return false;
|
||||
Location firstspawn = Spawn.getInstance().getFirstSpawn();
|
||||
if (firstspawn == null || firstspawn.getWorld() == null)
|
||||
Location firstSpawn = Spawn.getInstance().getFirstSpawn();
|
||||
if (firstSpawn == null || firstSpawn.getWorld() == null)
|
||||
return false;
|
||||
FirstSpawnTeleportEvent tpEvent = new FirstSpawnTeleportEvent(player, player.getLocation(), firstspawn);
|
||||
FirstSpawnTeleportEvent tpEvent = new FirstSpawnTeleportEvent(player, player.getLocation(), firstSpawn);
|
||||
plugin.getServer().getPluginManager().callEvent(tpEvent);
|
||||
if (!tpEvent.isCancelled()) {
|
||||
if (player.isOnline() && tpEvent.getTo() != null && tpEvent.getTo().getWorld() != null) {
|
||||
+4
-4
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class AsyncronousLogin {
|
||||
public class AsynchronousLogin {
|
||||
|
||||
private static RandomString rdm = new RandomString(Settings.captchaLength);
|
||||
protected Player player;
|
||||
@@ -36,7 +36,7 @@ public class AsyncronousLogin {
|
||||
private Messages m = Messages.getInstance();
|
||||
|
||||
/**
|
||||
* Constructor for AsyncronousLogin.
|
||||
* Constructor for AsynchronousLogin.
|
||||
*
|
||||
* @param player Player
|
||||
* @param password String
|
||||
@@ -44,8 +44,8 @@ public class AsyncronousLogin {
|
||||
* @param plugin AuthMe
|
||||
* @param data DataSource
|
||||
*/
|
||||
public AsyncronousLogin(Player player, String password, boolean forceLogin,
|
||||
AuthMe plugin, DataSource data) {
|
||||
public AsynchronousLogin(Player player, String password, boolean forceLogin,
|
||||
AuthMe plugin, DataSource data) {
|
||||
this.player = player;
|
||||
this.password = password;
|
||||
name = player.getName().toLowerCase();
|
||||
@@ -194,11 +194,11 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
|
||||
if (Settings.useWelcomeMessage)
|
||||
if (Settings.broadcastWelcomeMessage) {
|
||||
for (String s : Settings.welcomeMsg) {
|
||||
Bukkit.getServer().broadcastMessage(plugin.replaceAllInfos(s, player));
|
||||
Bukkit.getServer().broadcastMessage(plugin.replaceAllInfo(s, player));
|
||||
}
|
||||
} else {
|
||||
for (String s : Settings.welcomeMsg) {
|
||||
player.sendMessage(plugin.replaceAllInfos(s, player));
|
||||
player.sendMessage(plugin.replaceAllInfo(s, player));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -13,7 +13,7 @@ import org.bukkit.scheduler.BukkitScheduler;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class AsyncronousLogout {
|
||||
public class AsynchronousLogout {
|
||||
|
||||
protected Player player;
|
||||
protected String name;
|
||||
@@ -23,14 +23,14 @@ public class AsyncronousLogout {
|
||||
private Messages m = Messages.getInstance();
|
||||
|
||||
/**
|
||||
* Constructor for AsyncronousLogout.
|
||||
* Constructor for AsynchronousLogout.
|
||||
*
|
||||
* @param player Player
|
||||
* @param plugin AuthMe
|
||||
* @param database DataSource
|
||||
*/
|
||||
public AsyncronousLogout(Player player, AuthMe plugin,
|
||||
DataSource database) {
|
||||
public AsynchronousLogout(Player player, AuthMe plugin,
|
||||
DataSource database) {
|
||||
this.player = player;
|
||||
this.plugin = plugin;
|
||||
this.database = database;
|
||||
@@ -49,7 +49,7 @@ public class AsyncronousLogout {
|
||||
if (!canLogout)
|
||||
return;
|
||||
final Player p = player;
|
||||
BukkitScheduler sched = p.getServer().getScheduler();
|
||||
BukkitScheduler scheduler = p.getServer().getScheduler();
|
||||
PlayerAuth auth = PlayerCache.getInstance().getAuth(name);
|
||||
database.updateSession(auth);
|
||||
auth.setQuitLocX(p.getLocation().getX());
|
||||
@@ -60,7 +60,7 @@ public class AsyncronousLogout {
|
||||
|
||||
PlayerCache.getInstance().removePlayer(name);
|
||||
database.setUnlogged(name);
|
||||
sched.scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
scheduler.scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Utils.teleportToSpawn(p);
|
||||
@@ -71,6 +71,6 @@ public class AsyncronousLogout {
|
||||
LimboCache.getInstance().addLimboPlayer(player);
|
||||
Utils.setGroup(player, GroupType.NOTLOGGEDIN);
|
||||
|
||||
sched.scheduleSyncDelayedTask(plugin, new ProcessSyncronousPlayerLogout(p, plugin));
|
||||
scheduler.scheduleSyncDelayedTask(plugin, new ProcessSyncronousPlayerLogout(p, plugin));
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -16,7 +16,7 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class AsyncronousQuit {
|
||||
public class AsynchronousQuit {
|
||||
|
||||
protected AuthMe plugin;
|
||||
protected DataSource database;
|
||||
@@ -28,15 +28,15 @@ public class AsyncronousQuit {
|
||||
private boolean isKick = false;
|
||||
|
||||
/**
|
||||
* Constructor for AsyncronousQuit.
|
||||
* Constructor for AsynchronousQuit.
|
||||
*
|
||||
* @param p Player
|
||||
* @param plugin AuthMe
|
||||
* @param database DataSource
|
||||
* @param isKick boolean
|
||||
*/
|
||||
public AsyncronousQuit(Player p, AuthMe plugin, DataSource database,
|
||||
boolean isKick) {
|
||||
public AsynchronousQuit(Player p, AuthMe plugin, DataSource database,
|
||||
boolean isKick) {
|
||||
this.player = p;
|
||||
this.plugin = plugin;
|
||||
this.database = database;
|
||||
@@ -59,17 +59,17 @@ public class AsyncRegister {
|
||||
* @return boolean * @throws Exception
|
||||
*/
|
||||
protected boolean preRegisterCheck() throws Exception {
|
||||
String lowpass = password.toLowerCase();
|
||||
String passLow = password.toLowerCase();
|
||||
if (PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
m.send(player, "logged_in");
|
||||
return false;
|
||||
} else if (!Settings.isRegistrationEnabled) {
|
||||
m.send(player, "reg_disabled");
|
||||
return false;
|
||||
} else if (lowpass.contains("delete") || lowpass.contains("where") || lowpass.contains("insert") || lowpass.contains("modify") || lowpass.contains("from") || lowpass.contains("select") || lowpass.contains(";") || lowpass.contains("null") || !lowpass.matches(Settings.getPassRegex)) {
|
||||
} else if (passLow.contains("delete") || passLow.contains("where") || passLow.contains("insert") || passLow.contains("modify") || passLow.contains("from") || passLow.contains("select") || passLow.contains(";") || passLow.contains("null") || !passLow.matches(Settings.getPassRegex)) {
|
||||
m.send(player, "password_error");
|
||||
return false;
|
||||
} else if (lowpass.equalsIgnoreCase(player.getName())) {
|
||||
} else if (passLow.equalsIgnoreCase(player.getName())) {
|
||||
m.send(player, "password_error_nick");
|
||||
return false;
|
||||
} else if (password.length() < Settings.getPasswordMinLen || password.length() > Settings.passwordMaxLength) {
|
||||
@@ -125,8 +125,8 @@ public class AsyncRegister {
|
||||
}
|
||||
}
|
||||
PlayerAuth auth;
|
||||
final String hashnew = PasswordSecurity.getHash(Settings.getPasswordHash, password, name);
|
||||
auth = new PlayerAuth(name, hashnew, getIp(), 0, (int) player.getLocation().getX(), (int) player.getLocation().getY(), (int) player.getLocation().getZ(), player.getLocation().getWorld().getName(), email, player.getName());
|
||||
final String hashNew = PasswordSecurity.getHash(Settings.getPasswordHash, password, name);
|
||||
auth = new PlayerAuth(name, hashNew, getIp(), 0, (int) player.getLocation().getX(), (int) player.getLocation().getY(), (int) player.getLocation().getZ(), player.getLocation().getWorld().getName(), email, player.getName());
|
||||
if (PasswordSecurity.userSalt.containsKey(name)) {
|
||||
auth.setSalt(PasswordSecurity.userSalt.get(name));
|
||||
}
|
||||
@@ -134,8 +134,8 @@ public class AsyncRegister {
|
||||
database.updateEmail(auth);
|
||||
database.updateSession(auth);
|
||||
plugin.mail.main(auth, password);
|
||||
ProcessSyncEmailRegister syncronous = new ProcessSyncEmailRegister(player, plugin);
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, syncronous);
|
||||
ProcessSyncEmailRegister sync = new ProcessSyncEmailRegister(player, plugin);
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, sync);
|
||||
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class AsyncRegister {
|
||||
database.setLogged(name);
|
||||
}
|
||||
plugin.otherAccounts.addPlayer(player.getUniqueId());
|
||||
ProcessSyncronousPasswordRegister syncronous = new ProcessSyncronousPasswordRegister(player, plugin);
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, syncronous);
|
||||
ProcessSyncronousPasswordRegister sync = new ProcessSyncronousPasswordRegister(player, plugin);
|
||||
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, sync);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -139,11 +139,11 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
if (Settings.useWelcomeMessage)
|
||||
if (Settings.broadcastWelcomeMessage) {
|
||||
for (String s : Settings.welcomeMsg) {
|
||||
plugin.getServer().broadcastMessage(plugin.replaceAllInfos(s, player));
|
||||
plugin.getServer().broadcastMessage(plugin.replaceAllInfo(s, player));
|
||||
}
|
||||
} else {
|
||||
for (String s : Settings.welcomeMsg) {
|
||||
player.sendMessage(plugin.replaceAllInfos(s, player));
|
||||
player.sendMessage(plugin.replaceAllInfo(s, player));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -22,7 +22,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class AsyncronousUnregister {
|
||||
public class AsynchronousUnregister {
|
||||
|
||||
protected Player player;
|
||||
protected String name;
|
||||
@@ -33,15 +33,15 @@ public class AsyncronousUnregister {
|
||||
private JsonCache playerCache;
|
||||
|
||||
/**
|
||||
* Constructor for AsyncronousUnregister.
|
||||
* Constructor for AsynchronousUnregister.
|
||||
*
|
||||
* @param player Player
|
||||
* @param password String
|
||||
* @param force boolean
|
||||
* @param plugin AuthMe
|
||||
*/
|
||||
public AsyncronousUnregister(Player player, String password,
|
||||
boolean force, AuthMe plugin) {
|
||||
public AsynchronousUnregister(Player player, String password,
|
||||
boolean force, AuthMe plugin) {
|
||||
this.player = player;
|
||||
this.password = password;
|
||||
this.force = force;
|
||||
@@ -75,12 +75,12 @@ public class AsyncronousUnregister {
|
||||
LimboCache.getInstance().addLimboPlayer(player);
|
||||
int delay = Settings.getRegistrationTimeout * 20;
|
||||
int interval = Settings.getWarnMessageInterval;
|
||||
BukkitScheduler sched = plugin.getServer().getScheduler();
|
||||
BukkitScheduler scheduler = plugin.getServer().getScheduler();
|
||||
if (delay != 0) {
|
||||
BukkitTask id = sched.runTaskLaterAsynchronously(plugin, new TimeoutTask(plugin, name, player), delay);
|
||||
BukkitTask id = scheduler.runTaskLaterAsynchronously(plugin, new TimeoutTask(plugin, name, player), delay);
|
||||
LimboCache.getInstance().getLimboPlayer(name).setTimeoutTaskId(id);
|
||||
}
|
||||
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, m.send("reg_msg"), interval)));
|
||||
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(scheduler.runTaskAsynchronously(plugin, new MessageTask(plugin, name, m.send("reg_msg"), interval)));
|
||||
m.send(player, "unregistered");
|
||||
ConsoleLogger.info(player.getDisplayName() + " unregistered himself");
|
||||
return;
|
||||
Reference in New Issue
Block a user