How to sort list of objects? : <p>I have a list of objects, each object has a method that returns distance from player to said object like that</p>

<pre><code>object.distance(player)
</code></pre>

<p>now i need to sort that list from loqwest distance to furthest</p>
