[Pogamut-list] players.getNearestVisiblePlayer() throws null

jakub.gemrot pogamut-forum at diana.ms.mff.cuni.cz
Sat Oct 29 10:13:16 CEST 2011


Re: players.getNearestVisiblePlayer() throws null

Author: jakub.gemrot

Hi!

Thanks for reporting going to check it out...

This is the code

public Player getNearestVisiblePlayer() {		
        return DistanceUtils.getNearest(players.visible.values(), lastSelf.getLocation());
}


It can (should) only throw NPE iff lastSelf is null - which is in the case you call it before first logic() is invoked.

Can you provide full stacktrace for the NPE?

Best,
Jakub

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=849&post_reply=1#form>





More information about the Pogamut-list mailing list