From fa9ada8f8281a0214634dcaeebf5d9b50a46ed3e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 17 Jul 2016 16:53:09 +0200 Subject: [PATCH] Fixed log spam when switching worlds Closes #157 --- .../ellpeck/actuallyadditions/mod/event/CommonEvents.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java index 0a53fc410..67c1951d8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java @@ -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();