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
ErrorDocument 404 /error/404.php | |
ErrorDocument 503 /error/503.php | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/error/.*$ | |
RewriteCond %{REQUEST_FILENAME} !\.(css|js|png|ico)$ | |
# 好きなIP指定する | |
RewriteCond %{REMOTE_ADDR} !^192.168.0.0$ | |
RewriteRule ^.*$ - [R=503,L] | |
</IfModule> |
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
<Files *> | |
Order deny,allow | |
Deny from all | |
#For Apache 2.4 | |
#Require all denied | |
</Files> |
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); | |
use pocketmine\item\Item; | |
/** @var \pocketmine\Player $player */ | |
$count = 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); | |
namespace a; | |
use pocketmine\command\Command; | |
use pocketmine\command\CommandExecutor; | |
use pocketmine\command\CommandSender; |
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 author\plugin; | |
use Generator; | |
use pocketmine\command\Command; | |
use pocketmine\command\CommandSender; | |
use pocketmine\event\Listener; |
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
package pjz9n.exampleplugin; | |
import cn.nukkit.Player; | |
import cn.nukkit.command.Command; | |
import cn.nukkit.command.CommandSender; | |
import cn.nukkit.event.EventHandler; | |
import cn.nukkit.event.EventPriority; | |
import cn.nukkit.event.Listener; | |
import cn.nukkit.event.player.PlayerChatEvent; | |
import cn.nukkit.event.player.PlayerJoinEvent; |
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); |
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 | |
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); | |
//パターン1: 非同期で処理だけする | |
class Task1 extends \pocketmine\scheduler\AsyncTask | |
{ | |
/** @var string POST先URL */ | |
private const URL = "https://example.com/api"; |