mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
Fixed clearQueue() action not being deleted
This commit is contained in:
parent
41084f51a6
commit
c73c1eb806
1 changed files with 4 additions and 1 deletions
|
|
@ -899,8 +899,11 @@ class Player{
|
||||||
public function getBandwidth(){
|
public function getBandwidth(){
|
||||||
return array_sum($this->bandwidthStats) / max(1, count($this->bandwidthStats));
|
return array_sum($this->bandwidthStats) / max(1, count($this->bandwidthStats));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearQueue(){
|
public function clearQueue(){
|
||||||
|
if($this->connected === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ksort($this->received);
|
ksort($this->received);
|
||||||
if(($cnt = count($this->received)) > PLAYER_MAX_QUEUE){
|
if(($cnt = count($this->received)) > PLAYER_MAX_QUEUE){
|
||||||
foreach($this->received as $c => $t){
|
foreach($this->received as $c => $t){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue