diff --git a/CHANGELOG.md b/CHANGELOG.md index 30901558..fb64960d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed +- Fix missing caption registration for the regex caption ([#351](https://github.com/Incendo/cloud/pull/351)) + ## [1.6.2] ### Fixed diff --git a/cloud-core/src/main/java/cloud/commandframework/captions/SimpleCaptionRegistry.java b/cloud-core/src/main/java/cloud/commandframework/captions/SimpleCaptionRegistry.java index b209fd8a..31315c4c 100644 --- a/cloud-core/src/main/java/cloud/commandframework/captions/SimpleCaptionRegistry.java +++ b/cloud-core/src/main/java/cloud/commandframework/captions/SimpleCaptionRegistry.java @@ -63,6 +63,10 @@ public class SimpleCaptionRegistry implements FactoryDelegatingCaptionRegistr * Default caption for {@link StandardCaptionKeys#ARGUMENT_PARSE_FAILURE_UUID} */ public static final String ARGUMENT_PARSE_FAILURE_UUID = "'{input}' is not a valid UUID"; + /** + * Default caption for {@link StandardCaptionKeys#ARGUMENT_PARSE_FAILURE_REGEX} + */ + public static final String ARGUMENT_PARSE_FAILURE_REGEX = "'{input}' does not match '{pattern}'"; /** * Default caption for {@link StandardCaptionKeys#ARGUMENT_PARSE_FAILURE_FLAG_UNKNOWN_FLAG} */ @@ -123,6 +127,10 @@ public class SimpleCaptionRegistry implements FactoryDelegatingCaptionRegistr StandardCaptionKeys.ARGUMENT_PARSE_FAILURE_UUID, (caption, sender) -> ARGUMENT_PARSE_FAILURE_UUID ); + this.registerMessageFactory( + StandardCaptionKeys.ARGUMENT_PARSE_FAILURE_REGEX, + (caption, sender) -> ARGUMENT_PARSE_FAILURE_REGEX + ); this.registerMessageFactory( StandardCaptionKeys.ARGUMENT_PARSE_FAILURE_FLAG_UNKNOWN_FLAG, (caption, sender) -> ARGUMENT_PARSE_FAILURE_FLAG_UNKNOWN_FLAG diff --git a/gradle/libs.versions.yml b/gradle/libs.versions.yml index 3ce3d39c..2a7e4622 100644 --- a/gradle/libs.versions.yml +++ b/gradle/libs.versions.yml @@ -28,7 +28,7 @@ versions: jda: 4.2.1_257 # irc - pircbotx: 83a4c22e80 + pircbotx: 12f5639c5d # minecraft guava: 21.0-jre