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

How can i get my plugin to integrate With EconomyAPI and also how would that work?

Discussion in 'Development' started by WitheredFactions, Jan 18, 2018.

  1. WitheredFactions

    WitheredFactions Creeper

    Messages:
    3
    GitHub:
    david202020
    PHP:
    <?php
    namespace ShatteredGlassRP;
    use 
    pocketmine\Server;
    use 
    pocketmine\Player;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\event\Listener;
    class 
    Main extends PluginBase implements Listener {
       
        public function 
    onEnable()
        {
            
    $this->getServer()->getPluginManager()->registerEvents($this$this);
        }
       
        public function 
    onCommand(CommandSender $senderCommand $cmdstring $label, array $args): bool {
            switch(
    strtolower($cmd->getName())) {
               
                case 
    "shatter":
                    
    $sender->sendMessage("*Glass Breaks*");!
                    return 
    true;
                break;
               
                case 
    "safecrack":
                   
                    
    $sender->sendMessage("*You cracked the safe!!!!!*");
                    return 
    true;
                break;
           
               
                case 
    "lockpick":
                   
                    
    $sender->sendMessage("*You Picked The Lock!!!!*");
                    return 
    true;
                break;
               
            }
        }
       
        public function 
    onDisable() {
        }
       
    }
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    Please be descriptive
    like what do you want to do with the API?
    take money give money or what?
     
  3. WitheredFactions

    WitheredFactions Creeper

    Messages:
    3
    GitHub:
    david202020
    give money
    sorry about that
     
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    How is the code you posted in the OP relevant to the question?
     
  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.