fixing some timings.

This commit is contained in:
Sarah 2015-12-06 21:48:21 +01:00
parent 35534afd4a
commit 64f8ee7280

View File

@ -83,11 +83,19 @@ public abstract class GameTutorial
onEnd();
_hasEnded = true;
endTutorial();
Manager.getPluginManager().callEvent(new GameTutorialEndEvent(this));
final GameTutorial tutorial = this;
Manager.runSyncLater(new Runnable()
{
@Override
public void run()
{
Manager.getPluginManager().callEvent(new GameTutorialEndEvent(tutorial));
}
}, 5);
}
else
{
Manager.GetChat().Silence(7000, false);
Manager.GetChat().Silence(70000, false);
onPhaseChange(_currentPhase);
Manager.getPluginManager().callEvent(new GameTutorialPhaseEvent(this, from, _currentPhase));
_currentPhase.start(phaseOne);
@ -101,11 +109,18 @@ public abstract class GameTutorial
private void endTutorial()
{
for(Player player : _players.keySet())
for(final Player player : _players.keySet())
{
VisibilityManager.Instance.setVisibility(player, true, UtilServer.getPlayers());
player.setAllowFlight(false);
player.setFlying(false);
Manager.runSyncLater(new Runnable()
{
@Override
public void run()
{
player.setAllowFlight(false);
player.setFlying(false);
}
}, 5);
if(TeleportOnEnd)
{
Manager.runSyncLater(new Runnable()