mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Assume the player is online when they are, uh, assumed to be online
the checks removed here should never be hit under normal circumstances. If they were hit, they'd just conceal bugs which would cause a crash to happen later anyway.
This commit is contained in:
@ -24,12 +24,14 @@ declare(strict_types=1);
|
||||
namespace pocketmine\scheduler;
|
||||
|
||||
use pocketmine\network\mcpe\protocol\ProtocolInfo;
|
||||
use pocketmine\Player;
|
||||
use pocketmine\Server;
|
||||
use pocketmine\utils\Internet;
|
||||
use pocketmine\utils\Process;
|
||||
use pocketmine\utils\Utils;
|
||||
use pocketmine\utils\UUID;
|
||||
use pocketmine\utils\VersionString;
|
||||
use function array_map;
|
||||
use function array_values;
|
||||
use function count;
|
||||
use function json_encode;
|
||||
@ -122,12 +124,7 @@ class SendUsageTask extends AsyncTask{
|
||||
$playerList[$k] = md5($v);
|
||||
}
|
||||
|
||||
$players = [];
|
||||
foreach($server->getOnlinePlayers() as $p){
|
||||
if($p->isOnline()){
|
||||
$players[] = md5($p->getUniqueId()->toBinary());
|
||||
}
|
||||
}
|
||||
$players = array_map(function(Player $p){ return md5($p->getUniqueId()->toBinary()); }, $server->getOnlinePlayers());
|
||||
|
||||
$data["players"] = [
|
||||
"count" => count($players),
|
||||
|
Reference in New Issue
Block a user