コード例 #1
0
 public void b(MojangStatisticsGenerator mojangstatisticsgenerator) {
   mojangstatisticsgenerator.b("singleplayer", Boolean.valueOf(this.S()));
   mojangstatisticsgenerator.b("server_brand", this.getServerModName());
   mojangstatisticsgenerator.b(
       "gui_supported", GraphicsEnvironment.isHeadless() ? "headless" : "supported");
   mojangstatisticsgenerator.b("dedicated", Boolean.valueOf(this.ad()));
 }
コード例 #2
0
  public void a(MojangStatisticsGenerator mojangstatisticsgenerator) {
    mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(false));
    mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(0));
    if (this.v != null) {
      mojangstatisticsgenerator.a("players_current", Integer.valueOf(this.G()));
      mojangstatisticsgenerator.a("players_max", Integer.valueOf(this.H()));
      mojangstatisticsgenerator.a("players_seen", Integer.valueOf(this.v.getSeenPlayers().length));
    }

    mojangstatisticsgenerator.a("uses_auth", Boolean.valueOf(this.onlineMode));
    mojangstatisticsgenerator.a("gui_state", this.aq() ? "enabled" : "disabled");
    mojangstatisticsgenerator.a(
        "run_time", Long.valueOf((ax() - mojangstatisticsgenerator.g()) / 60L * 1000L));
    mojangstatisticsgenerator.a(
        "avg_tick_ms", Integer.valueOf((int) (MathHelper.a(this.g) * 1.0E-6D)));
    int i = 0;

    if (this.worldServer != null) {
      // CraftBukkit start
      for (int j = 0; j < this.worlds.size(); ++j) {
        WorldServer worldserver = this.worlds.get(j);
        if (worldserver != null) {
          // CraftBukkit end
          WorldData worlddata = worldserver.getWorldData();

          mojangstatisticsgenerator.a(
              "world[" + i + "][dimension]",
              Integer.valueOf(worldserver.worldProvider.getDimension()));
          mojangstatisticsgenerator.a("world[" + i + "][mode]", worlddata.getGameType());
          mojangstatisticsgenerator.a("world[" + i + "][difficulty]", worldserver.getDifficulty());
          mojangstatisticsgenerator.a(
              "world[" + i + "][hardcore]", Boolean.valueOf(worlddata.isHardcore()));
          mojangstatisticsgenerator.a(
              "world[" + i + "][generator_name]", worlddata.getType().name());
          mojangstatisticsgenerator.a(
              "world[" + i + "][generator_version]",
              Integer.valueOf(worlddata.getType().getVersion()));
          mojangstatisticsgenerator.a("world[" + i + "][height]", Integer.valueOf(this.F));
          mojangstatisticsgenerator.a(
              "world[" + i + "][chunks_loaded]",
              Integer.valueOf(worldserver.N().getLoadedChunks()));
          ++i;
        }
      }
    }

    mojangstatisticsgenerator.a("worlds", Integer.valueOf(i));
  }
コード例 #3
0
 public void a(MojangStatisticsGenerator mojangstatisticsgenerator) {
   mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.aC().getHasWhitelist()));
   mojangstatisticsgenerator.a(
       "whitelist_count", Integer.valueOf(this.aC().getWhitelisted().length));
   super.a(mojangstatisticsgenerator);
 }