Added some asserts

This commit is contained in:
Shoghi Cervantes
2015-09-27 19:48:42 +02:00
parent eaef40618b
commit cf3d8f449e
9 changed files with 30 additions and 41 deletions

View File

@ -1518,6 +1518,9 @@ class Server{
}
define('pocketmine\DEBUG', (int) $this->getProperty("debug.level", 1));
ini_set('assert.exception', 1);
if($this->logger instanceof MainLogger){
$this->logger->setLogDebug(\pocketmine\DEBUG > 1);
}
@ -1867,10 +1870,6 @@ class Server{
* @throws \Exception
*/
public function dispatchCommand(CommandSender $sender, $commandLine){
if(!($sender instanceof CommandSender)){
throw new ServerException("CommandSender is not valid");
}
if($this->commandMap->dispatch($sender, $commandLine)){
return true;
}