Removed Passpartu feature
This commit is contained in:
@@ -15,7 +15,6 @@ import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
@@ -71,7 +70,6 @@ public class AdminCommand implements CommandExecutor {
|
||||
sender.sendMessage("/authme firstspawn - Teleport yourself to the first spawn point");
|
||||
sender.sendMessage("/authme switchantibot on/off - Enable/Disable AntiBot feature");
|
||||
sender.sendMessage("/authme forcelogin <playername> - Enforce the login of a connected player");
|
||||
sender.sendMessage("/authme passpartutoken - Generate a timed token to login with every player's account (CONSOLE ONLY)");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -80,19 +78,6 @@ public class AdminCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((sender instanceof ConsoleCommandSender) && args[0].equalsIgnoreCase("passpartutoken")) {
|
||||
if (args.length > 1) {
|
||||
ConsoleLogger.info("[AuthMe] command usage: /authme passpartutoken");
|
||||
return true;
|
||||
}
|
||||
if (Utils.getInstance().obtainToken()) {
|
||||
ConsoleLogger.info("[AuthMe] You have 30s to insert this token ingame with /passpartu <token>");
|
||||
} else {
|
||||
ConsoleLogger.info("[AuthMe] Security error on passpartu token, please redo the command.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("version")) {
|
||||
sender.sendMessage("AuthMe Version: " + AuthMe.getInstance().getDescription().getVersion());
|
||||
return true;
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
package fr.xephi.authme.commands;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.Utils;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.settings.Messages;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author stefano
|
||||
*/
|
||||
public class PasspartuCommand implements CommandExecutor {
|
||||
|
||||
private Utils utils = Utils.getInstance();
|
||||
public AuthMe plugin;
|
||||
private Messages m = Messages.getInstance();
|
||||
|
||||
public PasspartuCommand(AuthMe plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmnd, String label,
|
||||
String[] args) {
|
||||
|
||||
if (!plugin.authmePermissible(sender, "authme." + label.toLowerCase())) {
|
||||
m.send(sender, "no_perm");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (PlayerCache.getInstance().isAuthenticated(sender.getName().toLowerCase())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((sender instanceof Player) && args.length == 1) {
|
||||
if (utils.readToken(args[0])) {
|
||||
// bypass login!
|
||||
plugin.management.performLogin((Player) sender, "dontneed", true);
|
||||
return true;
|
||||
}
|
||||
sender.sendMessage("Time is expired or Token is Wrong!");
|
||||
return true;
|
||||
}
|
||||
sender.sendMessage("usage: /passpartu token");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user