Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Event Priority

Comments in 'Plugin Development' started by abler98, Jan 16, 2015.

  1. abler98
    Offline

    abler98 New Member

    Joined:
    Nov 15, 2014
    Posts:
    26
    Minecraft User:
    abler98
    How to change the priority of the event? You need to plug in a single event is triggered earlier than in other
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PHP:
    class MListener implements Listener{
        
    /**
         * @priority <PRIORITY>
         */
        
    public function mListener(SubclassOfEvent $e){}
    }
    <PRIORITY> is, from the first run to last run:
    Code:
    LOWEST
    LOW
    NORMAL
    HIGH
    HIGHEST
    MONITOR
    
    By default it is normal.
    If you use MONITOR, you must not change anything or cancel the event because MONITOR is to listen only; and if you change things there, other plugins that want to listen to the change of the event won't see the change.
  3. abler98
    Offline

    abler98 New Member

    Joined:
    Nov 15, 2014
    Posts:
    26
    Minecraft User:
    abler98
    Thank you, I have figured out

Share This Page

Advertisement