1.17.x Disable Totem Particles

Discussion in 'Spigot Plugin Development' started by UberSuperBoss, Jul 1, 2021.

  1. Does anybody know a way to disable the particles when a totem is used? Thanks
     
  2. First you need a packet handler.
    You can use ProtocolLib or create your own ChannelDuplexHandler. Then you need to filter the PacketPlayOutEntityStatus and possibly PacketPlayOutWorldParticles and discard them.
     
  3. You can also build your own function to run the Totem stuff - an event with a Priority of Monitor (not recommended, I know, but oh well) that listens to PlayerDamageEvent, check it's not cancelled, and if the damage takes the player below 0 HP then remove the Totem from their hand, give them the bonuses manually and just don't send the effect - easy as that.
     
    • Creative Creative x 1