Created
May 9, 2020 06:42
-
-
Save PJZ9n/dc909956fba916de9329bbee4a1053ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace a; | |
use pocketmine\command\Command; | |
use pocketmine\command\CommandExecutor; | |
use pocketmine\command\CommandSender; | |
class test implements CommandExecutor | |
{ | |
public function onCommand(CommandSender $sender, Command $command, string $label, array $args): bool | |
{ | |
switch ($label) {//まずは最初の部分( />slot< abc )で分岐 | |
case "slot": | |
switch ($args[0]) {//次の部分で( /slot >abc< )で分岐 | |
case "syouyu": | |
//適当な処理 | |
return true; | |
case "yurisi": | |
//適当な処理 | |
return true; | |
} | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment