File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -447,6 +447,7 @@ public function PlayerDeath(PlayerDeathEvent $event){
447447 {
448448 if (isset ($ this ->players [$ event ->getEntity ()->getName ()]))
449449 {
450+ $ this ->ClearInv ($ event ->getEntity ());
450451 unset($ this ->players [$ event ->getEntity ()->getName ()]);
451452 if (count ($ this ->players )>1 )
452453 {
@@ -588,6 +589,7 @@ public function gameTimber(){
588589 $ p ->teleport ($ this ->signlevel ->getSpawnLocation ());
589590 unset($ pl ,$ p );
590591 }
592+ $ this ->clearChest ();
591593 $ this ->players =array ();
592594 $ this ->gameStatus =0 ;
593595 $ this ->lastTime =0 ;
@@ -597,6 +599,8 @@ public function gameTimber(){
597599 Server::getInstance ()->broadcastMessage ("" ); // DELETED
598600 $ this ->gameStatus =0 ;
599601 $ this ->lastTime =0 ;
602+ $ this ->clearChest ();
603+ $ this ->ClearAllInv ();
600604 }
601605 }
602606 if ($ this ->gameStatus ==3 )
@@ -675,6 +679,7 @@ public function gameTimber(){
675679 $ p ->setHealth (25 );
676680 unset($ p ,$ pl );
677681 }
682+ $ this ->clearChest ();
678683 //$this->ClearAllInv();
679684 $ this ->players =array ();
680685 $ this ->gameStatus =0 ;
@@ -1158,6 +1163,7 @@ public function PlayerQuit(PlayerQuitEvent $event){
11581163 if (isset ($ this ->players [$ event ->getPlayer ()->getName ()]))
11591164 {
11601165 unset($ this ->players [$ event ->getPlayer ()->getName ()]);
1166+ $ this ->ClearInv ($ event ->getPlayer ());
11611167 $ event ->getPlayer ()->sendMessage (TextFormat::RED . "[ {$ this ->getConfig ()->get ("prefix " )}] " .$ event ->getPlayer ()->getName ()." left the match. " );
11621168 $ this ->changeStatusSign ();
11631169 if ($ this ->gameStatus ==1 && count ($ this ->players )<2 )
You can’t perform that action at this time.
0 commit comments