Class CommandMakerHelpers

java.lang.Object
net.minheur.potoflux.terminal.commands.CommandMakerHelpers

public class CommandMakerHelpers extends Object
  • Field Details

  • Constructor Details

    • CommandMakerHelpers

      public CommandMakerHelpers()
  • Method Details

    • argAmountCheck

      public static boolean argAmountCheck(int min, int max, List<String> args)
      Checks for an amount of args, contained between a min and a max
      Parameters:
      min - the minimum amount of args
      max - the maximum amount of args
      args - the args to check
      Returns:
      if the args are good
    • argAmountCheck

      public static boolean argAmountCheck(int amount, List<String> args)
      Checks for an amount of args, being a fixed amount
      Parameters:
      amount - the exact amount of args you want
      args - the args to check
      Returns:
      if the args are good
    • argAmountCheck

      public static boolean argAmountCheck(List<String> args, int... allowed)
      Checks for an amount of args, being contained in a given list of allowed amounts
      Parameters:
      args - the args to check
      allowed - the varargs of amount of args allowed
      Returns:
      if the arg are good
    • checkNoArgs

      public static boolean checkNoArgs(List<String> args)
      Checks if there are no args
      Parameters:
      args - args to check
      Returns:
      if there are no args