Moved network ids to constants, improved some entity methods, more performance

This commit is contained in:
Shoghi Cervantes
2015-05-30 23:59:24 +02:00
parent 32680843fa
commit 9e14435dbb
58 changed files with 197 additions and 436 deletions

View File

@@ -1408,7 +1408,7 @@ class Server{
public function addOp($name){
$this->operators->set(strtolower($name), true);
if(($player = $this->getPlayerExact($name)) instanceof Player){
if(($player = $this->getPlayerExact($name)) !== null){
$player->recalculatePermissions();
}
$this->operators->save(true);
@@ -1420,7 +1420,7 @@ class Server{
public function removeOp($name){
$this->operators->remove(strtolower($name));
if(($player = $this->getPlayerExact($name)) instanceof Player){
if(($player = $this->getPlayerExact($name)) !== null){
$player->recalculatePermissions();
}
$this->operators->save();