Solved What event priority should I use?

Discussion in 'Plugin Development' started by OrangeGuy, May 3, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    OrangeGuy

    Hi guys I am working on a crate plugin now. Because I am using fake inventories, so I want to drop items when player closed the gui. However, If theres any plugin cancelled the event AFTER my plugin dropped items on ground, it can cause terrible problems(Unlimited diamonds or sth like that).

    So now I have a problem: use normal priority or HIGHEST or other..?

    Thanks :)
     
  2. Offline

    Superckl1

    If you do not edit the event, you can listen on MONITOR with ignoreCancelled=true. This will allow all plugins to get their chance to change the event before you get to it to spawn your items.
     
  3. Offline

    OrangeGuy

    Okay I set it to MONITOR. However my another listener DO edit the event, so I should use HIGHEST in that case?
     
  4. Offline

    Superckl1

  5. Offline

    OrangeGuy

  6. Offline

    Superckl1

    OrangeGuy

    Generally, it's good to add that. It's not a definite fix for the inventory sync issue, but it works in most cases.
     
  7. Offline

    OrangeGuy

    Thank you :)
     
Thread Status:
Not open for further replies.

Share This Page