Start working on #687

Next step: Future return of the async registration
This commit is contained in:
Gabriele C
2016-05-04 18:01:47 +02:00
parent 552ecb5d8e
commit 1ea2f98727
5 changed files with 27 additions and 13 deletions
+15 -3
View File
@@ -148,10 +148,11 @@ public class NewAPI {
}
/**
* Register a player with the given password.
* Register an OFFLINE/ONLINE player with the given password.
*
* @param playerName The player to register
* @param password The password to register the player with
*
* @return true if the player was registered successfully
*/
public boolean registerPlayer(String playerName, String password) {
@@ -187,13 +188,24 @@ public class NewAPI {
}
/**
* Register a player with the given password.
* Force an ONLINE player to register.
*
* @param player The player to register
* @param password The password to use
* @param autoLogin Should the player be authenticated automatically after the registration?
*/
public void forceRegister(Player player, String password, boolean autoLogin) {
plugin.getManagement().performRegister(player, password, null, autoLogin);
}
/**
* Register an ONLINE player with the given password.
*
* @param player The player to register
* @param password The password to use
*/
public void forceRegister(Player player, String password) {
plugin.getManagement().performRegister(player, password, null);
forceRegister(player, password, true);
}
/**