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

Is there any difference?

Comments in 'Plugin Development' started by PEMapModder, Nov 2, 2013.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Codes in init and __construct?

    Also can I register codes in middle of plugin?
  2. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Init and construct are different. I don't think you can register command in the middle as pocket mine will look in init to find the nee commands. I'm not 100% sure though
  3. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    __construct is a magic method in php, it will be called when the script gets loaded. The method init will be called by pocketmine itself when it starts the plugin. You can register commands everywhere in the code.
    Last edited: Nov 2, 2013
  4. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    So just ignore absolutely everything I said :p
    PEMapModder likes this.

Share This Page

Advertisement