Posted August 2, 201510 yr I'm trying to add a title when a player joins the game @SubscribeEvent public void onPlayerJoinedGame(PlayerLoggedInEvent event){ EntityPlayer player = event.player; if(player instanceof EntityPlayerMP){ if(PopularPlayers.isPopularPlayer(player)){ if(player.getDisplayNameString().equals("Intektor")){ EntityPlayerMP entityplayermp = (EntityPlayerMP) player; S45PacketTitle s45packettitle = new S45PacketTitle(S45PacketTitle.Type.TITLE, (IChatComponent)new ChatComponentText(EnumChatFormatting.DARK_RED + player.getDisplayNameString() + " joined")); S45PacketTitle s45packettitle1 = new S45PacketTitle(S45PacketTitle.Type.SUBTITLE, (IChatComponent)new ChatComponentText(EnumChatFormatting.RED + "The Creator of Modifiable Armor. Bitches!")); entityplayermp.playerNetServerHandler.sendPacket(s45packettitle); entityplayermp.playerNetServerHandler.sendPacket(s45packettitle1); ModArmMod.network.sendToAll(new MessageToClient(player.getDisplayNameString())); }else{ EntityPlayerMP entityplayermp = (EntityPlayerMP) player; S45PacketTitle s45packettitle = new S45PacketTitle(S45PacketTitle.Type.TITLE, (IChatComponent)new ChatComponentText(EnumChatFormatting.GREEN + player.getDisplayNameString() + " joined")); S45PacketTitle s45packettitle1 = new S45PacketTitle(S45PacketTitle.Type.SUBTITLE, (IChatComponent)new ChatComponentText(EnumChatFormatting.DARK_GREEN + "He's popular!")); entityplayermp.playerNetServerHandler.sendPacket(s45packettitle); entityplayermp.playerNetServerHandler.sendPacket(s45packettitle1); } } } } that one is working fine, but it is only shown to the player hwo joins, not to the othersm any idea? I tried it with some packet, but that doesn't work eiter @Override public IMessage onMessage(MessageToClient message, MessageContext ctx) { S45PacketTitle s45packettitle = new S45PacketTitle(S45PacketTitle.Type.TITLE, (IChatComponent)new ChatComponentText(EnumChatFormatting.GREEN + message.message + " joined")); ctx.getClientHandler().getNetworkManager().sendPacket(s45packettitle); return null; } Creator of Extra Shoes Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then
August 2, 201510 yr Author That worked fine, thanks Creator of Extra Shoes Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.