private void populateItems(String mapName) throws FileNotFoundException, IllegalArgumentException
	{
		items = new ArrayList<Placeable>();
		Scanner scanner = new Scanner(new File(mapName));
		pane.setStyle("-fx-background-image: url('" + scanner.nextLine() + ".png')"); //get background url
		while(scanner.hasNextLine())
		{
			String input = scanner.nextLine();
			int i = input.indexOf(",");
			String className = input.substring(0, i); //get class name
			String[] tArgs = input.substring(i + 1).split(","); //get arguments besides map
			Object[] args = new Object[tArgs.length + 1]; //new array for all arguments
			args[0] = this; //assign map
			for(int x = 1, y = 0; x < args.length; i++, y++)
			{
				if(y < 4)
					args[x] = Integer.parseInt(tArgs[y]); //parse first four to ints
				else
					args[x] = tArgs[y]; //the rest are strings, handled by the constructor
			}
			Class<?>[] types = new Class[args.length]; //set parameter type array
			types[0] = Map.class;
			types[1] = Integer.TYPE;
			types[2] = Integer.TYPE;
			types[3] = Integer.TYPE;
			types[4] = Integer.TYPE;
			for(int x = 5; x < args.length; x++)
			{
				types[x] = String.class;
			}
			try
			{
				addItem((Placeable) Class.forName(className).getConstructor(types).newInstance(args));
			}
			catch (Exception e)
			{
				scanner.close();
				throw new IllegalArgumentException("Bad map file");
			}
		}
		scanner.close();
	}