[FEATURES] Ability to remove completly an user from config file
Xefir opened this issue · 0 comments
Hello
A missing feature of your great plugins, and of ALL permissions plugin as i know is the ability to delete the user from the config file, to return the player to the default location, like other new player on the server.
I already coded this on PermissionsBukkit, but never got time to post this.
Here is the sample of code with my own modification of PermissionsBukkit :
else if (subcommand.equals("remove")) {
if (!checkPerm(sender, "player.remove")) return true;
if (split.length != 3) return usage(sender, command, "player remove");
String player = split[2].toLowerCase();
if (plugin.getNode("users." + player) == null) {
sender.sendMessage(ChatColor.GREEN + "Player " + ChatColor.WHITE + player + ChatColor.GREEN + " was not in config file.");
return true;
}
plugin.getNode("users").removeProperty(player);
plugin.refreshPermissions();
sender.sendMessage(ChatColor.GREEN + "Player " + ChatColor.WHITE + player + ChatColor.GREEN + " is no longer in config file.");
return true;
}
If i have time, I adapt my code to your plugin (i post here where it'll done).
If you want go head, your free to do so ^^
Thank you again.
Regards,
Xéfir Destiny