Fix join/quit messages.

This commit is contained in:
William Burns 2016-04-02 11:08:40 +01:00
parent 6072753624
commit 15cf7f574d

View File

@ -594,20 +594,17 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
return; return;
} }
if (event.getJoinMessage() != null) event.setJoinMessage(null);
for (Player other : UtilServer.getPlayers())
{ {
event.setJoinMessage(null); if (_tutorialManager.isInTutorial(other))
for (Player other : UtilServer.getPlayers())
{ {
if (_tutorialManager.isInTutorial(other)) // Don't display join message if player in tutorial.
{ continue;
// Don't display join message if player in tutorial.
continue;
}
other.sendMessage(F.sys("Join", event.getPlayer().getName()));
} }
other.sendMessage(F.sys("Join", event.getPlayer().getName()));
} }
} }
@ -620,20 +617,17 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
return; return;
} }
if (event.getQuitMessage() != null) event.setQuitMessage(null);
for (Player other : UtilServer.getPlayers())
{ {
event.setQuitMessage(null); if (_tutorialManager.isInTutorial(other))
for (Player other : UtilServer.getPlayers())
{ {
if (_tutorialManager.isInTutorial(other)) // Don't display quit message if player in tutorial.
{ continue;
// Don't display quit message if player in tutorial.
continue;
}
other.sendMessage(F.sys("Quit", event.getPlayer().getName()));
} }
other.sendMessage(F.sys("Quit", event.getPlayer().getName()));
} }
} }