mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 20:57:35 +01:00
Add forcelogin command
This commit is contained in:
parent
1668cd191b
commit
52c023b1f2
@ -73,6 +73,7 @@ public class AdminCommand implements CommandExecutor {
|
||||
sender.sendMessage("/authme getemail <playername> - Get player email");
|
||||
sender.sendMessage("/authme purgelastpos <playername> - Purge last position for a player");
|
||||
sender.sendMessage("/authme switchantibot on/off - Enable/Disable antibot method");
|
||||
sender.sendMessage("/authme forcelogin <playername>");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -552,6 +553,22 @@ public class AdminCommand implements CommandExecutor {
|
||||
database.updateQuitLoc(auth);
|
||||
sender.sendMessage("[AuthMe] Successfully reset position for " + auth.getNickname());
|
||||
return true;
|
||||
} else if (args[0].equalsIgnoreCase("forcelogin")) {
|
||||
if (args.length < 2) {
|
||||
sender.sendMessage("Usage : /authme forcelogin <playerName>");
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
Player player = Bukkit.getPlayer(args[1]);
|
||||
if (player == null || !player.isOnline()) {
|
||||
sender.sendMessage("Online player only !");
|
||||
return true;
|
||||
}
|
||||
plugin.management.performLogin(player, "dontneed", true);
|
||||
sender.sendMessage("Force Login performed !");
|
||||
} catch (Exception e) {
|
||||
sender.sendMessage("An error occured while trying to get that player!");
|
||||
}
|
||||
} else {
|
||||
sender.sendMessage("Usage: /authme reload|register playername password|changepassword playername password|unregister playername");
|
||||
}
|
||||
|
@ -69,6 +69,7 @@ permissions:
|
||||
authme.admin.getip: true
|
||||
authme.admin.converter: true
|
||||
authme.admin.resetposition: true
|
||||
authme.admin.forcelogin: true
|
||||
authme.register:
|
||||
description: Register an account
|
||||
default: true
|
||||
@ -165,3 +166,6 @@ permissions:
|
||||
authme.admin.resetposition:
|
||||
description: Reset last position for a player
|
||||
default: op
|
||||
authme.admin.forcelogin:
|
||||
description: Force login for that player
|
||||
default: op
|
Loading…
Reference in New Issue
Block a user