diff --git a/src/main/java/com/cricketcraft/chisel/Chisel.java b/src/main/java/com/cricketcraft/chisel/Chisel.java index 0f248f5d..6a9ea1f3 100644 --- a/src/main/java/com/cricketcraft/chisel/Chisel.java +++ b/src/main/java/com/cricketcraft/chisel/Chisel.java @@ -4,8 +4,10 @@ import java.io.File; import java.util.logging.Level; import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentText; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; @@ -205,7 +207,11 @@ public class Chisel { public void thankYou(EntityJoinWorldEvent event){ if(!event.world.isRemote && event.entity instanceof EntityPlayerMP){ EntityPlayerMP player = (EntityPlayerMP) event.entity; - player.addChatMessage(new ChatComponentText("Thank you for half a million downloads! - The Chisel Team")); + if(player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("thanked")){ + NBTTagCompound tag = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); + tag.setBoolean("thanked", true); + player.addChatMessage(new ChatComponentText("Thank you for half a million downloads! - The Chisel Team")); + } } } }