Player player=(Player) send;
if(BBPermissions.info(player)) {
if (split.length == 4 && Numbers.isNumber(split[1]) && Numbers.isNumber(split[2]) && Numbers.isNumber(split[3])) {
World currentWorld = player.getWorld();
Location loc = new Location(currentWorld, Double.parseDouble(split[1]), Double.parseDouble(split[2]), Double.parseDouble(split[3]));
Finder finder = new Finder(loc, plugin.getServer().getWorlds(), plugin.worldManager, plugin);
finder.addReciever(player);
finder.find();
} else if (split.length == 5 && Numbers.isNumber(split[1]) && Numbers.isNumber(split[2]) && Numbers.isNumber(split[3]) && Numbers.isNumber(split[4])) {
World currentWorld = player.getWorld();
Location loc = new Location(currentWorld, Double.parseDouble(split[1]), Double.parseDouble(split[2]), Double.parseDouble(split[3]));
Finder finder = new Finder(loc, plugin.getServer().getWorlds(), plugin.worldManager, plugin);
finder.setRadius(Double.parseDouble(split[4]));
finder.addReciever(player);
finder.find();
} else if (split.length == 5 && Numbers.isNumber(split[1]) && Numbers.isNumber(split[2]) && Numbers.isNumber(split[3])) {
World currentWorld = player.getWorld();
Location loc = new Location(currentWorld, Double.parseDouble(split[1]), Double.parseDouble(split[2]), Double.parseDouble(split[3]));
Finder finder = new Finder(loc, plugin.getServer().getWorlds(), plugin.worldManager, plugin);
finder.addReciever(player);
List<Player> targets = plugin.getServer().matchPlayer(split[4]);
Player findee = null;
if (targets.size() == 1) {
findee = targets.get(0);
}
finder.find((findee == null) ? split[4] : findee.getName());
} else if (split.length == 6 && Numbers.isNumber(split[1]) && Numbers.isNumber(split[2]) && Numbers.isNumber(split[3]) && Numbers.isNumber(split[5])) {
World currentWorld = player.getWorld();
Location loc = new Location(currentWorld, Double.parseDouble(split[1]), Double.parseDouble(split[2]), Double.parseDouble(split[3]));
Finder finder = new Finder(loc, plugin.getServer().getWorlds(), plugin.worldManager, plugin);
finder.setRadius(Double.parseDouble(split[5]));
finder.addReciever(player);
List<Player> targets = plugin.getServer().matchPlayer(split[4]);
Player findee = null;
if (targets.size() == 1) {
findee = targets.get(0);
}
finder.find((findee == null) ? split[4] : findee.getName());
} else {
player.sendMessage(BigBrother.premessage + "usage is " + ChatColor.RED + "/bb find <x> <y> <z>");
player.sendMessage("or " + ChatColor.RED + "/bb find <x> <y> <z> <radius>");
player.sendMessage("or " + ChatColor.RED + "/bb find <x> <y> <z> <name>");
player.sendMessage("or " + ChatColor.RED + "/bb find <x> <y> <z> <name> <radius>");