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

plugin not reading

Discussion in 'Plugin Help' started by amirTBM, Jan 29, 2020.

  1. amirTBM

    amirTBM Spider Jockey

    Messages:
    27
    GitHub:
    we
    hi i maked a plugin named jobui but its not opening in console and game how can i fix it? the pictures are below
     

    Attached Files:

  2. Asanino

    Asanino Spider

    Messages:
    14
    So, first of all check if there is any plugin that makes DevTools disable. If yes obviously it is not reading if DevTools got disabled.


    Btw ; on namespace?
     
    Last edited: Jan 29, 2020
    amirTBM likes this.
  3. amirTBM

    amirTBM Spider Jockey

    Messages:
    27
    GitHub:
    we
    i fix 99% of it but it say in finally
     

    Attached Files:

  4. Asanino

    Asanino Spider

    Messages:
    14
    It must be an function. Example: public function onUI after the on command
     
  5. amirTBM

    amirTBM Spider Jockey

    Messages:
    27
    GitHub:
    we
    how can you write ?

    it is my code

    PHP:
    <?php

    namespace amirTBMuse\main;

        
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\entity\Effect;
    use 
    pocketmine\entity\EffectInstance;
    use 
    pocketmine\Player;
    use 
    pocketmine\Server;
    use 
    pocketmine\plugin\PluginBase;

    use 
    ArtinCracker\forms_by_jojoe\{SimpleFormCustomForm};

    use 
    EconomyJob\src\onebone\economyjob\{economyjob};

    class 
    main extends pluginbase implements Listener {
        
    public function 
    onenable(){
        
    $this->getLogger()->info("jobui enabled");
        
    $this->getServer()->getPluginManager()->registerEvents($this$this);
    }

    public function 
    onCommand(CommandSender $senderCommand $cmdstring $label, array $args):bool{
        switch(
    $cmd->getname()){
            case 
    "jobui":
             if(!(
    $sender instanceof Player)){
                if(
    $sender->hasPermission("donator.ui")){
                    
    $sender->sendMessage("ยง7This command can't be used here. Sorry!");
                    return 
    true;
                }
             }
        }
             
    $form = new SimpleForm(function (Player $sender$data){
                
    $result $data;
                if (
    $result == null) {
                }
                switch(
    $result){
                    case 
    0:
                    
    $sender->addtitle("hi");
                    break;
                }
            
            
    $form->setTitle("jobui");
            
    $form->setContent("by amir");
            
    $form->addButton("ยง4miner");
             }
    }




    ?>
    [/QUOTE]
     
  6. Asanino

    Asanino Spider

    Messages:
    14
    PHP:
    <?php

    namespace amirTBMuse\main;

        
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\entity\Effect;
    use 
    pocketmine\entity\EffectInstance;
    use 
    pocketmine\Player;
    use 
    pocketmine\Server;
    use 
    pocketmine\plugin\PluginBase;

    use 
    ArtinCracker\forms_by_jojoe\{SimpleFormCustomForm};

    use 
    EconomyJob\src\onebone\economyjob\{economyjob};

    class 
    main extends pluginbase implements Listener {
        
    public function 
    onenable(){
        
    $this->getLogger()->info("jobui enabled");
        
    $this->getServer()->getPluginManager()->registerEvents($this$this);
    }

    public function 
    onCommand(CommandSender $senderCommand $cmdstring $label, array $args):bool{
        switch(
    $cmd->getname()){
            case 
    "jobui":
             if(!(
    $sender instanceof Player)){
                if(
    $sender->hasPermission("donator.ui")){
                    
    $sender->sendMessage("ยง7This command can't be used here. Sorry!");
                    return 
    true;
                }
             }
        }

    public function 
    OnUI($target){
             
    $form = new SimpleForm(function (Player $sender$data){
                
    $result $data;
                if (
    $result == null) {
                }
                switch(
    $result){
                    case 
    0:
                    
    $sender->addtitle("hi");
                    break;
                }
            
            
    $form->setTitle("jobui");
            
    $form->setContent("by amir");
            
    $form->addButton("ยง4miner");
             }
    }




    ?>
     
  7. amirTBM

    amirTBM Spider Jockey

    Messages:
    27
    GitHub:
    we
    so what did you do? =\
     
  8. Fadhel

    Fadhel Witch

    Messages:
    68
    GitHub:
    dimbis
    PHP:
    <?php

    namespace amirTBMuse\main;
       
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\entity\Effect;
    use 
    pocketmine\entity\EffectInstance;
    use 
    pocketmine\Player;
    use 
    pocketmine\Server;
    use 
    pocketmine\plugin\PluginBase;

    use 
    ArtinCracker\forms_by_jojoe\{SimpleFormCustomForm};

    use 
    EconomyJob\src\onebone\economyjob\{economyjob};

    class 
    main extends pluginbase implements Listener {
       
    public function 
    onenable(){
        
    $this->getLogger()->info("jobui enabled");
        
    $this->getServer()->getPluginManager()->registerEvents($this$this);
    }

    public function 
    onCommand(CommandSender $senderCommand $cmdstring $label, array $args):bool{
        switch(
    $cmd->getname()){
            case 
    "jobui":
             if(!(
    $sender instanceof Player)){
                if(
    $sender->hasPermission("donator.ui")){
                    
    $sender->sendMessage("ยง7This command can't be used here. Sorry!");
                    return 
    true;
                }
             }
        }

    public function 
    OnUI($target){
             
    $form = new SimpleForm(function (Player $sender$data){
                
    $result $data;
                if (
    $result == null) {
                }
                switch(
    $result){
                    case 
    0:
                    
    $sender->addtitle("hi");
                    break;
                }     
            
    $form->setTitle("jobui");
            
    $form->setContent("by amir");
            
    $form->addButton("ยง4miner");
            
    $form->sendToPlayer($target);
             }
    }
     
    amirTBM and Asanino like this.
  9. amirTBM

    amirTBM Spider Jockey

    Messages:
    27
    GitHub:
    we
    ohhhh but at finally it say

    [​IMG]
    FadhelSpider Jockey
    New
    PHP:
    <?php

    namespace amirTBMuse\main;

    use pocketmine\command\Command;
    use pocketmine\command\CommandSender;
    use pocketmine\event\Listener;
    use pocketmine\entity\Effect;
    use pocketmine\entity\EffectInstance;
    use pocketmine\Player;
    use pocketmine\Server;
    use pocketmine\plugin\PluginBase;

    use ArtinCracker\forms_by_jojoe\{SimpleForm, CustomForm};

    use EconomyJob\src\onebone\economyjob\{economyjob};

    class main extends pluginbase implements Listener {

    public function onenable(){
    $this->getLogger()->info("jobui enabled");
    $this->getServer()->getPluginManager()->registerEvents($this, $this);
    }

    public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args):bool{
    switch($cmd->getname()){
    case "jobui":
    if(!($sender instanceof Player)){
    if($sender->hasPermission("donator.ui")){
    $sender->sendMessage("ยง7This command can't be used here. Sorry!");
    return true;
    }
    }
    }

    public function OnUI($target){
    $form = new SimpleForm(function (Player $sender, $data){
    $result = $data;
    if ($result == null) {
    }
    switch($result){
    case 0:
    $sender->addtitle("hi");
    break;
    }
    $form->setTitle("jobui");
    $form->setContent("by amir");
    $form->addButton("ยง4miner");
    $form->sendToPlayer($target);
    }
    }
    but at finally it say
     

    Attached Files:

  10. Fadhel

    Fadhel Witch

    Messages:
    68
    GitHub:
    dimbis
    PHP:
    <?php

    namespace amirTBMuse\main;
       
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\entity\Effect;
    use 
    pocketmine\entity\EffectInstance;
    use 
    pocketmine\Player;
    use 
    pocketmine\Server;
    use 
    pocketmine\plugin\PluginBase;

    use 
    ArtinCracker\forms_by_jojoe\{SimpleFormCustomForm};

    use 
    EconomyJob\src\onebone\economyjob\{economyjob};

    class 
    main extends pluginbase implements Listener {
       
    public function 
    onenable(){
        
    $this->getLogger()->info("jobui enabled");
        
    $this->getServer()->getPluginManager()->registerEvents($this$this);
    }

    public function 
    onCommand(CommandSender $senderCommand $cmdstring $label, array $args):bool{
        switch(
    $cmd->getname()){
            case 
    "jobui":
             if(!(
    $sender instanceof Player)){
                if(
    $sender->hasPermission("donator.ui")){
                    
    $sender->sendMessage("ยง7This command can't be used here. Sorry!");
                    return 
    true;
                }
             }
        }

    public function 
    OnUI($target){
             
    $form = new SimpleForm(function (Player $sender$data){
                
    $result $data;
                if (
    $result == null) {
                }
                switch(
    $result){
                    case 
    0:
                    
    $sender->addtitle("hi");
                    break;
                }
           };  
            
    $form->setTitle("jobui");
            
    $form->setContent("by amir");
            
    $form->addButton("ยง4miner");
            
    $form->sendToPlayer($target);
             }
    }
     
    Asanino likes this.
  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.