Skip to content

Instantly share code, notes, and snippets.

@PEMapModder
Created October 9, 2015 07:23
Show Gist options
  • Select an option

  • Save PEMapModder/1cbf9bfd64faceb4271e to your computer and use it in GitHub Desktop.

Select an option

Save PEMapModder/1cbf9bfd64faceb4271e to your computer and use it in GitHub Desktop.
<?php
class WithSubcommands extends Command{
public function __construct(Server $server){
parent::__construct(blah, blah, blah);
$this->map = new MySimpleCommandMap($server);
}
public function execute(CommandSender $sender, $label, $args){
$this->map->dispatch($sender, implode(" ", $args));
}
}
class MySimpleCommandMap{
public function __construct(Server $server){
$this->server = $server;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment