This commit is contained in:
Ben 2016-03-11 19:03:32 +00:00
parent a27fb90c2a
commit 86c50cc3cd
3 changed files with 18 additions and 16 deletions

View File

@ -64,12 +64,6 @@ public class IncognitoManager extends MiniClientPlugin<IncognitoClient>
{ {
other.showPlayer(caller); other.showPlayer(caller);
} }
UtilServer.broadcast(F.sys("Join", caller.getName()));
}
else
{
UtilServer.broadcast(F.sys("Quit", caller.getName()));
} }
runAsync(() -> _repository.SetStatus(_clientManager.getAccountId(caller), enabled)); runAsync(() -> _repository.SetStatus(_clientManager.getAccountId(caller), enabled));

View File

@ -557,15 +557,6 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
} }
} }
@EventHandler
public void StaffIncognito(IncognitoStatusChangeEvent event)
{
if (event.getNewState())
{
UtilServer.broadcast(F.sys("Quit", event.getPlayer().getName()));
}
}
@EventHandler @EventHandler
public void disableEnderpeal(PlayerInteractEvent event) public void disableEnderpeal(PlayerInteractEvent event)
{ {
@ -1070,6 +1061,19 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
_playTracker.onDisable(); _playTracker.onDisable();
} }
@EventHandler
public void StaffIncognito(IncognitoStatusChangeEvent event)
{
if (event.getNewState())
{
UtilServer.broadcast(F.sys("Quit", event.getPlayer().getName()));
}
else
{
UtilServer.broadcast(F.sys("Join", event.getPlayer().getName()));
}
}
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.HIGHEST)
public void onJoin(PlayerLoginEvent event) public void onJoin(PlayerLoginEvent event)
{ {

View File

@ -613,7 +613,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
@EventHandler @EventHandler
public void StaffIncognito(IncognitoStatusChangeEvent event) public void StaffIncognito(IncognitoStatusChangeEvent event)
{ {
if (_game != null && _game.IsPlaying(event.getPlayer()) && _game.IsLive()) if (event.getNewState() && _game != null && _game.IsPlaying(event.getPlayer()) && _game.IsLive())
{ {
UtilPlayer.message(event.getPlayer(), F.main("Incognito", "You may not go incognito whilst in a game.")); UtilPlayer.message(event.getPlayer(), F.main("Incognito", "You may not go incognito whilst in a game."));
event.setCancelled(true); event.setCancelled(true);
@ -624,6 +624,10 @@ public class ArcadeManager extends MiniPlugin implements IRelation
{ {
UtilServer.broadcast(F.sys("Quit", event.getPlayer().getName())); UtilServer.broadcast(F.sys("Quit", event.getPlayer().getName()));
} }
else
{
UtilServer.broadcast(F.sys("Join", event.getPlayer().getName()));
}
} }
@EventHandler @EventHandler