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 @SubscribeEvent
public void onLogInEvent(EntityJoinWorldEvent event){ public void onLogInEvent(PlayerEvent.PlayerLoggedInEvent event){
if(!event.getEntity().worldObj.isRemote && event.getEntity() instanceof EntityPlayerMP){ if(!event.player.worldObj.isRemote && event.player instanceof EntityPlayerMP){
EntityPlayerMP player = (EntityPlayerMP)event.getEntity(); EntityPlayerMP player = (EntityPlayerMP)event.player;
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
if(!data.theCompound.hasNoTags()){ if(!data.theCompound.hasNoTags()){
NBTTagCompound compound = new NBTTagCompound(); NBTTagCompound compound = new NBTTagCompound();