File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed
src/sergittos/bedwars/session Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change 11main : sergittos\bedwars\BedWars
22name : BedWars
33api : 5.0.0
4- version : 1.0.0
4+ version : 1.0.1
55author : Sergittos (@Sergittos)
66website : github.com/Sergittos
77description : 🛏️ A BedWars plugin for PocketMine-MP servers
Original file line number Diff line number Diff line change @@ -328,18 +328,7 @@ public function addEffect(EffectInstance $effect_instance): void {
328328 }
329329
330330 public function teleportToWaitingWorld (): void {
331- $ world = $ this ->game ->getMap ()->getWaitingWorld ();
332- foreach ($ world ->getPlayers () as $ player ) {
333- if (SessionFactory::getSession ($ player )->getGame ()?->getId() !== $ this ->game ?->getId()) {
334- $ this ->player ->hidePlayer ($ player );
335- $ player ->hidePlayer ($ this ->player );
336- } elseif (!$ this ->player ->canSee ($ player ) or !$ player ->canSee ($ this ->player )) {
337- $ this ->player ->showPlayer ($ player );
338- $ player ->showPlayer ($ this ->player );
339- }
340- }
341-
342- $ this ->player ->teleport ($ world ->getSafeSpawn ());
331+ $ this ->player ->teleport ($ this ->game ->getMap ()->getWaitingWorld ()->getSafeSpawn ());
343332 }
344333
345334 public function teleportToHub (): void {
@@ -349,12 +338,6 @@ public function teleportToHub(): void {
349338 $ this ->player ->setNameTag ($ this ->player ->getDisplayName ());
350339 $ this ->player ->teleport (Server::getInstance ()->getWorldManager ()->getDefaultWorld ()->getSafeSpawn ());
351340
352- foreach (Server::getInstance ()->getOnlinePlayers () as $ player ) {
353- if (!$ this ->player ->canSee ($ player )) {
354- $ this ->player ->showPlayer ($ player );
355- }
356- }
357-
358341 $ this ->clearInventories ();
359342 $ this ->setTrackingSession (null );
360343 $ this ->setScoreboard (new LobbyScoreboard ());
You can’t perform that action at this time.
0 commit comments