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

Solved Updating plugins to API 3.0.0

Discussion in 'Plugin Help' started by JUSTaMod, Jun 28, 2018.

  1. JUSTaMod

    JUSTaMod Spider Jockey

    Messages:
    38
    GitHub:
    justamod
    I seem to have a reoccurring issue with older plugins that do things along these lines (Calling construct from PluginBase.)->

    abstract class classnamehere extends PluginBase implements CommandExecutor{

    public $plugin;

    public function __construct(pluginnamehere $plugin){
    $this->plugin = $plugin;
    }

    Which precedes to crash the server due to an incompatibility with Pocketmine's PluginBase "__construct" function.

    Now, I know this is due to the recent re-write of the plugin loaders - aka "Nuke Plugin Loaders from Orbit" here. But at this point I'm stumped on how I'd go about fixing this.

    One plugin for example - good ol' AdminFun here.

    Am I missing something obvious... probably. But, as always, any help is appreciated.
     
  2. JUSTaMod

    JUSTaMod Spider Jockey

    Messages:
    38
    GitHub:
    justamod
    God... ugh. Sorry about this but I seem to have had a revelation right after typing this. I've added in PluginCommand. It now "works" like -

    class classnamehere extends PluginCommand implements CommandExecutor{

    public function __construct(pluginnamehere $plugin){
    $this->plugin = $plugin;
    }

    Although the plugins need more work that that, I think I know what to do. I just couldn't get past that.

    Sorry about that everyone. Although... do let me know if that's not the right thing to do. I like to do things the right way.
     
  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.