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

How to create your own Events?

Comments in 'Plugin Development' started by Hotshot_9930, Mar 19, 2016.

  1. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    Hi,
    I've seen some plugins that use their own custom events, and its interesting. How do you create a custom event?
    applqpak likes this.
  2. TxnneriOS
    Offline

    TxnneriOS New Member

    Joined:
    Mar 19, 2016
    Posts:
    1
    Minecraft User:
    TxnnerOS
    That does seem very interesting, I'll look and see if I can find anything. :D
  3. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
  4. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Last edited: Mar 19, 2016
    AndrewBit, applqpak and Hotshot_9930 like this.
  5. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    As a side note, according to @shoghicp, events declared and triggered by plugins SHOULD extend the PluginEvent class, and pass the owner plugin to the parent constructor.
  7. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    Sorry for bump this post but... Can you explain what's the point of static variables $eventPool and $nextEvent? I didn't understand that at all.
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    It was needed at the time the post was made. It is no longer necessary now.

Share This Page

Advertisement