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

It keeps saying my plugin has a broken signature or something

Discussion in 'Development' started by Indexfire, Aug 13, 2017.

  1. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    I recently switched from NetBeans to Eclipse PHP because of my good experience with Eclipse for Java (Eclipse points out the things I need to import unlike netbeans and actually tells me what went wrong with the code, plus since Eclipse PHP exports plugins as a phar it eliminates the need for DevTools) and because it requires a .phar for the API I used the pocketmine phar itself and it appeared to work so to test it I made a simple class extend pluginbase and nothing else. It didnt load and said the plugin had a broken signature, how do I fix this?
     
  2. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    Erm... help?
     
  3. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    Switch back to NetBean is the easiest solution...
    Plus, if you have the correct folder structure, you should get a error-free plugin
     
    Last edited: Aug 13, 2017
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Broken signature means your phar file is corrupted. This has nothing to do with your plugin source code.

    In simple words, there is a problem with Eclipse's phar creation.
     
    jasonwynn10 and Indexfire like this.
  5. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Iirc Ellipse has a feature called "Run". You may add the ConsoleScript.php from DevTools as the script to run, providing the appropriate arguments. Then you can run the ConsoleScript.php to compile the plugin into a phar.
     
    jasonwynn10 and Indexfire like this.
  6. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    NetBeans dosent tell me what to import from the pocketmine library, does not tell me what went wrong with wrongly used code and requires DevTools to run plugins (not so much about DevTools its mainly the first 2 problems)
     
  7. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    You mean importing the pocketmine phar itself as the makeshift API didn't break anything? also I unticked all resources to export except plugin.yml, maybe that was the problem?
    Umm, mind explaining a little further?
     
  8. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    No. NetBean allows you to import library and it gives you out error too
    also, you can make phar HERE
     
  9. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    No. I don't know the details. I simply know "it doesn't work" because the phar file created by eclipse is not even a valid phar file
    Just use ConsoleScript and don't use eclipse's phar builder. Or just write your own phar making PHP script.
    Making a phar file online is even more inconvenient than using DevTools...
     
    Indexfire and HimbeersaftLP like this.
  10. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    i beg to differ. it took me 3x longer to update the exact same game on my PE server compared to just 2 weeks on my PC server
     
  11. Indexfire

    Indexfire Baby Zombie

    Messages:
    137
    GitHub:
    Indexfire
    Edit: It appears there is nothing wrong with Eclipse after all, I exported the exact same way a second time and now it works
     
  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.