Send afk kick message as a broadcast

This commit is contained in:
Spencer 2017-12-28 19:56:48 -05:00 committed by Alexander Meech
parent 6ce5c577b8
commit 7f89863c6f

View File

@ -2,7 +2,7 @@ package nautilus.game.arcade.command;
import mineplex.core.command.CommandBase; import mineplex.core.command.CommandBase;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.F; import mineplex.core.common.util.UtilServer;
import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.GameServerConfig; import nautilus.game.arcade.game.GameServerConfig;
import nautilus.game.arcade.managers.IdleManager; import nautilus.game.arcade.managers.IdleManager;
@ -27,7 +27,7 @@ public class ToggleAfkKickCommand extends CommandBase<ArcadeManager>
{ {
toggleAfkKick(); toggleAfkKick();
String message = C.cGray + "AFK kick is now "; String message = C.cWhiteB + "AFK kick is now ";
if (Plugin.IsPlayerKickIdle()) if (Plugin.IsPlayerKickIdle())
{ {
@ -40,6 +40,7 @@ public class ToggleAfkKickCommand extends CommandBase<ArcadeManager>
message += C.cGray + "."; message += C.cGray + ".";
caller.sendMessage(F.main("Game", message)); String finalMessage = message;
UtilServer.getPlayersCollection().forEach(p -> p.sendMessage(finalMessage));
} }
} }