koraktor/steam-condenser — Issue #147: [java] getSteamId() always returns null?
Author: possibly
Created: 2012-02-08 04:38:06+00:00
State: open

Hey, looking for help and this seems like a good place. Im cycling through the hashmap of server.getPlayers() and asking every player getSteamId() and printing getSteamId() out. For some reason the steamid is always returned as null for all players however getPing() or getId() return the proper values.

My code:
public static void main(String[] args) throws Exception{
SourceServer server = new SourceServer("74.91.112.232", 27015);
server.initialize();
Iterator it = server.getPlayers().entrySet().iterator();

while (it.hasNext()) {
Map.Entry pairs = (Map.Entry)it.next();
System.out.println(((SteamPlayer)pairs.getValue()).getSteamId());
it.remove();
}
}

output:
Feb 7, 2012 8:35:54 PM com.github.koraktor.steamcondenser.steam.sockets.SourceSocket getReply
INFO: Received reply of type "S2A_PLAYER_Packet" //many messages like this one and above, edited to save space.
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null