From 014ce137fca5a3a57318e2c6c7cbe512d9a9136a Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 7 May 2016 23:07:09 +0100 Subject: [PATCH] If a player uses /a regardless of if staff are online, offline, or vanished, making it always yield a response telling the player that if there are staff currently online, they will receive a reply soon - removing the "there are no staff online" message. Also a 60s Recharge for this. --- .../mineplex/core/message/commands/AdminCommand.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/message/commands/AdminCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/message/commands/AdminCommand.java index d12470834..10fc538e4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/message/commands/AdminCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/message/commands/AdminCommand.java @@ -11,6 +11,7 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.incognito.IncognitoManager; import mineplex.core.message.MessageManager; +import mineplex.core.recharge.Recharge; public class AdminCommand extends CommandBase { @@ -46,7 +47,6 @@ public class AdminCommand extends CommandBase UtilPlayer.message(caller, F.rank(Plugin.GetClientManager().Get(caller).GetRank()) + " " + caller.getName() + " " + C.cPurple + message); //Send - boolean staff = false; for (Player to : UtilServer.getPlayers()) { if (Plugin.GetClientManager().Get(to).GetRank().has(Rank.HELPER)) @@ -64,16 +64,17 @@ public class AdminCommand extends CommandBase if(Plugin.GetClientManager().Get(to).isDisguised() || !caller.canSee(to)) continue; } - staff = true; //Sound to.playSound(to.getLocation(), Sound.NOTE_PLING, 0.5f, 2f); } } - - if (!staff) - UtilPlayer.message(caller, F.main(Plugin.getName(), "There are no Staff Members online.")); + if (!Plugin.GetClientManager().hasRank(caller, Rank.HELPER) && Recharge.Instance.use(caller, "AdminCommand.InformMsg", 60 * 1000, false, false)) + { + UtilPlayer.message(caller, F.main(Plugin.getName(), "If there are any staff currently online, you will receive a reply shortly.")); + } + //Log XXX //Logger().logChat("Staff Chat", from, staff, message); }