Interface StatsAPI<P>


public interface StatsAPI<P>
Generic stats API exposed to modules.
  • Method Details

    • registerGlobalStat

      void registerGlobalStat(StatDefinition definition)
    • registerModuleStat

      void registerModuleStat(String moduleId, StatDefinition definition)
    • getGlobalStat

      int getGlobalStat(P player, String key)
    • getModuleStat

      int getModuleStat(P player, String moduleId, String key)
    • addGlobalStat

      void addGlobalStat(P player, String key, int delta)
    • addModuleStat

      void addModuleStat(P player, String moduleId, String key, int delta)
    • consumeSessionDeltas

      Map<String,Integer> consumeSessionDeltas(P player, String moduleId)
      Get and clear the session deltas accumulated for the player during the last game.