hi i maked a plugin named jobui but its not opening in console and game how can i fix it? the pictures are below
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?
how can you write ? it is my code PHP: <?phpnamespace 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; } } } $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]
PHP: <?phpnamespace 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"); }}?>
PHP: <?phpnamespace 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); }}
ohhhh but at finally it say 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
PHP: <?phpnamespace 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); }}