skadistats / clarity-examples

Example code for clarity
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

Question: connect/disconnect logs #29

Closed ErkoKnoll closed 8 years ago

ErkoKnoll commented 8 years ago

Hi,

Could you point me to right direction here how to get player connection/reconnection and disconnection logs. If there is not a built in event for listening those maybe you happen to know protobuf message class name(s) that is handling those events?

spheenik commented 8 years ago

Hmm, I do not know exactly. I suspect it might be a certain GameEvent. I am almost sure there is no dedicated protobuf-message for this.

You can get a list of all possible game events like this:

public class DumpGameEvents {
   @OnGameEventDescriptor
    public void onGameEventDescriptor(Context ctx, GameEventDescriptor descriptor) {
        System.out.println(descriptor);
    }
    public static void main(String[] args) throws Exception {
        new SimpleRunner(new MappedFileSource(args[0])).runWith(new DumpGameEvents());
    }
}
ErkoKnoll commented 8 years ago

Thank, I'll try to filter through those event.

spheenik commented 8 years ago

Sure, and if you do not find it, reopen :)