
<?php
echo "PocketMine-MP plugin height v1.0.0
This file has been generated using DevTools v1.13.0 at Wed, 15 Jul 2020 00:50:22 +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(); ?>
                a:9:{s:4:"name";s:6:"height";s:7:"version";s:5:"1.0.0";s:4:"main";s:10:"saito\Main";s:3:"api";s:5:"3.0.0";s:6:"depend";s:0:"";s:11:"description";s:24:"身長を変えます。";s:7:"authors";s:0:"";s:7:"website";s:0:"";s:12:"creationDate";i:1594741822;}
   plugin.yml   >_   ;1         src/saito/Form/HEIGHTFORM.php  >_  .Ʈi         src/saito/Main.php  >_  4i      name: height
main: saito\Main
version: 1.0.0
api: 3.0.0
load: POSTWORLD
author: saito
description: 身長を変えます。

commands:
  height:
    description: 身長を変えます。
    usage: /height
    permission: op<?php

namespace saito\Form;

use pocketmine\Player;
use pocketmine\plugin\PluginBase;
use pocketmine\Server;
use pocketmine\utils\Config;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\Listener;
use saito\Form\HEIGHTFORM;
use pocketmine\entity\Entity;
use pocketmine\form\Form;

class HEIGHTFORM implements Form{



  public function __construct($sc)
  {
     $this->sc = $sc;
  }
    public function handleResponse(Player $player, $data): void
    {
        $server = Server::getInstance();
        if ($data === null) {
            return;
        }
        $ssc = $data[1];
        $steps = ["0.1","0.5","1.0","1.5","1.8","2.0","3.0","4.0","5.0","10.0","20.0","50.0","75.0","100.0"];

        if($player instanceof Player){
        $player->setScale($steps[$data[1]]);
        $player->sendMessage("身長を".$steps[$data[1]]."にしました。");
    }
}
    function jsonSerialize()
{

    return [
        'type' => 'custom_form',
        'title' => 'HEIGHTFORM',
        'content' => [

            [
                'type' => 'label',
                'text' => 'あなたの今の身長 : '.$this->sc
            ],
            [
                'type' => 'step_slider',
                'text' => '身長、何cmにします？',
                'steps' => ["0.1","0.5","1.0","1.5","1.8","2.0","3.0","4.0","5.0","10.0","20.0","50.0","75.0","100.0"],
                'default' => 4
            ]

        ]
    ];
}
}<?php

namespace saito;

use pocketmine\Player;
use pocketmine\plugin\PluginBase;
use pocketmine\Server;
use pocketmine\utils\Config;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\Listener;
use saito\Form\HEIGHTFORM;
use pocketmine\form\Form;
use pocketmine\entity\Entity;

class Main extends PluginBase implements Listener
{
    public function onEnable(): void
    {
        $this->getServer()->getPluginManager()->registerEvents($this, $this);
    }
    public function onCommand(CommandSender $sender, Command $command, string $label, array $args): bool {
        $sc = $sender->getScale();
        if($sender instanceof Player){
            $sender->sendForm(new HEIGHTFORM($sc));
            return true;
        } else {
            $sender->sendMessage("ゲーム内で実行してネ！");
            return false;
        }
    }
}aҭc-c&U؝ɥ   GBMB