Java Code Examples for net.minecraftforge.fml.common.gameevent.PlayerEvent#PlayerLoggedInEvent
The following examples show how to use
net.minecraftforge.fml.common.gameevent.PlayerEvent#PlayerLoggedInEvent .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ModCapabilities.java From Wizardry with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public static void onLogin(PlayerEvent.PlayerLoggedInEvent event) { if (event.player.world.isRemote) return; IManaCapability manaCap = ManaCapabilityProvider.getCap(event.player); if (manaCap != null) manaCap.dataChanged(event.player); IMiscCapability miscCap = MiscCapabilityProvider.getCap(event.player); if (miscCap != null) miscCap.dataChanged(event.player); }
Example 2
Source File: SpellTicker.java From Wizardry with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public static void onLogin(PlayerEvent.PlayerLoggedInEvent event) { if (event.player.world.isRemote) return; WizardryWorld cap = WizardryWorldCapability.get(event.player.world); if (cap == null) return; // PacketHandler.NETWORK.sendToDimension(new PacketSyncWizardryWorld(cap.serializeNBT()), event.player.world.provider.getDimension()); }
Example 3
Source File: ConfigSync.java From TinkersToolLeveling with MIT License | 5 votes |
@SubscribeEvent @SideOnly(Side.SERVER) public void playerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) { if(event.player instanceof EntityPlayerMP && FMLCommonHandler.instance().getSide().isServer()) { ConfigSyncPacket packet = new ConfigSyncPacket(); TinkerToolLeveling.networkWrapper.network.sendTo(packet, (EntityPlayerMP) event.player); } }
Example 4
Source File: PlayerConnectToServerHandler.java From AgriCraft with MIT License | 5 votes |
@SubscribeEvent @SuppressWarnings("unused") public void onConnect(PlayerEvent.PlayerLoggedInEvent event) { EntityPlayerMP player = (EntityPlayerMP) event.player; syncSoils(player); syncPlants(player); syncMutations(player); }
Example 5
Source File: PlayerEventHandler.java From enderutilities with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent public void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) { if (event.player instanceof EntityPlayerMP) { PlacementProperties.getInstance().syncAllDataForPlayer((EntityPlayerMP) event.player); } }
Example 6
Source File: StartStopHandler.java From BakaDanmaku with MIT License | 4 votes |
@SubscribeEvent public static void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) { BakaDanmaku.player = event.player; DanmakuThreadFactory.restartThreads(); }
Example 7
Source File: SyncEventHandler.java From GokiStats with MIT License | 4 votes |
@SubscribeEvent public static void playerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) { syncPlayerData(event.player); }
Example 8
Source File: AgriCraft.java From AgriCraft with MIT License | 4 votes |
@SubscribeEvent @SideOnly(Side.CLIENT) public void onPlayerJoin(PlayerEvent.PlayerLoggedInEvent e) { AgriAlphaWarnings.chooseMessage(l -> e.player.sendMessage(ForgeHooks.newChatWithLinks(l))); }