Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] [1.12.2] Player capabilities don't sync in PlayerLoggedInEvent

Featured Replies

Posted

The event fires, but the capabilities aren't synced to the client from the server.

    @SubscribeEvent
    public static void loginEvent(final PlayerLoggedInEvent event) {
    	EntityPlayer player = event.player;
    	PacketHandler.INSTANCE.sendTo(new PacketMana(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketMaxMana(player), (EntityPlayerMP)player);
    	
    	PacketHandler.INSTANCE.sendTo(new PacketClan(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketLand(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketAffiliation(player), (EntityPlayerMP)player);

    	PacketHandler.INSTANCE.sendTo(new PacketGenjutsu(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketTaijutsu(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketKenjutsu(player), (EntityPlayerMP)player);

    	PacketHandler.INSTANCE.sendTo(new PacketSharingan(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketSharinganSize(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketSharinganPattern(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketSharinganActive(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketByakugan(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketByakuganSize(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketByakuganActive(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketKetsuryuugan(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketKetsuryuuganActive(player), (EntityPlayerMP)player);
    	
    	PacketHandler.INSTANCE.sendTo(new PacketCurseMark(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketCurseMarkSize(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketCurseMarkType(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketCurseMarkActive(player), (EntityPlayerMP)player);
    	
    	PacketHandler.INSTANCE.sendTo(new PacketFireRelease(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketWindRelease(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketWaterRelease(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketLightningRelease(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketEarthRelease(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketWoodRelease(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketYinRelease(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketYangRelease(player), (EntityPlayerMP)player);
    	PacketHandler.INSTANCE.sendTo(new PacketIceRelease(player), (EntityPlayerMP)player);
    	
    	PacketHandler.INSTANCE.sendTo(new PacketShikotsumyaku(player), (EntityPlayerMP)player);
    	System.out.println("Synced");
    }

 

Edited by FlashHUN
marked as solved

  • Author
51 minutes ago, diesieben07 said:

Holy jesus, how many f***ing packets do you have?! Why?

Do the packets arrive on the client? What do they do there? Use the debugger.

I just figured out the way to shorten all of these into just 3 packets, but anyway, the packets should be arriving on the client, these work in the respawn and dimension change events too.

  • Author

And now suddenly the data syncs without changing anything... What the... Anyways, marking as solved.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.