2013-08-27 17:14:08 +02:00
|
|
|
package nautilus.game.arcade.command;
|
|
|
|
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
import nautilus.game.arcade.ArcadeManager;
|
2014-04-26 03:59:11 +02:00
|
|
|
import nautilus.game.arcade.game.Game.GameState;
|
2013-08-27 17:14:08 +02:00
|
|
|
import mineplex.core.command.CommandBase;
|
|
|
|
import mineplex.core.common.Rank;
|
2014-04-11 07:33:31 +02:00
|
|
|
import mineplex.core.common.util.C;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
|
|
public class StartCommand extends CommandBase<ArcadeManager>
|
|
|
|
{
|
|
|
|
public StartCommand(ArcadeManager plugin)
|
|
|
|
{
|
|
|
|
super(plugin, Rank.ADMIN, "start");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void Execute(Player caller, String[] args)
|
|
|
|
{
|
|
|
|
if (Plugin.GetGame() == null)
|
|
|
|
return;
|
2014-04-11 07:33:31 +02:00
|
|
|
|
2014-04-26 03:59:11 +02:00
|
|
|
if (Plugin.GetGame().GetState() != GameState.Recruit)
|
2014-04-11 07:33:31 +02:00
|
|
|
{
|
|
|
|
caller.sendMessage("Game is already in progress...");
|
|
|
|
return;
|
|
|
|
}
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
|
|
Plugin.GetGameManager().StateCountdown(Plugin.GetGame(), 10, true);
|
|
|
|
|
2014-04-11 07:33:31 +02:00
|
|
|
Plugin.GetGame().Announce(C.cAqua + C.Bold + caller.getName() + " has started the game.");
|
2013-08-27 17:14:08 +02:00
|
|
|
}
|
|
|
|
}
|