List configPointKeys = bukkitConfig.getKeys("offensePointMap"); if( configPointKeys == null || configPointKeys.isEmpty() ) return pointKeyMap; for(Iterator i = configPointKeys.iterator(); i.hasNext();) { Object o = i.next(); int keyInt = -1; // shouldn't be possible since Configuration.getKeys() is supposed to return List, // but it turns out it's can/does return Integers in the list. Oops. if( o instanceof Integer ) { System.out.println("Found Integer where String was expected"); keyInt = ((Integer) o).intValue(); }