TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/command/Command_findip.java

36 lines
1.0 KiB
Java
Raw Normal View History

package me.totalfreedom.totalfreedommod.command;
2013-08-12 19:35:59 +00:00
import me.totalfreedom.totalfreedommod.rank.Rank;
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;
2020-08-15 22:42:46 +00:00
@CommandPermissions(level = Rank.TRIAL_MOD, source = SourceType.BOTH)
@CommandParameters(description = "Shows all IPs registered to a player", usage = "/<command> <player>", aliases = "showip,listip")
public class Command_findip extends FreedomCommand
2013-08-12 19:35:59 +00:00
{
2013-08-12 19:35:59 +00:00
@Override
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
final Player player = getPlayer(args[0]);
if (player == null)
2013-08-12 19:35:59 +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
msg("Player IPs: " + StringUtils.join(plugin.pl.getData(player).getIps(), ", "));
2013-08-12 19:35:59 +00:00
return true;
}
}