mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +00:00
Added option to not kick players on duplicate names
This commit is contained in:
parent
0a7d9f1c87
commit
7a163f9ea5
@ -1317,7 +1317,7 @@ class Player extends Human implements CommandSender, IPlayer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach($this->server->getOnlinePlayers() as $p){
|
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");
|
$p->close($p->getName() . " has left the game", "logged in from another location");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user