From 6077190a628edb133a05de41efbb81f813629de1 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 22 Aug 2014 17:43:29 +0200 Subject: [PATCH] Deprecated Server::loadPlugin(Plugin) in favor of Server::enablePlugin(Plugin) --- src/pocketmine/PocketMine.php | 2 +- src/pocketmine/Server.php | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index d2243b95c..5c3a9c27f 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -73,7 +73,7 @@ namespace pocketmine { use raklib\RakLib; const VERSION = "Alpha_1.4dev"; - const API_VERSION = "1.3.0"; + const API_VERSION = "1.3.1"; const CODENAME = "絶好(Zekkou)ケーキ(Cake)"; const MINECRAFT_VERSION = "v0.9.5 alpha"; diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index 28bc1ee9e..9dd32ab25 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -1646,7 +1646,7 @@ class Server{ public function enablePlugins($type){ foreach($this->pluginManager->getPlugins() as $plugin){ if(!$plugin->isEnabled() and $plugin->getDescription()->getOrder() === $type){ - $this->loadPlugin($plugin); + $this->enablePlugin($plugin); } } @@ -1659,10 +1659,19 @@ class Server{ /** * @param Plugin $plugin */ - public function loadPlugin(Plugin $plugin){ + public function enablePlugin(Plugin $plugin){ $this->pluginManager->enablePlugin($plugin); } + /** + * @param Plugin $plugin + * + * @deprecated + */ + public function loadPlugin(Plugin $plugin){ + $this->enablePlugin($plugin); + } + public function disablePlugins(){ $this->pluginManager->disablePlugins(); }