fixed getPlayer

This commit is contained in:
Steffen Schröder 2014-05-15 19:30:44 +02:00
parent 0ca8793a58
commit f7070a51e1

View File

@ -357,11 +357,14 @@ class PlayerManager implements CallbackListener, TimerListener {
/**
* Get a Player by Login
*
* @param string $login
* @param mixed $login
* @param bool $connectedPlayersOnly
* @return Player
*/
public function getPlayer($login, $connectedPlayersOnly = false) {
if ($login instanceof Player) {
return $login;
}
if (!isset($this->players[$login])) {
if ($connectedPlayersOnly) {
return null;