2015-10-19 17:43:46 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.commands;
|
2013-08-12 19:35:59 +00:00
|
|
|
|
2015-11-15 23:32:04 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.rank.PlayerRank;
|
2014-11-29 19:16:00 +00:00
|
|
|
import org.apache.commons.lang3.StringUtils;
|
2013-08-12 19:35:59 +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-08-12 19:35:59 +00:00
|
|
|
@CommandParameters(description = "Shows all IPs registered to a player", usage = "/<command> <player>")
|
2015-10-19 17:43:46 +00:00
|
|
|
public class Command_findip extends FreedomCommand
|
2013-08-12 19:35:59 +00:00
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
|
|
{
|
|
|
|
if (args.length != 1)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2013-08-13 01:33:21 +00:00
|
|
|
|
2014-04-26 11:55:24 +00:00
|
|
|
final Player player = getPlayer(args[0]);
|
|
|
|
|
|
|
|
if (player == null)
|
2013-08-12 19:35:59 +00:00
|
|
|
{
|
2014-04-26 11:55:24 +00:00
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
playerMsg(FreedomCommand.PLAYER_NOT_FOUND);
|
2013-08-12 19:35:59 +00:00
|
|
|
return true;
|
|
|
|
}
|
2013-08-13 01:33:21 +00:00
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
playerMsg("Player IPs: " + StringUtils.join(plugin.pl.getData(player).getIps(), ", "));
|
2013-08-12 19:35:59 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|