2016-03-02 19:28:01 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.command;
|
2013-08-12 19:35:59 +00:00
|
|
|
|
2016-03-06 15:56:15 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
2019-07-31 16:19:23 +00:00
|
|
|
import org.apache.commons.lang.StringUtils;
|
2013-08-12 19:35:59 +00:00
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2016-03-06 15:56:15 +00:00
|
|
|
@CommandPermissions(level = Rank.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
|
|
|
{
|
2015-11-22 18:26:47 +00:00
|
|
|
|
2013-08-12 19:35:59 +00:00
|
|
|
@Override
|
2015-11-22 18:26:47 +00:00
|
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
2013-08-12 19:35:59 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
|
2016-03-02 19:28:01 +00:00
|
|
|
msg(FreedomCommand.PLAYER_NOT_FOUND);
|
2013-08-12 19:35:59 +00:00
|
|
|
return true;
|
|
|
|
}
|
2013-08-13 01:33:21 +00:00
|
|
|
|
2016-03-02 19:28:01 +00:00
|
|
|
msg("Player IPs: " + StringUtils.join(plugin.pl.getData(player).getIps(), ", "));
|
2013-08-12 19:35:59 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|