Solved Cancel certain plugin bukkit events

Discussion in 'Spigot Plugin Development' started by pggaming, Jul 10, 2018.

  1. Hello everyone i am making a anticheat testing server and i need to know if there is a way to unload plugins per player or cancel the event that the plugin use's like PlayerMoveEvent per player
     
  2. ScarabCoder

    ScarabCoder Retired Resource Staff
    Retired

    If it's another plugin, you can't without modifying the plugin. You can remove all listeners per-class or per-plugin however.
     
  3. Use an event listener with a higher priority and uncancel the event or set the result of the event to a cached location from a lower priority listener in the case of PlayerMoveEvent (since the standard way to "cancel" it is to use setTo). Be aware that this can break plugin compatibility if you aren't careful
     
  4. ok nvm i found a way to do this thanks for the help :)