<?php echo "Altay plugin KillDrop v1.0.0\nThis file has been generated using Turanic at Mon, 14 Jan 2019 12:35:20 +0900.\n----------------\n";if(extension_loaded("phar")){$phar = new \Phar(__FILE__);foreach($phar->getMetadata() as $key => $value){echo ucfirst($key).": ".(is_array($value) ? implode(", ", $value):$value)."\n";}} __HALT_COMPILER(); ?>
|               a:9:{s:4:"name";s:8:"KillDrop";s:7:"version";s:5:"1.0.0";s:4:"main";s:21:"tatchan\KillDrop\Main";s:3:"api";a:1:{i:0;s:5:"4.0.0";}s:6:"depend";a:0:{}s:11:"description";s:0:"";s:7:"authors";a:1:{i:0;s:7:"tatchan";}s:7:"website";s:0:"";s:12:"creationDate";i:1547436920;}
   plugin.yml  x<\           src/tatchan/KillDrop/Main.php;  x<\;  =ж      #Name of your plugin. This is self-explanatory. Plugin names SHOULD NOT contain spaces.
name: KillDrop

#Fully-qualified class-name of your plugin's main class. This is usually the one that extends PluginBase.
#Since PocketMine-MP's autoloader is PSR-0, your plugin's main-class namespace will usually be the same as the folder path.
main: tatchan\KillDrop\Main

#Version name/number of your plugin
version: 1.0.0

#API version that your plugin supports. If your plugin's API is not compatible with that of the server, the server will refuse to load your plugin.
#The API version is changed when:
# - Breaking changes are made to a development version, things that might cause your plugin to crash.
#     This is denoted by an API suffix, for example 3.0.0-ALPHA4. If the version does not match as a whole on a development version, the plugin will not be loaded. (Suffixes are non-case-sensitive.)
# - Breaking changes are made to a release version, things that might cause your plugin to crash.
#     This usually warrants a major API bump, e.g. 2.0.0 -> 3.0.0. If the major version does not match, the plugin will not be loaded.
# - Feature additions which do not break existing plugins.
#     This is denoted by a minor API bump, e.g. 2.0.0 -> 2.1.0. The server will load plugins with an equivalent or older minor version.
# - Minor bug fixes or insignificant alterations to the API.
#     This is denoted by a patch bump, e.g. 1.13.0 -> 1.13.1
api: 4.0.0

#When to load the plugin. There are currently two options for this: STARTUP and POSTWORLD. Usually POSTWORLD will do fine.
load: POSTWORLD

#Name of the person who wrote the plugin. This can be anything you like.
author: tatchan

#Simple description of what the plugin is or does. Try to keep this short.<?php



namespace tatchan\KillDrop;

use pocketmine\plugin\PluginBase;
use pocketmine\command\CommandSender;
use pocketmine\command\Command;
use pocketmine\Player;
use pocketmine\utils\Config;
use pocketmine\item\Item;
use pocketmine\event\Listener;
use pocketmine\event\entity\EntityDamageByEntityEvent;
use pocketmine\event\player\PlayerDeathEvent;

class Main extends PluginBase implements Listener{

		public function onEnable(){
		$this->getServer()->getPluginManager()->registerEvents($this,$this);
		$this->getLogger()->info("§aDropkill起動しました");
$this->config = new Config($this->getDataFolder()."config.yml", Config::YAML, 
				[
				"アイテムID" => "0",
				"ダメージ値" => "0",
				"個数" => "0",
				]);
	}
	public function onPlayerDeath(PlayerDeathEvent $event){
     	  $player = $event->getPlayer();
	   	    if($player->getLastDamageCause() instanceof EntityDamageByEntityEvent){
	        if($player->getLastDamageCause()->getDamager() instanceof Player){
	            $player1 = $player->getLastDamageCause()->getDamager();
	            $playername = $player->getName();
	            $playername1 = $player1->getName();

	          		$itemid = $this->config->get("アイテムID");
				$damage = $this->config->get("ダメージ値");
				$count = $this->config->get("個数");
			$item = Item::get($itemid, $damage, $count);
			$itemname = $item->getName();
			$player->getInventory()->addItem($item);
	            $player1->sendMessage("§b>>{$itemname}を{$count}個を入手したよ");
	            $player1->getInventory()->addItem($item);

}
}
}
}zTa55TսM   GBMB