Fixed CPU leak

This commit is contained in:
Shoghi Cervantes
2014-10-31 21:05:37 +01:00
parent ae06681b60
commit 8601405a88
73 changed files with 304 additions and 564 deletions

View File

@ -122,7 +122,7 @@ class PharPluginLoader implements PluginLoader{
$plugin->setEnabled(true);
$this->server->getPluginManager()->callEvent(PluginEnableEvent::createEvent($plugin));
$this->server->getPluginManager()->callEvent(new PluginEnableEvent($plugin));
}
}
@ -133,7 +133,7 @@ class PharPluginLoader implements PluginLoader{
if($plugin instanceof PluginBase and $plugin->isEnabled()){
$this->server->getLogger()->info("Disabling " . $plugin->getDescription()->getFullName());
$this->server->getPluginManager()->callEvent(PluginDisableEvent::createEvent($plugin));
$this->server->getPluginManager()->callEvent(new PluginDisableEvent($plugin));
$plugin->setEnabled(false);
}