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

unable upload plugin file

Comments in 'Plugin Development' started by DmitryZhuk, May 7, 2016.

  1. DmitryZhuk
    Offline

    DmitryZhuk New Member

    Joined:
    May 6, 2016
    Posts:
    15
    Minecraft User:
    dimulka72
    Hi
    I'm trying to create new plugin, ie I'm creation definition and upload it.
    And in any case to create new plugin on your server I've got an error about empty file, like this
    The following error occurred
    The uploaded file is empty.
    .......
    I tried to upload my phar file, zip with this file. Create phar by official tool, zip it.
    All cases - file is empty. What I did wrong?

    Thanks, Dmitry
  2. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    To check if file contains any bytes you can do
    Code:
    ~ $ file ./file.ext
    
    If file is empty it will return something like this
    Code:
    ./file.ext: empty
    
    But if you feel more comfortable with gui interface you can also use File >> Properties and see it's attributes

    I'm more than sure that the file isn't the fault. Can you please explain where and how you're uploading the file? I guess it's Web FTP, if so - contact your hosting's supports department.
  3. DmitryZhuk
    Offline

    DmitryZhuk New Member

    Joined:
    May 6, 2016
    Posts:
    15
    Minecraft User:
    dimulka72
    I think you didn't understand me correctly.
    I tried to upload my plugin on your forum. I go to plugins section. Go to General. Press button Submit Plugin.
    Fill all fields, after that I have to upload my plugin file. I press button, select my file and get this error.
  4. TheDeibo
    Offline

    TheDeibo Notable Member

    Joined:
    Sep 8, 2014
    Posts:
    693
    Minecraft User:
    TheDeibo
    Make sure your files have this format:

    Code:
    plugin.yml
    +
    src(folder)
          |___PluginName (folder)
                               |______Main.php
    
    That way, it recognises it.

    Make sure the plugin.yml points towards the Main.php.
  5. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Try different browser.
  6. DmitryZhuk
    Offline

    DmitryZhuk New Member

    Joined:
    May 6, 2016
    Posts:
    15
    Minecraft User:
    dimulka72
    Aha. I'll try. Because I did my plugin according to the https://github.com/PocketMine/Documentation/wiki/Plugin-Tutorial
    There is a little bit different organization. Main class and main file differs from Main. But I'll do the other release for pocketmine.
    It is because I did my plugin for ImagicalMine edition (because they suppors 0.14.x version).
  7. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PocketMine also supports 0.14.x versions, you just have to use latest PM version from Github, install it yourself manually or use PM-Installer for Unix OSs
  8. DmitryZhuk
    Offline

    DmitryZhuk New Member

    Joined:
    May 6, 2016
    Posts:
    15
    Minecraft User:
    dimulka72
    Without any success. Could you check my files, where I did wrong
    http://zhuk.cc/files/PM_zhManagedKits_v.0.1.2.zip
    http://zhuk.cc/files/PM_zhManagedKits_v.0.1.2-src.zip

    the first link - it is zip of my phar. I tried use phar but not successed
    the second - it is simple project zip

    PS: I did my phar by simple call
    <?php

    $phar = new Phar('../zhManagedKits.phar');

    $phar->addFile('plugin.yml');
    $phar->addFile('resources/kits.yml');
    $phar->addFile('resources/config.yml');
    $phar->addFile('resources/LICENSE');
    $phar->addFile('src/ZhukDL/Main.php');
  9. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    To convert/compile your project into Phar you don't have to do it yourself, install plugin DevTools and run command '/makeplugin <plugin name>'
    vse eto stanovitsya prosto posle pervoy popytki

    Okay, I downloaded plugin source and compiled it locally, see in attachment. I have to admit, well done mate ;)

    Attached Files:

    Last edited: May 8, 2016
  10. HotFireyDeath
    Offline

    HotFireyDeath Notable Member Plugin Developer

    Joined:
    Mar 19, 2015
    Posts:
    328
    Plugins:
    1
    Minecraft User:
    HotFireyDeath
    Hm,

    Can you try turning off the Flash-based uploader and see if that helps?

    Account->Preferences->uncheck 'Flash-based uploader'
  11. udwarf
    Offline

    udwarf Active Member

    Joined:
    Apr 17, 2016
    Posts:
    61
    Minecraft User:
    1Zaza
    Moreoverm with plugin DevTools installed you can just put source of your plugin in plugins/%PLUGINNAME% directory instead of having headache with phar's
  12. DmitryZhuk
    Offline

    DmitryZhuk New Member

    Joined:
    May 6, 2016
    Posts:
    15
    Minecraft User:
    dimulka72
    Yesterday, I install server from main. site.
    After that I go to (just that site tell http://forums.pocketmine.net/threads/latest-phar-and-php-binaries.16037/)
    got to https://bintray.com/pocketmine/PocketMine/PocketMine-MP-phar/view#files
    Got last version, that supports 0.14.x, and php.7.0
    But in this case I can't use DevTools. It says that "[Server thread/ERROR]: Could not load plugin 'DevTools': Incompatible API version"
    I'll try to use DevTools on my IM dev server. it works there :)

    Now I did phar by makeplugin command
    Here it is http://zhuk.cc/files/PM-zhManagedKits_v0.1.2.phar
    It don't want to be uploaded
  13. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Have you tried other browsers or even other computer/device?
  14. DmitryZhuk
    Offline

    DmitryZhuk New Member

    Joined:
    May 6, 2016
    Posts:
    15
    Minecraft User:
    dimulka72
    I didn't think why, but in IE I did it :p!!! In FireFox - can't.
    Will check why
    Primus likes this.
  15. DmitryZhuk
    Offline

    DmitryZhuk New Member

    Joined:
    May 6, 2016
    Posts:
    15
    Minecraft User:
    dimulka72
    Thanks a lot for your time.
    Primus likes this.
  16. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    No problem if you have any other problems feel free to ask but before you create a new thread, here's a tip: use search bar to avoid duplicates. Ouh, you can also ask me directly via PM, I'm here everyday ;)
    DmitryZhuk likes this.

Share This Page

Advertisement