Skip to content

Instantly share code, notes, and snippets.

@k-kawaa
Created May 28, 2020 01:36
Show Gist options
  • Save k-kawaa/fabd47ce8b4473ea487c4fd2af52e86a to your computer and use it in GitHub Desktop.
Save k-kawaa/fabd47ce8b4473ea487c4fd2af52e86a to your computer and use it in GitHub Desktop.
インベントリをkeepする
<?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