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

[New API] How are phar files created?

Comments in 'Plugin Development' started by args, Jun 14, 2014.

  1. args
    Offline

    args New Member

    Joined:
    Jun 14, 2014
    Posts:
    47
    Minecraft User:
    args
    So far I've only seen plugins created with the new API that have a phar extension.
    I've written a plugin in phpstorm and I think it's error free, though im not sure how to export it or get it onto a phar file, or if a phar is neccessary.
    I am switching from bukkit to pocketmine now that the new API is available so theres a couple things which im still trying to understand :)

    And advice would be great :D
  2. xpyctum
    Offline

    xpyctum Active Member Plugin Developer

    Joined:
    Jan 13, 2014
    Posts:
    292
    Plugins:
    4
    Minecraft User:
    tylerdisney
    Use DevTools, and command /makeplugin <plugin_name>
  3. args
    Offline

    args New Member

    Joined:
    Jun 14, 2014
    Posts:
    47
    Minecraft User:
    args
    Thanks @xpyctum :) sorry for being a noob, I'll try it out and see what i can get going :D
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    ConsoleScript can also be used.
    Last edited: Jun 14, 2014
    iJoshuaHD likes this.
  5. args
    Offline

    args New Member

    Joined:
    Jun 14, 2014
    Posts:
    47
    Minecraft User:
    args
    Got it going! This is so exciting :D thanks again
  6. Lafoog
    Offline

    Lafoog New Member

    Joined:
    Aug 13, 2014
    Posts:
    9
    Minecraft User:
    Lafoog
    Hi, whenever I run "makeplugin example" I get "Invalid plugin name, check the name case." Is there something i'm missing?
  7. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    Remember to use your plugin name:
    Code:
    /makeplugin <your plugin name>
    and the plugin will be compressed into a PHAR file (if it's not a PHAR already)
  8. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    354
    Minecraft User:
    TNPXXSHEEPDOG
    Restart your server a few times so the plugin that you want to make is for sure loaded.
  9. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    Few times? only 1 time is needed... if doesn't load at the first time, then it's wrong coded xD
    PEMapModder likes this.
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The chaos effect :D
    Falk likes this.
  11. tnpxxsheepdog
    Offline

    tnpxxsheepdog Notable Member

    Joined:
    Dec 31, 2013
    Posts:
    354
    Minecraft User:
    TNPXXSHEEPDOG
    For me it took roughly 2-3 times.
  12. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    You don't need devtools, just as to make a bukkit plugin you don't need eclipse. Just use the command line tools :D
  13. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,707
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Or write your own.
    JofhJyv and jython234 like this.
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Look at this. It is modified from the DevTools ConsoleScript.php. It is very useful for releasing a new phar every time, although it is nightmare for git clone.
    Falk likes this.
  15. Thunder33345
    Offline

    Thunder33345 Notable Member

    Joined:
    Apr 3, 2014
    Posts:
    755
    Minecraft User:
    Thunder33345
    LOL

Share This Page

Advertisement