1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Why is the API always changing ?

Discussion in 'General discussion' started by ZakousseMC, Dec 26, 2016.

  1. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC
    Hi,

    I would like to know, why is the API always changing ? I mean, API 2.0.0 or 2.1.0 are good and I don't see reasons on why they get changed to API 3.0.0 for example ?
     
  2. Intyre

    Intyre Administrator Staff Member PMMP Team

    Messages:
    81
    GitHub:
    Intyre
    Hi,

    I would like to know, why is you age always changing ? I mean, age 11 or 12 are good and I don't see reasons on why they get changed to age 13 for example ?
     
  3. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC
    Bruh, wasn't the response I expected, nice one though
     
  4. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    As intyre eloquently illustrates, API version changes are necessary. They help ensure that server owners don't load incompatible (and potentially dangerous or destructive) plugins, and that developers know what they can do, and can't. If you are a developer yourself then you'll have no problem making your own version of PM that allows it to try and load any old plugin, or bump the API version reported by your plugins so that pocketmine tries to load/run them - 'tries' being the important word. You can then work from the errors you see on console to actually update the plugin API version correctly.
     
  5. ZakousseMC

    ZakousseMC Spider Jockey

    Messages:
    46
    GitHub:
    ZakousseMC
    Thanks!
     
  6. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    How to change the API version of the plugin to API 3.0.0 in plugin.yml though? I mean whats that 3.0.0ALPHA1 ?
     
  7. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    take my word as a grain of salt
    but from what i know since each alpha changes WILL break things so dk made a subtag of ALPHA1 and in each changes it will be bumped and also it will strictly only load it's alpha num means in ALPHA2 , ALPHA1 will be broken it is like the normal major bump you can say
     
  8. Dog2puppy

    Dog2puppy Slime

    Messages:
    94
    GitHub:
    colesquared
    We need a new api each time there's a new release of PocketMine. I believe we're on 1.5 but correct me if I'm wrong.
     
  9. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Yes, this is correct.
     
    Dog2puppy likes this.
  10. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    "API" stands for "Application Programming Interface". PocketMine's API is the core classes and functions that you use to do things in plugins.

    However, when that API changes, things can stop working correctly due to the plugin not being designed to handle those changes. A plugin developer's duty then is to resolve issues that cropped up due to the core interface changes.

    The API version number is intended to reflect this. When we make changes to the core, we change the API version to reflect the fact that something has changed in the core that may cause some plugins to stop working. This is of course better than allowing such plugins to cause a server crash.

    Currently, there are 4 tiers of API versioning.

    - Major: This is bumped when backwards incompatible changes are made to the core. E.G. 2.0.0 -> 3.0.0
    - Minor: This is bumped to reflect addition of new features which do not break backwards compatibility. Plugins with an older minor API can load with a newer API, but the server must supply the minimum API required by the plugin. e.g. 1.11.0 -> 1.12.0
    - Patch: This is changed to reflect API bugfixes or minor alterations which do not require a minor bump, for example correcting the behaviour of a method which did not behave the way it was expected to.
    - Suffix: Seen in the form ALPHA1, BETA5, RC3, etc. These are development API versions, which reflects large changes which are not yet completed. This has zero tolerance for API mismatches because of the huge changes which can and do happen during development.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.