@Hack @SubscribeEvent public void login(PlayerLoggedInEvent e) { if (e.player.worldObj.isRemote) { // do nothing on client return; } Collection<BloodStain> outStains = getStains(e.player.dimension); System.out.println("SENDING STAIONS: " + outStains.size()); for (BloodStain stain : outStains) { PacketManager.sendToPlayer(new PacketCreateStain(stain), e.player); } }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { ChunkLoadingCallback.onPlayerLogin(event.player); if (event.player instanceof EntityPlayerMP) { EntityPlayerMP thePlayer = (EntityPlayerMP) event.player; GCPlayerStats stats = GCPlayerStats.get(thePlayer); SpaceStationWorldData.checkAllStations(thePlayer, stats); GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_UPDATE_SPACESTATION_CLIENT_ID, new Object[] { WorldUtil.spaceStationDataToString(stats.spaceStationDimensionData) }), thePlayer); SpaceRace raceForPlayer = SpaceRaceManager.getSpaceRaceFromPlayer(thePlayer.getGameProfile().getName()); if (raceForPlayer != null) SpaceRaceManager.sendSpaceRaceData(thePlayer, raceForPlayer); } if (event.player.worldObj.provider instanceof WorldProviderOrbit && event.player instanceof EntityPlayerMP) { ((WorldProviderOrbit) event.player.worldObj.provider).sendPacketsToClient((EntityPlayerMP) event.player); } }
@SubscribeEvent public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) { event.player.addChatComponentMessage(new ChatComponentText("�b�lHello" + " " + "�e�l" + event.player.getDisplayName() + "�b�l!")); event.player.addChatComponentMessage(new ChatComponentText(/*/event.player.getDisplayName() + /*/"�a�l" + EpicProportionsMod.MODNAME + " " + "�2�lMade By:jtrent238")); event.player.addChatComponentMessage(new ChatComponentText(/*/event.player.getDisplayName() + /*/"�6�lYou are running" + "�b�l" + " " + EpicProportionsMod.MODVERSION + " " + "�6�lof" + "�6�l" + " " + EpicProportionsMod.MODNAME + "!")); //event.player.addChatComponentMessage(new ChatComponentText("�e�lLearn more at: �b�lhttp://bit.ly/FoodModWiki")); event.player.triggerAchievement(Achievements.achievementinstall); //event.player.addEntityCrashInfo(EpicProportionsMod.CRASHINFO); //event.player.clonePlayer(playerclone, true); event.player.extinguish(); event.player.getDisplayName(); //event.player.writeToNBT(EpicProportionsMod.NBTJOIN); event.player.getBedLocation(); event.player.shouldHeal(); event.getListenerList(); event.hashCode(); Minecraft.getSystemTime(); Minecraft.isAmbientOcclusionEnabled(); Minecraft.isGuiEnabled(); Minecraft.getMinecraft(); Minecraft.getGLMaximumTextureSize(); Minecraft.isFancyGraphicsEnabled(); //Log.getLog(arg0, arg1, arg2); //event.notifyAll(); }
@SubscribeEvent public void enterWorldHandler(PlayerLoggedInEvent e) { if(!alerted) { EntityPlayer player=e.player; String[] pars; for(String modid:this.latestVersion.keySet()) { pars=this.modPool.get(modid); //modname,latestestversion player.addChatMessage(new ChatComponentTranslation("chat.newversion",pars[0],this.latestVersion.get(modid))); } alerted=true; } }
@SubscribeEvent public void playerConnected(PlayerLoggedInEvent event) { String name = event.player.getDisplayName(); boolean found = false; for (int i = 0; i < chats.size(); i++) { if (chats.get(i).getUsername().equals(name)) { chats.get(i).connect(); } } if (!found) { XMPPConnectionHandler chat = new XMPPConnectionHandler(name, name, resource, service, host, chatRoomName, chatRoomPrefix); chat.connect(); chats.add(chat); } }
@SubscribeEvent public void onPlayerLogin( PlayerLoggedInEvent pLoginEvent ) { if( pLoginEvent.player instanceof EntityPlayerMP ) { EntityPlayerMP tEP = (EntityPlayerMP) pLoginEvent.player; // Is player op/admin if( MinecraftServer.getServer().getConfigurationManager().func_152596_g( tEP.getGameProfile() ) ) { for( String tMsg : _mErrorBuffer ) { // If this ever crashing cause of an invalid cast, your next // beer is on me PlayerChatHelper.SendError( tEP, tMsg ); } } } }
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { if (mod.getConfig().isUseVersionChecker() && mod.getVersionChecker().isNewVersionAvaible()) { if (mod.getVersionChecker().getNewestVersion() != null) { event.player.addChatComponentMessage(mod.getVersionChecker().getNewestVersion().getFormattedChatText()); } } }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { if (event.player instanceof EntityPlayerMP) { this.onPlayerLogin((EntityPlayerMP) event.player); } }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { PacketDispatcher.packetsys.sendTo(new InspectPacket(), (EntityPlayerMP) event.player); if (!roundstarted) return; if (!rrplayerlist.contains(event.player.getCommandSenderName())) { event.player.inventory.clearInventory(null, -1); event.player.setLocationAndAngles(cSpawnx, 200, cSpawnz,0,0); //rrplayerlist.add(new RivalRebelsPlayer(event.player.getCommandSenderName(), RivalRebelsTeam.NONE, RivalRebelsClass.NONE, RivalRebelsRank.REGULAR, RivalRebels.resetMax)); } PacketDispatcher.packetsys.sendTo(rrplayerlist, (EntityPlayerMP) event.player); if (isInSpawn(event.player)) PacketDispatcher.packetsys.sendTo(new GuiSpawnPacket(), (EntityPlayerMP) event.player); }
@SubscribeEvent public void JoinWorld(PlayerLoggedInEvent event) { EntityPlayer player = event.player; NBTTagCompound entityData = player.getEntityData(); String joinedBefore = "HasPlayerJoinedWorldBefore"/*player.PERSISTED_NBT_TAG*/; Calendar calendar = Calendar.getInstance(); //String PlayerName = null; //entityData.setString(PlayerName, player.getDisplayName()); entityData.getBoolean(joinedBefore); if(entityData.getBoolean(joinedBefore) == false) { entityData.setBoolean(joinedBefore, true); if(EpicProportionsMod.PRESENT_ON_JOIN == true){ player.inventory.addItemStackToInventory(new ItemStack(ItemLoader.itemBirthdayPresent)); } if (calendar.get(2) + 1 == 4 && calendar.get(5) == 4){ event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GOLD + "Happy Birthday, " + EnumChatFormatting.GREEN + "jtrent238" + EnumChatFormatting.GOLD + ".")); if(EpicProportionsMod.PRESENT_ON_DEVBIRTHDAY == true){ player.inventory.addItemStackToInventory(new ItemStack(ItemLoader.itemBirthdayPresent)); event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.LIGHT_PURPLE + "Have a Free Birthday Present to Celebrate.")); } } } }
@SubscribeEvent public void playerLogin(final PlayerLoggedInEvent event) { if (event.player instanceof EntityPlayer) { if (status == UpdateStatus.OUTDATED) { final String msg = StatCollector.translateToLocalFormatted("msg.NewVersionAvailable.pathways", Pathways.MOD_NAME, currentVersion, CURSE_PROJECT_NAME); IChatComponent component = IChatComponent.Serializer.func_150699_a(msg); event.player.addChatMessage(component); } } }
@SubscribeEvent() public void playerJoinEvent(final PlayerLoggedInEvent event) { if (isFirstJoin(event.player) || !ONLY_NEW_PLAYERS) { if (!StringUtils.isEmpty(PLAYER_JOIN_TARGET)) TargetManager.execute((EntityPlayerMP) event.player, PLAYER_JOIN_TARGET, true); } }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { Preconditions.checkNotNull(event); Preconditions.checkNotNull(event.player); PlayerContext ctx = new PlayerContext(event.player); if (!ctx.senderIsFakePlayer()) { PlayerEntityHelper.sendChatMessage(ctx, getLoginMessage(ctx.getLanguagePack())); } }
@SubscribeEvent public void playerLogin(final PlayerLoggedInEvent event) { if (event.player instanceof EntityPlayer) { if (status == UpdateStatus.OUTDATED) { final String msg = StatCollector.translateToLocalFormatted("msg.NewVersionAvailable.mpinfo", ModpackInfo.MOD_NAME, currentVersion, CURSE_PROJECT_NAME); IChatComponent component = IChatComponent.Serializer .func_150699_a(msg); event.player.addChatMessage(component); } } }
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { if (!addPlayerLoggedIn.isEmpty()) { hPlayerLoggedIn.addAll(addPlayerLoggedIn); addPlayerLoggedIn.clear(); } for (Iterator<LIHandler> it = hPlayerLoggedIn.iterator(); it.hasNext(); ) { LIHandler handler = it.next(); if (handler.isDead()) it.remove(); else handler.trigger(event); } }
@SubscribeEvent public void onPlayerJoined(PlayerLoggedInEvent event) { // Lookup player ExtendedPlayerData prop = ExtendedPlayerData.get(event.player); // Give New Players a Doom Shrine if (!prop.GivenShrine) { prop.GivenShrine = true; event.player.inventory.addItemStackToInventory(new ItemStack(DoomShrine.doomShrineBlock)); } }
@SubscribeEvent public void playerLogin(final PlayerLoggedInEvent event) { if (event.player instanceof EntityPlayer) { if (status == UpdateStatus.OUTDATED) { final String msg = StatCollector.translateToLocalFormatted("msg.NewVersionAvailable.recycling", ThermalRecycling.MOD_NAME, currentVersion, CURSE_PROJECT_NAME); IChatComponent component = IChatComponent.Serializer.func_150699_a(msg); event.player.addChatMessage(component); } } }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { WorldProvider provider = event.player.getEntityWorld().provider; if(provider instanceof MothershipWorldProvider) { ((MothershipWorldProvider)provider).sendPacketsToClient((EntityPlayerMP) event.player); } }
@SubscribeEvent public void onPlayerLoginEvent(PlayerLoggedInEvent event) { if(!event.player.worldObj.isRemote) { Mekanism.packetHandler.sendTo(new ConfigSyncMessage(), (EntityPlayerMP)event.player); Mekanism.packetHandler.sendTo(new BoxBlacklistMessage(), (EntityPlayerMP)event.player); Mekanism.packetHandler.sendTo(new JetpackDataMessage(JetpackPacket.FULL, null, false), (EntityPlayerMP)event.player); Mekanism.packetHandler.sendTo(new ScubaTankDataMessage(ScubaTankPacket.FULL, null, false), (EntityPlayerMP)event.player); Mekanism.logger.info("Sent config to '" + event.player.getDisplayName() + ".'"); } }
@SubscribeEvent public void playerjoin(PlayerLoggedInEvent event) { GameProfile player = event.player.getGameProfile(); boolean op = MinecraftServer.getServer().getConfigurationManager().func_152596_g(player); if (op && !ATLChecker.CheckResult) if (ATLChecker.LatestVersion != "null") event.player.addChatMessage(new ChatComponentText(String.format(ATLChecker.OpMessage, ATLChecker.LocalVersion, ATLChecker.LatestVersion))); else event.player.addChatMessage(new ChatComponentText(ATLChecker.FailureMessage)); }
@SubscribeEvent public void onPlayerLoginEvent(PlayerLoggedInEvent event) { EntityPlayer player = event.player; World world = player.worldObj; if (!world.isRemote) { NetworkHandler.sendTo(new PacketConfiguration(), (EntityPlayerMP) player); Electrometrics.getLogger().info("Sent configuration to '" + player.getDisplayName() + "'."); } }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { ChannelHandler.network.sendTo(new PacketAlarm( IC2NuclearControl.instance.maxAlarmRange, IC2NuclearControl.instance.allowedAlarms), (EntityPlayerMP) event.player); }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent event) { if(event.player instanceof EntityPlayerMP && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) { CraftingManagerMod.sendUpdateToClient(event.player); } }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent e) { if (!e.player.worldObj.isRemote) { PacketHelper.syncOwnInventory((EntityPlayerMP) e.player,PlayerRpgInventory.get(e.player)); } PlayerRpgInventory.get(e.player); }
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event){ ChatComponentTranslation chatcomponenttranslation = new ChatComponentTranslation("Thanks for using SecurityCraft " + mod_SecurityCraft.getVersion() + "! Tip: " + getRandomTip(), new Object[0]); if(mod_SecurityCraft.configHandler.sayThanksMessage){ event.player.addChatComponentMessage(chatcomponenttranslation); } }
/** * Called whenever a {@link EntityPlayer} joins the game. */ @SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event){ String tipKey = getRandomTip(); IChatComponent chatcomponenttext; if(tipsWithLink.containsKey(tipKey.split("\\.")[2])) chatcomponenttext = new ChatComponentText("[" + EnumChatFormatting.GOLD + "SecurityCraft" + EnumChatFormatting.WHITE + "] " + StatCollector.translateToLocal("messages.thanks").replace("#", SecurityCraft.getVersion()) + " " + StatCollector.translateToLocal("messages.tip") + " " + StatCollector.translateToLocal(tipKey) + " ").appendSibling(ForgeHooks.newChatWithLinks(tipsWithLink.get(tipKey.split("\\.")[2]))); else chatcomponenttext = new ChatComponentText("[" + EnumChatFormatting.GOLD + "SecurityCraft" + EnumChatFormatting.WHITE + "] " + StatCollector.translateToLocal("messages.thanks").replace("#", SecurityCraft.getVersion()) + " " + StatCollector.translateToLocal("messages.tip") + " " + StatCollector.translateToLocal(tipKey)); if(SecurityCraft.config.sayThanksMessage) event.player.addChatComponentMessage(chatcomponenttext); }
@SubscribeEvent public void onPlayerJoin(PlayerLoggedInEvent event) { synchronized (playerListeners) { for (IPlayerEventHook listener : playerListeners) { listener.onPlayerJoin(event.player.getDisplayName()); } } }
@SuppressWarnings("UnnecessaryReturnStatement") @SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent ev) { if (Config.instance.maintenanceMode.get() && ev.player instanceof EntityPlayerMP && !(ev.player instanceof FakePlayer)) { if (!PlayerUtils.isOp(ev.player)) { ((EntityPlayerMP) ev.player).playerNetServerHandler.kickPlayerFromServer(Config.instance.maintenanceModeMessage.get()); } return; } }
@SubscribeEvent public void onLogin(PlayerLoggedInEvent e) { final InventoryPlayer inv = new InventoryPlayer(e.player); if (e.player.isDead) { inv.copyInventory(NyxDeathSystem.determineRespawnInventory(e.player.inventory, false)); } else { inv.copyInventory(e.player.inventory); } NyxDeathSystem.death_inv.put(e.player.getEntityId(), inv); }
@SubscribeEvent public void initPlayerCustomData(PlayerLoggedInEvent event) { LogHelper.info("Initializing custom data"); NBTTagCompound playerCustomData = EntityHelper.getCustomEntityData(event.player); EntityHelper.saveCustomEntityData(event.player, playerCustomData); }
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { System.out.println(PlayerData.hasPlayer(event.player.getCommandSenderName()) + " | " + PlayerData.players); if(!PlayerData.hasPlayer(event.player.getCommandSenderName())) { PlayerData.addPlayer(new Player(event.player.getCommandSenderName())); event.player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth).setBaseValue(100.0D); event.player.setHealth(100.0F); if(event.player instanceof EntityPlayerMP) { //EntityPlayerMP playerMP = (EntityPlayerMP) event.player; //playerMP.mcServer.getConfigurationManager().transferPlayerToDimension(playerMP, 10, new AgeTeleporter(playerMP.mcServer.worldServerForDimension(10))); } } PlayerData.getPlayer(event.player.getCommandSenderName()).loginCount++; AgeCraft.log.info("Registered player " + event.player.getCommandSenderName()); ArrayList<String> playersOnline = new ArrayList<String>(); List<EntityPlayerMP> list = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().playerEntityList; for(EntityPlayerMP p : list) { playersOnline.add(p.getCommandSenderName()); } AgeCraftCore.instance.packetHandler.sendToPlayer(event.player, new MessageTechTreeAllComponents(event.player.getCommandSenderName())); AgeCraft.log.info("[TechTree] Send all components to " + event.player.getCommandSenderName()); AgeCraftCore.instance.packetHandler.sendToPlayer(event.player, new MessageClothingList()); if(!PlayerClothingServer.players.containsKey(event.player.getCommandSenderName())) { PlayerClothingServer.createDefaultClothing(event.player.getCommandSenderName()); } AgeCraftCore.instance.packetHandler.sendToPlayer(event.player, new MessageClothingAllUpdate(playersOnline)); AgeCraftCore.instance.packetHandler.sendToAllPlayers(new MessageClothingUpdate(PlayerClothingServer.getPlayerClothing(event.player.getCommandSenderName()))); AgeCraft.log.info("[Clothing] Send all clothing to " + event.player.getCommandSenderName()); }
@SubscribeEvent public void onPlayerLogin(PlayerLoggedInEvent player) { if (Side.CLIENT == FMLCommonHandler.instance().getSide()) { TkIrc.toIrc.joinChannel(Config.cName, Config.cKey); } if (Config.eJoinMC) { TkIrc.toIrc.sendMessage(Config.cName, "* "+ TkEvents.dePing(player.player.getDisplayName()) +" has joined the game"); } }
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { EntityPlayerMP player = (EntityPlayerMP)event.player; Selection sel = ScriptingMod.instance.getSelection(player); sel.reset(player.dimension); ScriptingMod.DISPATCHER.sendTo(ScriptPacket.getPacket(PacketType.SELECTION, sel), player); }
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { if (EtFuturum.enablePlayerSkinOverlay) playerLoggedInCooldown = 20; }
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent e) { AbstractPacket packet = new InitClientWorldPacket(); TerraFirmaCraft.PACKET_PIPELINE.sendTo(packet, (EntityPlayerMP)e.player); }
@SubscribeEvent public void loginEvent(PlayerLoggedInEvent event) { NEIServerConfig.loadPlayer(event.player); NEISPH.sendHasServerSideTo((EntityPlayerMP) event.player); }
@SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { AbstractPacket pkt = new InitClientWorldPacket(); TerraFirmaCraft.PACKET_PIPELINE.sendTo(pkt, (EntityPlayerMP) event.player); }