How to detect that a ResourcePack was sent to a player?

Discussion in 'BungeeCord Plugin Development' started by Uxon, Jul 15, 2021.

  1. Hello there,

    I need to detect when a player receive a resourcepack sent by a bukkit server (and cancel it). How could I do that? I don't find any event regarding resourcepacks in the bungee api. Should I use packets?

    Thank you,
    Thomas
     
  2. Bungeecord unfortunately doesn't seem to have a resourcepack API so your best bet would probably be to listen to the clientbound Resource Pack Send packet.
     
  3. Bungeecord does not support this use case.

    Usually you should have control over the bukkit servers so you can add a plugin there using for example ProtocolLib to block said clientbound packet.
     
  4. Hmm okay. Do you have something to suggest to easily listen to packets with bungee? I'm really not used to bungee programming.



    That's right but I need to coordinate it between servers. In fact I want to cancel the pack packet only the player has already loading a pack with the same URL.