コード例 #1
0
  public StatisticsFile getPlayerStatsFile(EntityPlayer playerIn) {
    UUID var2 = playerIn.getUniqueID();
    StatisticsFile var3 = var2 == null ? null : (StatisticsFile) this.playerStatFiles.get(var2);

    if (var3 == null) {
      File var4 =
          new File(
              this.mcServer.worldServerForDimension(0).getSaveHandler().getWorldDirectory(),
              "stats");
      File var5 = new File(var4, var2.toString() + ".json");

      if (!var5.exists()) {
        File var6 = new File(var4, playerIn.getName() + ".json");

        if (var6.exists() && var6.isFile()) {
          var6.renameTo(var5);
        }
      }

      var3 = new StatisticsFile(this.mcServer, var5);
      var3.func_150882_a();
      this.playerStatFiles.put(var2, var3);
    }

    return var3;
  }
コード例 #2
0
  /** also stores the NBTTags if this is an intergratedPlayerList */
  protected void writePlayerData(EntityPlayerMP playerIn) {
    this.playerNBTManagerObj.writePlayerData(playerIn);
    StatisticsFile var2 = (StatisticsFile) this.playerStatFiles.get(playerIn.getUniqueID());

    if (var2 != null) {
      var2.func_150883_b();
    }
  }