fixing teleportation issues.

This commit is contained in:
Sarah 2015-11-27 22:29:29 +01:00
parent fd0c5cf273
commit ad54d28b0d
2 changed files with 12 additions and 3 deletions

View File

@ -72,8 +72,8 @@ public abstract class GameTutorial
if(_currentPhase == null)
{
onEnd();
endTutorial();
_hasEnded = true;
endTutorial();
Manager.getPluginManager().callEvent(new GameTutorialEndEvent(this));
}
else
@ -97,8 +97,17 @@ public abstract class GameTutorial
player.setAllowFlight(false);
player.setFlying(false);
if(TeleportOnEnd)
{
Manager.runSyncLater(new Runnable()
{
@Override
public void run()
{
_team.SpawnTeleport();
}
}, 5);
}
}
Manager.GetChat().Silence(StartAfterTutorial, false);
Manager.GetGame().PrepareTime = (System.currentTimeMillis() - Manager.GetGame().GetStateTime()) + StartAfterTutorial;
}

View File

@ -64,7 +64,7 @@ public abstract class TutorialPhase
@Override
public void run()
{
while(!_hasEnded)
while(!_hasEnded && !getTutorial().hasEnded())
{
_tutorial.Manager.runSync(new Runnable()
{