Fixed log spam when switching worlds

Closes #157
This commit is contained in:
Ellpeck 2016-07-17 16:53:09 +02:00
parent 60266c0505
commit fa9ada8f82

View file

@ -92,9 +92,9 @@ public class CommonEvents{
}
@SubscribeEvent
public void onLogInEvent(EntityJoinWorldEvent event){
if(!event.getEntity().worldObj.isRemote && event.getEntity() instanceof EntityPlayerMP){
EntityPlayerMP player = (EntityPlayerMP)event.getEntity();
public void onLogInEvent(PlayerEvent.PlayerLoggedInEvent event){
if(!event.player.worldObj.isRemote && event.player instanceof EntityPlayerMP){
EntityPlayerMP player = (EntityPlayerMP)event.player;
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
if(!data.theCompound.hasNoTags()){
NBTTagCompound compound = new NBTTagCompound();