mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Added fix so players aren't targeted by name completion by default
This commit is contained in:
parent
fd8166c836
commit
26c2f61da0
@ -232,7 +232,10 @@ class PlayerAPI{
|
||||
}
|
||||
|
||||
public function get($name, $alike = true){
|
||||
$name = strtolower($name);
|
||||
$name = trim(strtolower($name));
|
||||
if($name === ""){
|
||||
return false;
|
||||
}
|
||||
$CID = $this->server->query("SELECT ip,port FROM players WHERE name ".($alike === true ? "LIKE '%".$name."%'":"= '".$name."'").";", true);
|
||||
$CID = $this->server->clientID($CID["ip"], $CID["port"]);
|
||||
if(isset($this->server->clients[$CID])){
|
||||
|
Loading…
x
Reference in New Issue
Block a user