From 78866b8e89f4060f5a03e8a66888b8899d3c2c83 Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Sun, 10 Dec 2017 19:32:21 +1000 Subject: + Added First Test unit for Analytics. (Analytics Class is not available publicly, but please do ask for a redacted version.) + Added support for Fancy Graphics and shit Graphics modes. (Things like leaves will soon have variable textures) + Added Beyond Reality Classic check, for future pack specific features. % Refactored CORE.java - Removed many useless or duplicate GT variables. --- .../gtPlusPlus/core/handler/events/LoginEventHandler.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/core/handler/events') 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."); -- cgit