@Command(command = "sethome",
		arguments = {"target player[s]", "home name"},
		description = "sets target player[s] home[s] to your current location",
		permissions = {"set.other"},
		playerOnly = true)
	public static boolean setHome(CommandSender sender, String targetPlayer, String homeName) throws EssentialsCommandException {
		// get our player
		Player player = (Player)sender;
		
		// try to get our targetPlayer
		targetPlayer = PlayerSelector.selectSinglePlayer(targetPlayer).getName();
		
		// first, determine if our home already exists
		// and count home many homes we have
		// get a resultset of all our kits
		ArrayList<HashMap<String, Object>> results = DatabaseManager.accessQuery("select * from homes where owner=?;", targetPlayer);
		int currentNumberOfHomes = results.size();
		boolean exists = false;
		for(int i = 0; i < results.size(); i++) {
			if(((String)results.get(i).get("name")).equals(homeName)) {
				exists = true;
				break;
			}
		}
		
		// change what we do based on whether it exists or not
		if(exists) {
			// set our home
			int insertionResults = DatabaseManager.updateQuery(
					"updates homes set world=?, x=?, y=?, z=? where owner=? and homeName=?;",
					player.getWorld().getName(),
					player.getLocation().getBlockX(),
					player.getLocation().getBlockY(),
					player.getLocation().getBlockZ(),
					targetPlayer,
					homeName);
			
			// make sure it worked!
			if(insertionResults == 0) {
				throw new EssentialsCommandException("Failed to set your home!");
			}
			
			ColourHandler.sendMessage(sender, "&a%s's home '%s' has been set!", targetPlayer, homeName);
		}
		else {
			// insert, but only if we don't have too many homes already
			if(currentNumberOfHomes >= maxHomes) {
				ColourHandler.sendMessage(sender, "&6%s already has too many homes!", targetPlayer);
				return true;
			}
			
			// set our home
			int insertionResults = DatabaseManager.updateQuery(
					"insert into homes (id, owner, name, world, x, y, z) values (NULL, ?, ?, ?, ?, ?, ?);",
					targetPlayer,
					homeName,
					player.getWorld().getName(),
					player.getLocation().getBlockX(),
					player.getLocation().getBlockY(),
					player.getLocation().getBlockZ());
			
			// make sure it worked!
			if(insertionResults == 0) {
				throw new EssentialsCommandException("Failed to set your home!");
			}
			
			ColourHandler.sendMessage(sender, "&a%s's home '%s' has been set!", targetPlayer, homeName);
		}
		
		return true;
	}