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); | |
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\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); | |
$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); | |
$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); | |
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 | |
$ax = 0; | |
$ay = 0; | |
$bx = 500; | |
$by = 660; | |
$x = ($ax + $bx) / 2; | |
$y = ($ay + $by) / 2; |
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 | |
/** | |
* Copyright (c) 2020 NewCore. | |
* | |
* This file is part of NewCore. | |
* | |
* NewCore is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
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 | |
/** | |
* Copyright (c) 2020 NewCore. | |
* | |
* This file is part of NewCore. | |
* | |
* NewCore is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
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 | |
class TestTask extends Task | |
{ | |
/** @var \Generator */ | |
private $generator; | |
public function __construct(\Generator $generator) | |
{ | |
$this->generator = $generator; |