/**
* Triggers the logging of an achievement and attempts to announce to server
*/
public void unlockAchievement(EntityPlayer playerIn, StatBase statIn, int p_150873_3_)
{
int i = statIn.isAchievement() ? this.readStat(statIn) : 0;
super.unlockAchievement(playerIn, statIn, p_150873_3_);
this.field_150888_e.add(statIn);
if (statIn.isAchievement() && i == 0 && p_150873_3_ > 0)
{
this.field_150886_g = true;
if (this.mcServer.isAnnouncingPlayerAchievements())
{
this.mcServer.getConfigurationManager().sendChatMsg(new ChatComponentTranslation("chat.type.achievement", new Object[] {playerIn.getDisplayName(), statIn.func_150955_j()}));
}
}
if (statIn.isAchievement() && i > 0 && p_150873_3_ == 0)
{
this.field_150886_g = true;
if (this.mcServer.isAnnouncingPlayerAchievements())
{
this.mcServer.getConfigurationManager().sendChatMsg(new ChatComponentTranslation("chat.type.achievement.taken", new Object[] {playerIn.getDisplayName(), statIn.func_150955_j()}));
}
}
}
StatisticsFile.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:DecompiledMinecraft
作者:
评论列表
文章目录