Created
May 28, 2020 01:36
-
-
Save k-kawaa/fabd47ce8b4473ea487c4fd2af52e86a to your computer and use it in GitHub Desktop.
インベントリをkeepする
This file contains 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 | |
namespace KeepInventory\apartkktrain; | |
use pocketmine\plugin\PluginBase; | |
use pocketmine\event\Listener; | |
use pocketmine\event\player\PlayerDeathEvent; | |
class Main extends PluginBase implements Listener | |
{ | |
public function onEnable() | |
{ | |
$this->getServer()->getPluginManager()->registerEvents($this, $this); | |
} | |
public function onDeath(PlayerDeathEvent $event) | |
{ | |
$event->setKeepInventory(true); | |
} | |
} | |
///Altayでは使用不可。ゲームルールで変更できたはず |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment