Esempio n. 1
0
  public void func_150873_a(EntityPlayer p_150873_1_, StatBase p_150873_2_, int p_150873_3_) {
    int var4 = p_150873_2_.isAchievement() ? this.writeStat(p_150873_2_) : 0;
    super.func_150873_a(p_150873_1_, p_150873_2_, p_150873_3_);
    this.field_150888_e.add(p_150873_2_);

    if (p_150873_2_.isAchievement() && var4 == 0 && p_150873_3_ > 0) {
      this.field_150886_g = true;

      if (this.field_150890_c.isAnnouncingPlayerAchievements()) {
        this.field_150890_c
            .getConfigurationManager()
            .sendChatMsg(
                new ChatComponentTranslation(
                    "chat.type.achievement",
                    new Object[] {p_150873_1_.getDisplayName(), p_150873_2_.func_150955_j()}));
      }
    }

    if (p_150873_2_.isAchievement() && var4 > 0 && p_150873_3_ == 0) {
      this.field_150886_g = true;

      if (this.field_150890_c.isAnnouncingPlayerAchievements()) {
        this.field_150890_c
            .getConfigurationManager()
            .sendChatMsg(
                new ChatComponentTranslation(
                    "chat.type.achievement.taken",
                    new Object[] {p_150873_1_.getDisplayName(), p_150873_2_.func_150955_j()}));
      }
    }
  }