From 86c50cc3cdeae2a86a011af461b100e4199d5089 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 11 Mar 2016 19:03:32 +0000 Subject: [PATCH] updates --- .../core/incognito/IncognitoManager.java | 6 ----- .../game/clans/clans/ClansManager.java | 22 +++++++++++-------- .../nautilus/game/arcade/ArcadeManager.java | 6 ++++- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/incognito/IncognitoManager.java b/Plugins/Mineplex.Core/src/mineplex/core/incognito/IncognitoManager.java index b8e917752..664415263 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/incognito/IncognitoManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/incognito/IncognitoManager.java @@ -64,12 +64,6 @@ public class IncognitoManager extends MiniClientPlugin { 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)); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 635866252..76dce280f 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -557,15 +557,6 @@ public class ClansManager extends MiniClientPluginimplements IRelati } } - @EventHandler - public void StaffIncognito(IncognitoStatusChangeEvent event) - { - if (event.getNewState()) - { - UtilServer.broadcast(F.sys("Quit", event.getPlayer().getName())); - } - } - @EventHandler public void disableEnderpeal(PlayerInteractEvent event) { @@ -1070,6 +1061,19 @@ public class ClansManager extends MiniClientPluginimplements IRelati _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) public void onJoin(PlayerLoginEvent event) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index caa7db2e2..645539a52 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -613,7 +613,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation @EventHandler 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.")); event.setCancelled(true); @@ -624,6 +624,10 @@ public class ArcadeManager extends MiniPlugin implements IRelation { UtilServer.broadcast(F.sys("Quit", event.getPlayer().getName())); } + else + { + UtilServer.broadcast(F.sys("Join", event.getPlayer().getName())); + } } @EventHandler