2015-10-19 17:43:46 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.commands;
|
2013-09-24 14:13:38 +00:00
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.permission.PlayerRank;
|
|
|
|
import me.totalfreedom.totalfreedommod.bridge.EssentialsBridge;
|
|
|
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
2013-09-24 14:13:38 +00:00
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
@CommandPermissions(level = PlayerRank.SUPER_ADMIN, source = SourceType.BOTH)
|
2013-09-24 14:13:38 +00:00
|
|
|
@CommandParameters(description = "Essentials Interface Command - Remove the nickname of all players on the server.", usage = "/<command>")
|
2015-10-19 17:43:46 +00:00
|
|
|
public class Command_denick extends FreedomCommand
|
2013-09-24 14:13:38 +00:00
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
|
|
{
|
2015-10-19 17:43:46 +00:00
|
|
|
FUtil.adminAction(sender.getName(), "Removing all nicknames", false);
|
2013-09-24 14:13:38 +00:00
|
|
|
|
2014-05-05 14:10:14 +00:00
|
|
|
for (Player player : server.getOnlinePlayers())
|
2013-09-24 14:13:38 +00:00
|
|
|
{
|
2015-10-19 17:43:46 +00:00
|
|
|
plugin.esb.setNickname(player.getName(), null);
|
2013-09-24 14:13:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|