net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent Java Examples
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: CyberwareConfig.java From Cyberware with MIT License | 5 votes |
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { EntityPlayer player = event.player; World world = player.worldObj; if (!world.isRemote) { CyberwarePacketHandler.INSTANCE.sendTo(new UpdateConfigPacket(), (EntityPlayerMP) player); } }
Example #2
Source File: EpisodeEventWrapper.java From malmo with MIT License | 5 votes |
@SubscribeEvent public void onPlayerJoinedServer(PlayerLoggedInEvent ev) { this.stateEpisodeLock.readLock().lock(); if (this.stateEpisode != null && this.stateEpisode.isLive()) { this.stateEpisode.onPlayerJoinedServer(ev); } this.stateEpisodeLock.readLock().unlock(); }
Example #3
Source File: PlayerTracker.java From TFC2 with GNU General Public License v3.0 | 5 votes |
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { PlayerManagerTFC.getInstance().players.add(new PlayerInfo( event.player.getName(), event.player.getUniqueID())); if(event.player.world.isRemote || event.player.dimension != 0) return; int islandX = (int)(event.player.posX) >> 12; int islandZ = (int)(event.player.posZ) >> 12; IslandMap map = WorldGen.getInstance().getIslandMap(islandX, islandZ); TFC.network.sendTo(new CMapPacket(islandX, islandZ, event.player.world.getSeed()+Helper.combineCoords(islandX, islandZ)), (EntityPlayerMP)event.player); }
Example #4
Source File: SakuraEventLoader.java From Sakura_mod with MIT License | 4 votes |
@SubscribeEvent public static void onPlayerLoggin(PlayerLoggedInEvent event) { if(SakuraConfig.harder_iron_recipe) event.player.sendMessage(new TextComponentTranslation("sakura.warning.harder_iron_recipe_enabled", new Object())); }
Example #5
Source File: StateEpisode.java From malmo with MIT License | 4 votes |
/** Subclass should override this to act when the player joins the server.*/ protected void onPlayerJoinedServer(PlayerLoggedInEvent event) {}
Example #6
Source File: ServerHandler.java From NotEnoughItems with MIT License | 4 votes |
@SubscribeEvent public void loginEvent(PlayerLoggedInEvent event) { NEIServerConfig.loadPlayer(event.player); NEIServerPacketHandler.sendServerSideCheck((EntityPlayerMP) event.player); }
Example #7
Source File: ServerHandler.java From NotEnoughItems with MIT License | 4 votes |
@SubscribeEvent public void loginEvent(PlayerLoggedInEvent event) { NEIServerConfig.loadPlayer(event.player); NEISPH.sendHasServerSideTo((EntityPlayerMP) event.player); }
Example #8
Source File: ProxyCommon.java From WearableBackpacks with MIT License | 4 votes |
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { sendBackpackStack(event.player, event.player); }
Example #9
Source File: BackpacksConfig.java From WearableBackpacks with MIT License | 4 votes |
/** Synchronizes settings with players when they join the world / server. */ @SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { if (isNotServerOwner(event.player)) return; WearableBackpacks.CHANNEL.sendTo(MessageSyncSettings.create(), event.player); }