PocketMine-MP/src/plugin/Plugin.php
Dylan K. Taylor 52ce8ad8ae
Plugin: removed useless shit
Plugin is the interface by which the server core interacts with plugins, so it should be limited only to the stuff that the server actually uses.
These methods are still provided by PluginBase, so in 99.9% of cases there will be no BC break.
2021-03-25 19:17:16 +00:00

67 lines
1.9 KiB
PHP

<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
/**
* Plugin related classes
*/
namespace pocketmine\plugin;
use pocketmine\scheduler\TaskScheduler;
use pocketmine\Server;
/**
* It is recommended to use PluginBase for the actual plugin
*/
interface Plugin{
public function __construct(PluginLoader $loader, Server $server, PluginDescription $description, string $dataFolder, string $file, ResourceProvider $resourceProvider);
public function isEnabled() : bool;
/**
* Called by the plugin manager when the plugin is enabled or disabled to inform the plugin of its enabled state.
*
* @internal This is intended for core use only and should not be used by plugins
* @see PluginManager::enablePlugin()
* @see PluginManager::disablePlugin()
*/
public function onEnableStateChange(bool $enabled) : void;
/**
* Gets the plugin's data folder to save files and configuration.
* This directory name has a trailing slash.
*/
public function getDataFolder() : string;
public function getDescription() : PluginDescription;
public function getName() : string;
public function getLogger() : \AttachableLogger;
public function getPluginLoader() : PluginLoader;
public function getScheduler() : TaskScheduler;
}