Hello PMMP Forum! I want to make a command that when you send it for the first time make thing and when i send it for the second time make thing else, and when i send it for the third one its back like you send it for the first time, So how i can make it? i am sorry if my english is bad
PHP: <?phpuse pocketmine\command\Command;use pocketmine\command\CommandExecutor;use pocketmine\command\CommandSender;use pocketmine\plugin\PluginBase;class Commands extends PluginBase implements CommandExecutor { private $plugin; private $status = false; public function __construct(YourPlugin $plugin){ $this->plugin = $plugin; } public function onCommand(CommandSender $sender, Command $cmd, $label, array $args) : bool { if($this->status){ //Do the first thing here... }else{ //Do the other thing here... } $this->status = !$this->status; return true; }}