aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/handler/events
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2017-03-18 12:09:58 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2017-03-18 12:09:58 +1000
commit435eec1dfe0aec63d22875fb2189e69d2b1fa999 (patch)
tree10861db62cde2482869b75ded13df3e3c4eba9cb /src/Java/gtPlusPlus/core/handler/events
parent776f96df847e2337549d4298d51015aff4d0c0d9 (diff)
downloadGT5-Unofficial-435eec1dfe0aec63d22875fb2189e69d2b1fa999.tar.gz
GT5-Unofficial-435eec1dfe0aec63d22875fb2189e69d2b1fa999.tar.bz2
GT5-Unofficial-435eec1dfe0aec63d22875fb2189e69d2b1fa999.zip
+ Added a delay to the mod update message upon login, so it's easier to see.
+ Added more Smoke and visual FX to the Primed Mining Explosives explosion. % Tweaked Primed Mining Explosive Renderer. + Added a randFloat to MathUtils.java.
Diffstat (limited to 'src/Java/gtPlusPlus/core/handler/events')
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
index 0666acc7fa..b787acd02d 100644
--- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
@@ -1,6 +1,6 @@
package gtPlusPlus.core.handler.events;
-import java.util.UUID;
+import java.util.*;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
@@ -45,7 +45,7 @@ public class LoginEventHandler {
Utils.LOG_INFO("Latest version is: "+CORE.MASTER_VERSION);
}
Utils.LOG_INFO("You currently have: "+CORE.VERSION);
- PlayerUtils.messagePlayer(this.localPlayerRef, "You're not using the latest recommended version of GT++, consider updating.");
+ ShortTimer(this.localPlayerRef, 20);
}
else {
Utils.LOG_INFO("You're using the latest recommended version of GT++.");
@@ -100,5 +100,30 @@ public class LoginEventHandler {
}
}
+
+ //Handles notifying the player about a version update.
+ public Timer ShortTimer(EntityPlayer localPlayer, final int seconds) {
+ Timer timer;
+ timer = new Timer();
+ timer.schedule(new NotifyPlayer(localPlayer), seconds * 1000);
+ return timer;
+ }
+
+ //Timer Task for notifying the player.
+ class NotifyPlayer extends TimerTask {
+ final EntityPlayer toMessage;
+ public NotifyPlayer(EntityPlayer localPlayer) {
+ toMessage = localPlayer;
+ }
+
+ @Override
+ public void run() {
+ if (toMessage != null){
+ if (toMessage instanceof EntityPlayerMP){
+ PlayerUtils.messagePlayer(toMessage, "You're not using the latest recommended version of GT++, consider updating.");
+ }
+ }
+ }
+ }
} \ No newline at end of file