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

Plugin Updating

Discussion in 'Facepalm' started by XxCodeRedxX, Nov 22, 2017.

Thread Status:
Not open for further replies.
  1. XxCodeRedxX

    XxCodeRedxX Witch

    Messages:
    68
    Can someone help me out. I found an old plugin I used to use and this code needs updated with the current pocketmine.

    <?php

    namespace UltraHardCore\Commands;

    use UltraHardCore\Main;

    use pocketmine\command\Command;
    use pocketmine\command\CommandSender;
    use pocketmine\command\PluginIdentifiableCommand;

    class BaseCommand extends Command implements PluginIdentifiableCommand
    {
    private $plugin;
    public function __construct(Main $plugin, $name, $description, $usageMessage, $aliases)
    {
    parent::__construct($name, $description, $usageMessage, $aliases);
    $this->plugin = $plugin;
    }
    public function execute(CommandSender $sender, $commandLabel, array $args)
    {
    if ($this->testPermission($sender)) {
    $result = $this->onExecute($sender, $args);
    if (is_string($result)) {
    $sender->sendMessage($result);
    }
    return true;
    }
    return false;
    }
    public function onExecute(CommandSender $sender, array $args)
    {
    }
    public function getPlugin()
    {
    return $this->plugin;
    }
    }
     
  2. QuiverlyRivalry

    QuiverlyRivalry Zombie Pigman

    Messages:
    491
    GitHub:
    quiverlyrivalry
    is that legit all the plugin..?
     
    Sandertv likes this.
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    This section is not for requesting plugin updates.
     
Thread Status:
Not open for further replies.
  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.