Minifixio / pocketmine-1vs1-plugin

1vs1 pocketmine plugin for Minecraft Pocket Edition
Apache License 2.0
18 stars 38 forks source link

If a player quits while the game is running... #26

Closed robske110 closed 8 years ago

robske110 commented 8 years ago

...the other one will be tped to spawn. But if the other one rejoins he won't be tped there so he is stuck in the arena and has to issue /spawn...

Minifixio commented 8 years ago

Mmmm... I'm really sorry but I don't understand.

robske110 commented 8 years ago

Ok here in an better english: The Game is running. Player 1 wins the game (Player 2 is at the DEATH screen). Then the Player 1 is teleported to spawn. (Player 2 is still at the DEATH screen) Then Player 2 accidentally presses MAIN MENU instead of RESPAWN(Would bring him to spawn). After Player2 has pressed MAIN MENU (in the RESPAWN/DEATH screen) he rejoins. And then he is alive in the arena and is forced to do /spawn! He even could wait to the next game in that area!

Minifixio commented 8 years ago

Ok but pressing main menu is not included like disconnecting ?

robske110 commented 8 years ago

It is disconnecting! So you could use onLeave/Disconnect save the player in an array and onJoin check if the player is in this array and then teleport him to spawn

ghost commented 8 years ago

Use alwaysspawn plugin.

robske110 commented 8 years ago

Bug fixed in the pull request #28! Please merge it!

robske110 commented 8 years ago

Fixed