LibGDX ClassCastException

Hi, really quick and hopefully simple question here. I want to load in the map properties for this .tmx file I have, and I’m doing it like this:


playerSpawn = new Vector2(getLevel().getProperties().get("player spawn x", Float.class), (float)getLevel().getProperties().get("player spawn y", Float.class));

This is causing a ClassCastException, “java.lang.String cannot be cast to java.lang.Float”

Why would it throw a ClassCastException when I’m specifying that it’s a float? And which part of it is a string? I thought TiledMap.getProperties().get returns an Object?

Any ideas?