Exemple #1
0
 @ParentCommand("war")
 @Command(name = "kit", args = "<id>", desc = "Set the current Kit (ignores Playlist)")
 @CommandPermission("TacoWar.admin.set-kit")
 public static void kit(CommandContext context) {
   if (context.eq(0)) {
     context.sendMessageToSender("&cMust specify the &eKit ID");
     return;
   }
   if (TacoWar.currentGame() == null) {
     context.sendMessageToSender("&cThe first game has not started yet");
     return;
   }
   WarKit kit = TacoWar.getKit(context.getString(0));
   if (kit == null) {
     context.sendMessageToSender("&cKit with the id &e" + context.getString(0) + " &cnot found");
     return;
   }
   TacoWar.currentGame().setKit(kit, false);
   context.sendMessageToSender("&aKit set to &e" + kit.getId());
 }