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

Inspiration How to start learning writing plugins

Comments in 'Resources' started by PEMapModder, Feb 8, 2014.

  1. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    the new plugin template is somehow a big change to the current one :(

    for me, it looks like java where you clearly put at the header all of the required dependencies to make your code work.
    Xfusionios and LDX like this.
  2. Blubbll
    Offline

    Blubbll Active Member

    Joined:
    Oct 3, 2013
    Posts:
    325
    Minecraft User:
    Blubbll
    I also don't love it but i think we are all into this, it's the choice of the PocketMine-Team if they mess up everything to make it work better, faster, stronger, better.
    Xfusionios and LDX like this.
  3. Marc The Awesome
    Offline

    Marc The Awesome New Member

    Joined:
    Mar 26, 2014
    Posts:
    1
    Minecraft User:
    MrSkiermarc
    Is it possible to port the PHP code to Python? Or make Python work with PHP?
  4. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    No.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes if you make a php parser in python or the opposite side.
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Saying"Mess up"is somehow offending them...
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Look at this for some templates in the new API.
  8. Blubbll
    Offline

    Blubbll Active Member

    Joined:
    Oct 3, 2013
    Posts:
    325
    Minecraft User:
    Blubbll
    Ye, it's basically messing everything up, most server owners and some plugin devs knew about PocketMine programming / Plugin structure and i'm sure not everybody loves it.
    So it messes up with the current pocketmine-Plugin format and makes Place for a new, better one
    almost noone will be able to use without many weeks of Reading, understanding etc, (mostly server owners and Plugin devs who aren't too good at the current API anywys).
    iJoshuaHD likes this.
  9. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    shogihcp should support old pocketmine plugins. it doesnt even takes space anyways. why cant pocketmine read the plugin format if its old or not. i know its a lot of work but think of the possibilities.

    if it is, so be it.
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    No. It is that the usage of namespaces breaks everything.

    Before:
    PHP:
    <?php
    /*
    __blah blah blah__
    */
    class MyPlugin implements Plugin{
        public function 
    __construct(ServerAPI $api$s=0){}
        
    //blah
    }
    If he adds old plugin support, you stil need to:
    PHP:
    <?php
    /*blah blah blah*/
    use pocketmine\plugin\Plugin// probably
    class MyPlugin implements Plugin{
        public function 
    __construct(NO_SUCH_CLASS_CALLED_ServerAPI_WILLBE_PRESENT_IN_THE_RELEASE $api$server=false){}
        
    // blah blah blah
    }
  11. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    its better that way than to rewrite bunch of codes again if ever the plugin is huge already.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Exactly what I think. And that is exactly why there are so many W.I.P. repositories here!
    Just because I can't help rewriting. Look at the no. of repositories for MCPEIT.
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    My message exceeded 20000 characters, so I will post it in the second post.
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Formatted the thread so that the main thread post to make it cleaner to read.

    P.S. Seems sub-spoilers have some issues in this forum...
  15. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    "DAMN DAT ALPHA 1.3"

    *1.4
    Last edited: Apr 1, 2014
  16. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Wait... File path separator is not \?
    wies and LDX like this.
  17. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    And also you don't need to break the switch after you returned. In Java in Eclipse, this would create a displayed compile error.
  18. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I am using the new API too. See:
    upload_2014-4-2_16-34-26.png
  19. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    See how I initialize a plugin.
  20. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The spoilers seem to be failing.

Share This Page

Advertisement