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

(Solved) [New api] Plugin will not load at all

Comments in 'Plugin Development' started by GlaciercreepsMC, Jul 28, 2014.

Thread Status:
Not open for further replies.
  1. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
    First of all, hello, its been a while :)
    Secondly, I've followed the plugin tutorial here. According to the tutorial it should load, even without putting the onEnable(), onDisable(), etc methods; however, this is not the case. For me it wont load at all, and I've tried using DevTools's /makeplugin.
    My workspace looks like this, and I'm using a Mac. My plugin.yml seems alright.
    I'm also using the beta build, 1.1.0 . Lastly, the workspace is in the /plugins folder. Everything seems to be in-check, but the console wont load the plugin.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The plugin isn't detected at all?
  3. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
    No, and to show how it is exactly: pic
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Strange. The full path is PocketMine-MP/plugins/TestPlugin/plugin.yml sure?
    LDX likes this.
  5. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
    Well, the github page said for it to be in the root (the "Source Files" folder), and so the plugin.yml is actually in the /plugins folder; I'll try moving it to where the .php file is.
  6. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
  7. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
    Also, my path looks like this, although just a minute ago I tried moving each the directories out and each time using /reload. Still not working.
  8. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    /reload doesn't work with folder plugins. You have to do stop and ./start.sh to reload folder plugins.
    GlaciercreepsMC likes this.
  9. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
    :O Didn't know, I'll try that and move around the directories again...
  10. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
    Wow, that seemed to work, now the console is saying it couldn't load the plugin, but I suppose that its because I dont have onEnable() added. Thanks! I'll keep this thread on for a bit longer if I have any more trouble.
    LDX likes this.
  11. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
    Ok, well it wasnt the onEnable(), but nothing worked so I recreated the project, with the folder in /plugins named TestPlugin. That fixed it! For others having trouble, make sure your project structure looks like this, with plugin.yml in the first folder, and the .php in the correct namespace.
    LDX likes this.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Make it like this:
    PocketMine-MP/plugins/TestPlugin/plugin.yml
    PocketMine-MP/plugins/TestPlugin/src/(your namespace)/TestPlugin.php
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The root directory should be a folder you created in the plugins directory, not the plugin directory itself. Otherwise how do you expect folder plugin loader to load multiple folder plugins?
  14. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    I already helped him.
  15. GlaciercreepsMC
    Offline

    GlaciercreepsMC Active Member Plugin Developer

    Joined:
    Jan 21, 2014
    Posts:
    91
    Plugins:
    1
    Minecraft User:
    GlaciercreepsMC
    Well, at least I know for sure thats how I'm supposed to set it up.
Thread Status:
Not open for further replies.

Share This Page

Advertisement