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

Please help

Comments in 'Plugin Development' started by PEMapModder, Oct 19, 2013.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    What is the difference between $this->api->event() and $this->api->addHandler()?
    Also, which one, player.join and player.connect, happens first?
    Last edited: Oct 20, 2013
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Can anyone answer?
  3. 99leonchang
    Offline

    99leonchang Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    165
    Plugins:
    2
    Minecraft User:
    99leonchang
    I usually use player.join but I'm not sure
    But if you want it when they spawn, player.spawn would work
  4. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    392
    player.connect happens first.
    I'm not sure about the difference between event and addhandler
  5. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    I would stick to $this->api->addHandler() if I were you. It works for me all the time. But I never used $this->api->event() so if your really curious you could try it yourself or maybe look at the code to see if there's a difference.

Share This Page

Advertisement