Ejemplo n.º 1
0
 public void addServerTypeToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper) {
   par1PlayerUsageSnooper.addData("singleplayer", Boolean.valueOf(this.isSinglePlayer()));
   par1PlayerUsageSnooper.addData("server_brand", this.getServerModName());
   par1PlayerUsageSnooper.addData(
       "gui_supported", GraphicsEnvironment.isHeadless() ? "headless" : "supported");
   par1PlayerUsageSnooper.addData("dedicated", Boolean.valueOf(this.isDedicatedServer()));
 }
 public void addServerStatsToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper) {
   super.addServerStatsToSnooper(par1PlayerUsageSnooper);
   par1PlayerUsageSnooper.addData(
       "snooper_partner", this.mc.getPlayerUsageSnooper().getUniqueID());
 }
Ejemplo n.º 3
0
  public void addServerStatsToSnooper(PlayerUsageSnooper par1PlayerUsageSnooper) {
    par1PlayerUsageSnooper.addData("whitelist_enabled", Boolean.valueOf(false));
    par1PlayerUsageSnooper.addData("whitelist_count", Integer.valueOf(0));
    par1PlayerUsageSnooper.addData(
        "players_current", Integer.valueOf(this.getCurrentPlayerCount()));
    par1PlayerUsageSnooper.addData("players_max", Integer.valueOf(this.getMaxPlayers()));
    par1PlayerUsageSnooper.addData(
        "players_seen", Integer.valueOf(this.serverConfigManager.getAvailablePlayerDat().length));
    par1PlayerUsageSnooper.addData("uses_auth", Boolean.valueOf(this.onlineMode));
    par1PlayerUsageSnooper.addData("gui_state", this.getGuiEnabled() ? "enabled" : "disabled");
    par1PlayerUsageSnooper.addData(
        "avg_tick_ms", Integer.valueOf((int) (MathHelper.average(this.tickTimeArray) * 1.0E-6D)));
    par1PlayerUsageSnooper.addData(
        "avg_sent_packet_count",
        Integer.valueOf((int) MathHelper.average(this.sentPacketCountArray)));
    par1PlayerUsageSnooper.addData(
        "avg_sent_packet_size",
        Integer.valueOf((int) MathHelper.average(this.sentPacketSizeArray)));
    par1PlayerUsageSnooper.addData(
        "avg_rec_packet_count",
        Integer.valueOf((int) MathHelper.average(this.receivedPacketCountArray)));
    par1PlayerUsageSnooper.addData(
        "avg_rec_packet_size",
        Integer.valueOf((int) MathHelper.average(this.receivedPacketSizeArray)));
    int i = 0;

    for (int j = 0; j < this.worldServers.length; ++j) {
      if (this.worldServers[j] != null) {
        WorldServer worldserver = this.worldServers[j];
        WorldInfo worldinfo = worldserver.getWorldInfo();
        par1PlayerUsageSnooper.addData(
            "world[" + i + "][dimension]", Integer.valueOf(worldserver.provider.dimensionId));
        par1PlayerUsageSnooper.addData("world[" + i + "][mode]", worldinfo.getGameType());
        par1PlayerUsageSnooper.addData(
            "world[" + i + "][difficulty]", Integer.valueOf(worldserver.difficultySetting));
        par1PlayerUsageSnooper.addData(
            "world[" + i + "][hardcore]", Boolean.valueOf(worldinfo.isHardcoreModeEnabled()));
        par1PlayerUsageSnooper.addData(
            "world[" + i + "][generator_name]", worldinfo.getTerrainType().getWorldTypeName());
        par1PlayerUsageSnooper.addData(
            "world[" + i + "][generator_version]",
            Integer.valueOf(worldinfo.getTerrainType().getGeneratorVersion()));
        par1PlayerUsageSnooper.addData(
            "world[" + i + "][height]", Integer.valueOf(this.buildLimit));
        par1PlayerUsageSnooper.addData(
            "world[" + i + "][chunks_loaded]",
            Integer.valueOf(worldserver.getChunkProvider().getLoadedChunkCount()));
        ++i;
      }
    }

    par1PlayerUsageSnooper.addData("worlds", Integer.valueOf(i));
  }