mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-20 20:12:26 +00:00
Initial commit
This commit is contained in:
commit
e37de23340
41 files changed
+2123
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package baubles.common.network;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import baubles.common.Baubles;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
public class EventHandlerNetwork {
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerLoggedInEvent (PlayerEvent.PlayerLoggedInEvent event) {
|
||||
Side side = FMLCommonHandler.instance().getEffectiveSide();
|
||||
if (side == Side.SERVER) {
|
||||
Baubles.instance.playerHandler.loadPlayerBaubles(event.player);
|
||||
}
|
||||
}
|
||||
|
||||
HashMap<Integer,Long> lastPlayerUpdate = new HashMap<Integer,Long>();
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerUpdateEvent (PlayerEvent event) {
|
||||
Side side = FMLCommonHandler.instance().getEffectiveSide();
|
||||
if (side == Side.SERVER) {
|
||||
Baubles.instance.playerHandler.updatePlayerBaubles(event.player);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user