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); | |
| class selectForm implements \pocketmine\form\Form | |
| { | |
| public function handleResponse(\pocketmine\Player $player, $data): void | |
| { | |
| if ($data === null) { |
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); | |
| $form = new \jojoe77777\FormAPI\SimpleForm(function (\pocketmine\Player $player, $data): void { | |
| if ($data === null) { | |
| //閉じられた | |
| return; | |
| } | |
| switch ($data) { |
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); | |
| $label = "pay";//送金コマンド | |
| $args = [ | |
| "hoge",//名前 | |
| "-1"//金額 | |
| ]; |
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 sample; | |
| use pocketmine\command\Command; | |
| use pocketmine\command\CommandExecutor; | |
| use pocketmine\command\CommandSender; | |
| use pocketmine\command\PluginCommand; |
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 sample; | |
| use pocketmine\plugin\PluginBase; | |
| class Main extends PluginBase | |
| { |
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 sample; | |
| use pocketmine\level\generator\GeneratorManager; | |
| use pocketmine\level\generator\normal\Normal; | |
| use pocketmine\plugin\PluginBase; |
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); | |
| //パターン1: 非同期で処理だけする | |
| class Task1 extends \pocketmine\scheduler\AsyncTask | |
| { | |
| /** @var string POST先URL */ | |
| private const URL = "https://example.com/api"; |
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); | |
| /** | |
| * @name ParticleTest | |
| * @version 1.0.0 | |
| * @main PJZ9n\ParticleTest\Main | |
| * @api 3.11.0 | |
| */ |
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); | |
| /** @var \pocketmine\plugin\Plugin $this */ | |
| $config = new \pocketmine\utils\Config($this->getDataFolder() . "config.yml", \pocketmine\utils\Config::YAML, [ | |
| "cooldowntick" => 10, | |
| ]); |
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 | |
| /** | |
| * @name Particle | |
| * @version 1.0.0 | |
| * @main PJZ9n\Particle\Main | |
| * @api 3.0.0 | |
| */ | |
| declare(strict_types=1); |