text: <?php
  namespace pocketmine\plugin;
  
  use pocketmine\event\Event;
  use pocketmine\event\Listener;
  
  class MethodEventExecutor implements EventExecutor{
  
  	private $method;
  
  	public function __construct($method){
  		$this->method = $method;
  	}
  
  	public function execute(Listener $listener, Event $event){
  		$listener->{$this->getMethod()}($event);
  	}
  
  	public function getMethod(){
  		return $this->method;
  	}
  }