@ SuppressWarnings ( "unchecked" ) public static List < EntityPlayerMP > getPlayersWatchingChunk ( WorldServer world , int x , int z ) { if ( playersWatchingChunk == null ) return new ArrayList <> ( ) ; try { PlayerChunkMapEntry entry = world . getPlayerChunkMap ( ) . getEntry ( x , z ) ; if ( entry == null ) return Lists . newArrayList ( ) ; return ( List < EntityPlayerMP > ) playersWatchingChunk . get ( entry ) ; } catch ( ReflectiveOperationException e ) { MalisisCore . log . info ( "Failed to get players watching chunk :" , e ) ; return new ArrayList <> ( ) ; } }
Gets the list of players currently watching the chunk at the coordinate .