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

Runtime - Run 1.3 plugins in 1.4 without any modification!

Comments in 'Plugin Development' started by sekjun9878, May 24, 2014.

  1. sekjun9878
    Offline

    sekjun9878 Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    108
    Plugins:
    1
    Minecraft User:
    sekjun9878
    Hello,

    I'm here to announce a new project I am working on.
    It is called Runtime. Runtime is a plugin that allows loading of 1.3 plugins in 1.4 without any modification of the original plugin.

    It works by declaring 1.3 classes on top of 1.4 classes. The 1.3 classes are written from scratch to intercept the API call and redirect it to the respective 1.4 API call.

    For example, if I were to run
    PHP:
    $this->api->run();
    The 1.3 run() call will be intercepted and then redirected to
    PHP:
    $this->getRuntime()->getServer()->dispatchCommand();
    Of course, the arguments will be modified to allow a smooth redirection. For example, if I were to get a Player object from PlayerAPI(1.3), the get() method will be intercepted and redirected to the 1.4 API, which gives a Player object for 1.4 instead. The Runtime will make another Player object compatible with 1.3, assign values from the 1.4 Player to the 1.3 Player and return that for the get() call.

    If you are feeling limited with the 1.3 API, plugin developers can also use the 1.4 API while coding the rest of their plugin in 1.3. They can gain access to the 1.4 server object by
    PHP:
    $this->getRuntime()->getServer();
    Please note that some 1.3 features may not be available in The Runtime.

    The Runtime is still in early development, but I'll let you guys know when I have a working version!
  2. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    omg! omg! omg!!! this is supa like :D
  3. SirBlaze
    Offline

    SirBlaze Active Member

    Joined:
    Feb 1, 2014
    Posts:
    35
    Minecraft User:
    Franks12345
    AWESOME :0 :) XD :D :cool:o_O:rolleyes:
  4. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    LegacyLoader would be a better name.
  5. Tuff
    Offline

    Tuff Active Member

    Joined:
    Jan 25, 2014
    Posts:
    203
    Minecraft User:
    Roboroug2
    This would be awesome! I was all worried about learning 1.4 in a hurry. Cant wait :D
  6. RekkuzaRage
    Offline

    RekkuzaRage Active Member

    Joined:
    Apr 15, 2014
    Posts:
    251
    Minecraft User:
    RekkuzaRage
    I like the idea, but I currently need someone to update my plugin into the latest API.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    /me is working on something like this.
    RekkuzaRage likes this.
  8. Spurs_Man321
    Offline

    Spurs_Man321 Active Member

    Joined:
    Apr 7, 2014
    Posts:
    52
    Minecraft User:
    spursman321
    So if I make my 1.4 in the 1.3 api I can transfer it so I dont have to code in 1.4 as im ver confused with the 1.4 api
  9. shoghicp
    Offline

    shoghicp Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    433
    Plugins:
    14
    Minecraft User:
    shoghicp
    Remember that after the release of PocketMine-MP Alpha_1.4, all the plugins that use 1.3.12 or lower will be given an "Outdated" prefix (so the authors can update them) and no new plugins for the old API will be allowed to be released or updated (so you have to update them to 1.4)
  10. RekkuzaRage
    Offline

    RekkuzaRage Active Member

    Joined:
    Apr 15, 2014
    Posts:
    251
    Minecraft User:
    RekkuzaRage
    I am confused as well with the new API.
  11. Darunia18
    Offline

    Darunia18 Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    754
    Plugins:
    2
    Minecraft User:
    Darunia18
    It's confusing because it's very different from the old API, but it's a lot better. I don't understand it too much yet, but I do know of a lot of the new possibilities with the new API and trust me, it's really worth it! The sad thing is that no one really has any good tutorials right now. @shoghicp started one, but is waiting until he finishes coding the 1.4 update to finish because some things may change before it's done.
  12. sekjun9878
    Offline

    sekjun9878 Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    108
    Plugins:
    1
    Minecraft User:
    sekjun9878
    The new API is a lot more object oriented(in fact, it is fully object oriented), which from a skilled programmer's point of view is much cleaner than a procedural one. However, I agree on the point that it can be quite confusing to learn.

    I may update and work more on my CakeFramework to 1.4 soon for easy building of plugins without too much complexity :)
    jython234, LDX, PEMapModder and 2 others like this.
  13. sekjun9878
    Offline

    sekjun9878 Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    108
    Plugins:
    1
    Minecraft User:
    sekjun9878
    Yes, this is mainly to ease transition between old servers to new servers and for servers using proprietary plugins which for them can be quite expensive to update their old API to the new API.

    I can see where you are coming from though to encourage use of 1.4 API, but it would make much more transitional sense to allow release and update of old API plugins.
    Spurs_Man321 likes this.
  14. shoghicp
    Offline

    shoghicp Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    433
    Plugins:
    14
    Minecraft User:
    shoghicp
    That way they'll just use the old API. If they update things, shouldn't they use the new API instead of using a compatibility layer to run?
    Spurs_Man321 and Darunia18 like this.
  15. sekjun9878
    Offline

    sekjun9878 Staff Member PocketMine Team

    Joined:
    Aug 22, 2013
    Posts:
    108
    Plugins:
    1
    Minecraft User:
    sekjun9878
    Well, you need to remember that there will still be servers running 1.3 and that developers can't instantly turn their heavily time invested 1.3 plugins to 1.4. They will also need to fix bugs they have in their old plugin versions. You need to slowly deprecate 1.3, cutting plugin submission after about a month. As a project manager and API developer, you don't just press the kill switch and be done with it.
    hoyinm14mc, LDX, PEMapModder and 3 others like this.
  16. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    ur a life saver mate :')
    LDX likes this.
  17. Striker209_MPE
    Offline

    Striker209_MPE New Member Plugin Developer

    Joined:
    Aug 24, 2013
    Posts:
    17
    Plugins:
    1
    Minecraft User:
    Striker209_MPE
  18. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    This is awesome!! Please keep us updated on the progress of this. This tool is something that will save my network of servers for the first month or so while plugins are being updated
    Darunia18 and RekkuzaRage like this.
  19. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I LOVE object-oriented code :p
  20. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    350
    Minecraft User:
    TNPXXSHEEPDOG
    I wish I could fast forward to 0.9.0 lol
    Darunia18 likes this.

Share This Page

Advertisement