Mojang/brigadier

StringArgumentType with regex

NgLoader opened this issue · 0 comments

Adding in StringArgumentType a regex method for regex input verification.

Example:

LiteralArgumentBuilder.literal("example")
	.then(RequierdArgumentBuilder.argument("date", StringArgumentType.regex("REGEX")))

Example:

  • /example 04-27-2000
  • /example 04.27.2000