aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/handler/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core/handler/events')
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
index 1096816690..830f986d0b 100644
--- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
@@ -1,5 +1,7 @@
package gtPlusPlus.core.handler.events;
+import static gtPlusPlus.core.lib.CORE.mLocalProfile;
+
import java.util.*;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@@ -28,7 +30,10 @@ public class LoginEventHandler {
//Set this for easier use elsewhere.
if (event.player.getEntityWorld().isRemote){
ClientProxy.playerName = this.localPlayersName;
- }
+ if (mLocalProfile == null){
+ mLocalProfile = this.localPlayerRef.getGameProfile();
+ }
+ }
try {
@@ -39,6 +44,14 @@ public class LoginEventHandler {
if (!this.localPlayerRef.worldObj.isRemote){
PlayerCache.appendParamChanges(this.localPlayersName, this.localPlayersUUID.toString());
+ //Submit Analytics
+ try {
+ CORE.mAnalytics.SubmitNewUserSession();
+ }
+ catch (Throwable t){
+ Utils.LOG_INFO("Failed to submit analytics data.");
+ }
+
if (CORE.ConfigSwitches.enableUpdateChecker){
if (!Utils.isModUpToDate()){
Utils.LOG_INFO("[GT++] You're not using the latest recommended version of GT++, consider updating.");