Merge branch 'master' into multiversion

This commit is contained in:
yefengeeeeeeeeeee 2025-04-14 20:36:35 +08:00 • committed by GitHub
commit 3e438cf8ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
49 changed files with 2123 additions and 1161 deletions

View file

@ -327,6 +327,17 @@ class PlayerAPI{
return $o;
}
/**
* @return int
*/
public static function decodeProtocol($ip){
foreach(ServerAPI::request()->clients as $p) {
if($p->ip == $ip){
return $p->PROTOCOL;
}
}
}
public function add($CID){
if(isset($this->server->clients[$CID])){
$player = $this->server->clients[$CID];