
<?php
echo "PocketMine-MP plugin nodrop v0.0.1
This file has been generated using DevTools v1.13.4 at Sat, 09 May 2020 18:37:21 +0900
----------------
";

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(); ?>
×             E  a:9:{s:4:"name";s:6:"nodrop";s:7:"version";s:5:"0.0.1";s:4:"main";s:19:"tatchan\nodrop\Main";s:3:"api";s:6:"3.11.8";s:6:"depend";s:0:"";s:11:"description";s:48:"ç‰¹å®šã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’ãƒ‰ãƒ­ãƒƒãƒ—ã•ã›ãªã„";s:7:"authors";s:0:"";s:7:"website";s:37:"https://github.com/TATCHAN0825/NoDrop";s:12:"creationDate";i:1589017041;}   LICENSE·  Ñy¶^·  vqÀ¨¶      
   plugin.ymlÐ  Ñy¶^Ð  aè¥£¶         src/tatchan/nodrop/Main.phpë	  Ñy¶^ë	  ;›O5¶      NYSL Version 0.9982
----------------------------------------

A. æœ¬ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã¯ Everyone'sWare ã§ã™ã€‚ã“ã®ã‚½ãƒ•ãƒˆã‚’æ‰‹ã«ã—ãŸä¸€äººä¸€äººãŒã€
   ã”è‡ªåˆ†ã®ä½œã£ãŸã‚‚ã®ã‚’æ‰±ã†ã®ã¨åŒã˜ã‚ˆã†ã«ã€è‡ªç”±ã«åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚

  A-1. ãƒ•ãƒªãƒ¼ã‚¦ã‚§ã‚¢ã§ã™ã€‚ä½œè€…ã‹ã‚‰ã¯ä½¿ç”¨æ–™ç­‰ã‚’è¦æ±‚ã—ã¾ã›ã‚“ã€‚
  A-2. æœ‰æ–™ç„¡æ–™ã‚„åª’ä½“ã®å¦‚ä½•ã‚’å•ã‚ãšã€è‡ªç”±ã«è»¢è¼‰ãƒ»å†é…å¸ƒã§ãã¾ã™ã€‚
  A-3. ã„ã‹ãªã‚‹ç¨®é¡žã® æ”¹å¤‰ãƒ»ä»–ãƒ—ãƒ­ã‚°ãƒ©ãƒ ã§ã®åˆ©ç”¨ ã‚’è¡Œã£ã¦ã‚‚æ§‹ã„ã¾ã›ã‚“ã€‚
  A-4. å¤‰æ›´ã—ãŸã‚‚ã®ã‚„éƒ¨åˆ†çš„ã«ä½¿ç”¨ã—ãŸã‚‚ã®ã¯ã€ã‚ãªãŸã®ã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚
       å…¬é–‹ã™ã‚‹å ´åˆã¯ã€ã‚ãªãŸã®åå‰ã®ä¸‹ã§è¡Œã£ã¦ä¸‹ã•ã„ã€‚

B. ã“ã®ã‚½ãƒ•ãƒˆã‚’åˆ©ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ç”Ÿã˜ãŸæå®³ç­‰ã«ã¤ã„ã¦ã€ä½œè€…ã¯
   è²¬ä»»ã‚’è² ã‚ãªã„ã‚‚ã®ã¨ã—ã¾ã™ã€‚å„è‡ªã®è²¬ä»»ã«ãŠã„ã¦ã”åˆ©ç”¨ä¸‹ã•ã„ã€‚

C. è‘—ä½œè€…äººæ ¼æ¨©ã¯ tatchan ã«å¸°å±žã—ã¾ã™ã€‚è‘—ä½œæ¨©ã¯æ”¾æ£„ã—ã¾ã™ã€‚

D. ä»¥ä¸Šã®ï¼“é …ã¯ã€ã‚½ãƒ¼ã‚¹ãƒ»å®Ÿè¡Œãƒã‚¤ãƒŠãƒªã®åŒæ–¹ã«é©ç”¨ã•ã‚Œã¾ã™ã€‚



NYSL Version 0.9982 (en) (Unofficial)
----------------------------------------
A. This software is "Everyone'sWare". It means:
  Anybody who has this software can use it as if he/she is
  the author.

  A-1. Freeware. No fee is required.
  A-2. You can freely redistribute this software.
  A-3. You can freely modify this software. And the source
      may be used in any software with no limitation.
  A-4. When you release a modified version to public, you
      must publish it with your name.

