mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-27 15:23:12 +00:00
1 parent
45e6e3fe27
commit
f00345f30b
5 files changed
+39
-7
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package baubles.common.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
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) {
|
||||
syncBaubles(event.player);
|
||||
}
|
||||
}
|
||||
|
||||
public static void syncBaubles(EntityPlayer player) {
|
||||
for (int a = 0; a < 4; a++) {
|
||||
PlayerHandler.getPlayerBaubles(player).syncSlotToClients(a);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user