Added option to not kick players on duplicate names

This commit is contained in:
williamtdr 2014-04-03 18:06:10 -05:00
parent 0a7d9f1c87
commit 7a163f9ea5

View File

@ -1317,7 +1317,7 @@ class Player extends Human implements CommandSender, IPlayer{
}
foreach($this->server->getOnlinePlayers() as $p){
if($p !== $this and strtolower($p->getName()) === strtolower($this->getName())){
if($p !== $this and strtolower($p->getName()) === strtolower($this->getName()) && $this->server->getConfigBoolean("kick-duplicate-names",true)){
$p->close($p->getName() . " has left the game", "logged in from another location");
}
}
@ -2673,4 +2673,4 @@ if(is_numeric($data["cause"])){
}
}
Player::broadcastMessage($data["player"]->getName() . $message);
*/
*/