B. The author is not responsible for any kind of damages or loss
  while using or misusing this software, which is distributed
  "AS IS". No warranty of any kind is expressed or implied.
  You use AT YOUR OWN RISK.

C. Copyrighted to (tatchan)

D. Above three clauses are applied both to source and binary
  form of this software.#Name of your plugin. This is self-explanatory. Plugin names SHOULD NOT contain spaces.
name: nodrop

#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\nodrop\Main

#Version name/number of your plugin
version: 0.0.1

#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: 3.11.8

#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.
description: ç‰¹å®šã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’ãƒ‰ãƒ­ãƒƒãƒ—ã•ã›ãªã„

#Website for your plugin. This could be a GitHub repository URL, a website of your own, or anything you like. This is optional.
website: https://github.com/TATCHAN0825/NoDrop

#Commands that your plugin has. You can capture the execution of these via the `onCommand()` method in your PluginBase, or the registered CommandExecutor for the command.
#This node is optional and can be removed if your plugin will not have any commands.<?php

declare(strict_types=1);

namespace tatchan\nodrop;

use pocketmine\event\Listener;
use pocketmine\event\player\PlayerDropItemEvent;
use pocketmine\plugin\PluginBase;
use pocketmine\command\CommandSender;
use pocketmine\command\Command;
use pocketmine\event\Player\PlayerDataSaveEvent;
use pocketmine\utils\Config;
use pocketmine\event\block\BlockPlaceEvent;
use pocketmine\event\inventory\CraftItemEvent;
use pocketmine\event\inventory\InventoryTransactionEvent;
use pocketmine\event\inventory\FurnaceBurnEvent;
use pocketmine\item\Item;
use pocketmine\event\inventory\CraftingManager;
class Main extends PluginBase implements Listener{

    public function onEnable(): void{
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
        $this->config = new Config($this->getDataFolder() . "config.yml", Config::YAML);
    }

    public function ondrop(PlayerDropItemEvent $event){
        $id = $event->getItem()->getId();
        $damage = $event->getItem()->getDamage();
        if ($this->config->exists("{$id}:{$damage}")) {
            $event->getPlayer()->sendMessage("Â§c>>Â§fã“ã®ã‚¢ã‚¤ãƒ†ãƒ ã®ãƒ‰ãƒ­ãƒƒãƒ—ã¯ç¦æ­¢ã•ã‚Œã¦ã¾ã™");
            $event->setCancelled();
        }
    }

    public function oncraft(CraftItemEvent $event){
        $id = $event->getInputs();
        foreach ($id as $item) {
            $id = $item->getId();
            $damage = $item->getDamage();
            if ($this->config->exists("{$id}:{$damage}")) {
                $event->getPlayer()->sendMessage("Â§c>>Â§fã“ã®ã‚¢ã‚¤ãƒ†ãƒ ã®ã‚¯ãƒ©ãƒ•ãƒˆã¯ç¦æ­¢ã•ã‚Œã¦ã¾ã™");
                $event->setCancelled();
            }
        }
    }

    public function onplace(BlockPlaceEvent $event){
        $id = $event->getItem()->getId();
        $damage = $event->getItem()->getDamage();
        if ($this->config->exists("{$id}:{$damage}")) {
            $event->getPlayer()->sendMessage("Â§c>>Â§fã“ã®ã‚¢ã‚¤ãƒ†ãƒ ã®è¨­ç½®ã¯ç¦æ­¢ã•ã‚Œã¦ã¾ã™");
            $event->setCancelled();
        }
    }

    public function onchest(InventoryTransactionEvent $event){
        foreach ($event->getTransaction()->getActions() as $act) {

            if ($this->getConfig()->exists("{$act->getTargetItem()->getID()}:{$act->getTargetItem()->getDamage()}")) {
                $event->setCancelled();
                $event->getTransaction()->getSource()->getPlayer()->sendMessage("Â§c>>Â§fã“ã®ã‚¢ã‚¤ãƒ†ãƒ ã®ç²¾éŒ¬ã€ãƒã‚§ã‚¹ãƒˆã«é ã‘ã‚‹ã®ã¯ç¦æ­¢ã•ã‚Œã¦ã„ã¾ã™");
            }
        }
    }
}

2Š9o1 a½ë!¦÷“]¸   GBMB