public static String getName(final Entity e) {
		if (e == null)
			return null;
		if (e instanceof org.powerbot.game.api.wrappers.interactive.Character) {
			return ((org.powerbot.game.api.wrappers.interactive.Character) e).getName();
		} else if (e instanceof GroundItem) {
			Item it = ((GroundItem) e).getGroundItem();
			return (it == null ? null : it.getName());
		} else if (e instanceof SceneObject) {
			try {
				String n = ((SceneObject) e).getDefinition().getName();
				return n;
			} catch (Throwable t) {
				return null;
			}
		} else {
			return null;
		}
	}