mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Use CommandExecutor by default on plugins :P
This commit is contained in:
@@ -23,13 +23,14 @@
|
||||
* Plugin related classes
|
||||
*/
|
||||
namespace pocketmine\plugin;
|
||||
use pocketmine\command\CommandExecutor;
|
||||
|
||||
|
||||
/**
|
||||
* It is recommended to use PluginBase for the actual plugin
|
||||
*
|
||||
*/
|
||||
interface Plugin{
|
||||
interface Plugin extends CommandExecutor{
|
||||
|
||||
/**
|
||||
* Called when the plugin is loaded, before calling onEnable()
|
||||
|
@@ -22,9 +22,7 @@
|
||||
namespace pocketmine\plugin;
|
||||
|
||||
use pocketmine\command\Command;
|
||||
use pocketmine\command\CommandExecutor;
|
||||
use pocketmine\command\CommandSender;
|
||||
use pocketmine\command\PluginCommand;
|
||||
use pocketmine\command\PluginIdentifiableCommand;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\utils\Config;
|
||||
@@ -152,6 +150,18 @@ abstract class PluginBase implements Plugin{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CommandSender $sender
|
||||
* @param Command $command
|
||||
* @param string $label
|
||||
* @param array $args
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function onCommand(CommandSender $sender, Command $command, $label, array $args){
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
Reference in New Issue
Block a user