Now I only need someone to add banning and IP banning to this plugin. I will give source code. http://pastebin.com/rTZfaAF3 Commands: /ban <player> <reason> /banip <ip> /unban <player> /unbanip <ip> Permissions: findip.ban - Allows to ban findip.banip - Allows to IP ban findip.unban - Allows to unban findip.unbanip - Allows to unban IP Plugin category: ADMIN Suggested name: FindIP What I want: I want a simple lightweight plugin that gets a player's IP. That's it. I don't want to use any other plugins because they're out of date or just offer way more than what I need. Ideas for commands: /ip <player> : Gets player's IP. Ideas for permissions: findip.get : Allows to get a player's IP. When I'd like it by: Today or tomorrow, please.
Something close :3 http://forums.bukkit.org/threads/admn-gen-info-fun-playerinfo-v2-0-gives-you-the-who-what-and-where-of-players-1-2-3-r0-2.62611/
Built into Ultrabans. /checkip {playername} - Pulls all gathered information from the ip and host name, and includes a 18000ms pingback to check for proxy.
The plugins you guys referenced has features all my other plugins have. All I want is to find the IP. xP lol768 I try to make the plugins first, then I request them. xP Shows how much I suck, right? xD Haha! That was fast! EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Thanks! Edit: New version (http://www.filedropper.com/fip_1) allows console to use command. Don't know if you need this. I usually post the source: PHP: public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, final String[] args) { if(cmd.getName().equalsIgnoreCase("ip")) { if (sender.hasPermission("findip.get")) { if (args.length == 1) { try { Player p = Bukkit.getPlayer(args[0]); sender.sendMessage(p.getName() + " has an IP of " + p.getAddress().getAddress().getHostAddress()); } catch (Exception e) { sender.sendMessage("No such user"); } } else { if (sender instanceof Player) { Player p = (Player) sender; sender.sendMessage(p.getName() + " has an IP of " + p.getAddress().getAddress().getHostAddress()); } else { sender.sendMessage("Unsupported command sender"); } } } else { sender.sendMessage("You need permission: findip.get"); } } return true; }
lol768 That's basically what I had. I just didn't know how to do the args and p.getAddress().getAddress().getHostAddress().
Thanks! And if you don't mind, I took the code, edited some spelling errors, customized messages, and added color to them. I didn't specify it, but I just thought of it. So yeah, I helped make your plugin better! xP I can send it to you and you could maybe post it on BukkitDev. There aren't any lightweight IP plugins, so yours could be a hit!
Sounds great! I've got a new keyboard and the keys are really close which leads to a load of typos (I keep doing lol678), so I'm not really surprised at the spelling errors . Anyway, that sounds awesome, if you want to PM the source I (or you, or someone) can add it to BukkitDev. You ok on using an open-source license? Most of my stuff is. Thanks for the idea, and for making my plugin better
would it be ok if i take and use this plugin or is it for the dude who requested it only? also Reptar_ if you wouldnt mind could i use your updated version? thanks
All of my plugins are free to use Credit is appreciated. Please credit Reptar_ for the modifications and idea as well
i'm not sure what the original one did but this one has the following: - when you try it on yourself you get your internal ip - when you use the command (/ip <player>) it Get's player's IP. - the permission is findip.get - when you use the command it returns in the format (<name> + s + chatcolor.gold + IP is + <ip> i think that is about it.
very hand and has the one feature i need/want as opposed to a million useless features i wouldn't use ones so i hope it goes up haha.
I will put the source code up and you can pull directly from there. Here's the Pastebin: http://pastebin.com/rTZfaAF3 Code will also be below. Code: package me.Reptar.FindIP; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; public class FindIP extends JavaPlugin { public static FindIP plugin; @Override public void onEnable() { System.out.println("[FindIP] Enabled!"); } @Override public void onDisable() { System.out.println("[FindIP] Disabled!"); } public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { if(commandLabel.equalsIgnoreCase("ip")){ if(sender.hasPermission("findip.get")){ if(args.length ==1){ try{ Player p = Bukkit.getPlayer(args[0]); sender.sendMessage(p.getName() + "'s" + ChatColor.GOLD + " IP is: " + p.getAddress().getAddress().getHostAddress()); }catch (Exception e){ sender.sendMessage(ChatColor.RED + "Player does not exist!"); } }else{ if(sender instanceof Player) { Player p = (Player) sender; sender.sendMessage(p.getName() + "'s" + ChatColor.GOLD + "IP is: " + p.getAddress().getAddress().getHostAddress()); }else{ sender.sendMessage(ChatColor.RED + "Unsupported Command Sender!"); } } }else{ sender.sendMessage(ChatColor.RED + "You don't have permission!"); } } return true; } } EDIT by Moderator: merged posts, please use the edit button instead of double posting.
If you post that request on the BukkitDev page, I can add support to store a list of past IPs in a file. Reptar_ Thanks, I'm just adding the project now. BukkitDev Project: http://dev.bukkit.org/server-mods/findip/ EDIT by Moderator: merged posts, please use the edit button instead of double posting.