diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-04-28 02:43:57 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-04-28 02:43:57 +1000 |
commit | 8e41d9bace1c800f5173c6553e1eac3333be4ac2 (patch) | |
tree | 5f79884c1cc342dbad0d9fe5c69e94086fb24839 /src/Java/miscutil/MiscUtils.java | |
parent | 2013e678ef397925e869d3080ef570c0a7c40dc6 (diff) | |
download | GT5-Unofficial-8e41d9bace1c800f5173c6553e1eac3333be4ac2.tar.gz GT5-Unofficial-8e41d9bace1c800f5173c6553e1eac3333be4ac2.tar.bz2 GT5-Unofficial-8e41d9bace1c800f5173c6553e1eac3333be4ac2.zip |
Uptime R2 'Should' all be a part of MiscUtils now!
Diffstat (limited to 'src/Java/miscutil/MiscUtils.java')
-rw-r--r-- | src/Java/miscutil/MiscUtils.java | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/src/Java/miscutil/MiscUtils.java b/src/Java/miscutil/MiscUtils.java index af9a058378..e6ccf74fc2 100644 --- a/src/Java/miscutil/MiscUtils.java +++ b/src/Java/miscutil/MiscUtils.java @@ -14,6 +14,7 @@ import miscutil.core.util.Utils; import miscutil.core.util.debug.DEBUG_ScreenOverlay; import miscutil.core.util.uptime.Uptime; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.LivingDeathEvent; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; @@ -23,6 +24,9 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.event.FMLServerStoppingEvent; +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; @Mod(modid=CORE.MODID, name="Misc. Utils", version=CORE.VERSION, dependencies="required-after:gregtech;") public class MiscUtils @@ -47,7 +51,7 @@ implements ActionListener proxy.registerTileEntities(); proxy.registerRenderThings(); proxy.preInit(event); - Uptime.preInit(event); //Integration of Uptime. + Uptime.preInit(); //Integration of Uptime. //FMLInterModComms.sendMessage("Waila", "register", "miscutil.core.waila.WailaCompat.load"); } @@ -64,7 +68,7 @@ implements ActionListener } FMLCommonHandler.instance().bus().register(this); proxy.registerNetworkStuff(); - Uptime.init(event); //Integration of Uptime. + Uptime.init(); //Integration of Uptime. } //Post-Init @@ -79,14 +83,14 @@ implements ActionListener public void serverStarting(FMLServerStartingEvent event) { event.registerServerCommand(new CommandMath()); - Uptime.serverStarting(event); //Integration of Uptime. + Uptime.serverStarting(); //Integration of Uptime. } @Mod.EventHandler public void serverStopping(FMLServerStoppingEvent event) { - Uptime.serverStopping(event); //Integration of Uptime. + Uptime.serverStopping(); //Integration of Uptime. } @@ -95,5 +99,29 @@ implements ActionListener Uptime.actionPerformed(arg0); //Integration of Uptime. } + + @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) + public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) + { + Uptime.onPlayerLogin(event); + } + + @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) + public void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent event) + { + Uptime.onPlayerLogout(event); + } + + @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) + public void onPlayerDeath(LivingDeathEvent lde) + { + Uptime.onPlayerDeath(lde); + } + + @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) + public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) + { + Uptime.onPlayerRespawn(event); + } } |