Package me.taylorkelly.bigbrother.finder

Examples of me.taylorkelly.bigbrother.finder.Finder$FinderRunner


        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>");
View Full Code Here


    @Override
    public boolean onCommand(CommandSender send, Command arg1, String arg2, String[] split) {
        Player player = (Player) send;
        if (BBPermissions.info(player)) {
            if (split.length == 1) {
                Finder finder = new Finder(player.getLocation(), plugin.getServer().getWorlds(), plugin.worldManager, plugin);
                finder.addReciever(player);
                finder.find();
            } else if (Numbers.isNumber(split[1]) && split.length == 2) {
                Finder finder = new Finder(player.getLocation(), plugin.getServer().getWorlds(), plugin.worldManager, plugin);
                finder.setRadius(Double.parseDouble(split[1]));
                finder.addReciever(player);
                finder.find();
            } else if (split.length == 2) {
                Finder finder = new Finder(player.getLocation(), plugin.getServer().getWorlds(), plugin.worldManager, plugin);
                finder.addReciever(player);
                List<Player> targets = plugin.getServer().matchPlayer(split[1]);
                Player findee = null;
                if (targets.size() == 1) {
                    findee = targets.get(0);
                }
                finder.find((findee == null) ? split[1] : findee.getName());
            } else if (Numbers.isNumber(split[2]) && split.length == 3) {
                Finder finder = new Finder(player.getLocation(), plugin.getServer().getWorlds(), plugin.worldManager, plugin);
                finder.setRadius(Double.parseDouble(split[2]));
                finder.addReciever(player);
                List<Player> targets = plugin.getServer().matchPlayer(split[1]);
                Player findee = null;
                if (targets.size() == 1) {
                    findee = targets.get(0);
                }
                finder.find((findee == null) ? split[1] : findee.getName());
            } else {
                player.sendMessage(BigBrother.premessage + "usage is " + ChatColor.RED + "/bb here");
                player.sendMessage("or " + ChatColor.RED + "/bb here <radius>");
                player.sendMessage("or " + ChatColor.RED + "/bb here <name>");
                player.sendMessage("or " + ChatColor.RED + "/bb here <name> <radius>");
View Full Code Here

TOP

Related Classes of me.taylorkelly.bigbrother.finder.Finder$FinderRunner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.