diff --git a/cloud-fabric/src/main/java/cloud/commandframework/fabric/FabricCommandManager.java b/cloud-fabric/src/main/java/cloud/commandframework/fabric/FabricCommandManager.java index 4e1a06da..f1b022fa 100644 --- a/cloud-fabric/src/main/java/cloud/commandframework/fabric/FabricCommandManager.java +++ b/cloud-fabric/src/main/java/cloud/commandframework/fabric/FabricCommandManager.java @@ -39,6 +39,7 @@ import cloud.commandframework.exceptions.NoPermissionException; import cloud.commandframework.exceptions.NoSuchCommandException; import cloud.commandframework.execution.ExecutionCoordinator; +import cloud.commandframework.minecraft.modded.ModdedCaptionRegistry; import cloud.commandframework.minecraft.modded.internal.ModdedParserMappings; import cloud.commandframework.minecraft.modded.internal.ModdedPreprocessor; import com.mojang.brigadier.exceptions.CommandSyntaxException; @@ -133,7 +134,7 @@ public abstract class FabricCommandManager()); + this.captionRegistry(new ModdedCaptionRegistry<>()); this.registerCommandPreProcessor(new ModdedPreprocessor<>(senderMapper)); ((FabricCommandRegistrationHandler) this.commandRegistrationHandler()).initialize(this); diff --git a/cloud-minecraft-modded-common/src/main/java/cloud/commandframework/minecraft/modded/ModdedCaptionKeys.java b/cloud-minecraft-modded-common/src/main/java/cloud/commandframework/minecraft/modded/ModdedCaptionKeys.java index 5b815071..bf5c8929 100644 --- a/cloud-minecraft-modded-common/src/main/java/cloud/commandframework/minecraft/modded/ModdedCaptionKeys.java +++ b/cloud-minecraft-modded-common/src/main/java/cloud/commandframework/minecraft/modded/ModdedCaptionKeys.java @@ -30,7 +30,7 @@ import org.checkerframework.checker.nullness.qual.NonNull; /** - * {@link Caption} instances for messages in cloud-fabric + * {@link Caption} instances for messages in cloud-modded-minecraft-common */ public final class ModdedCaptionKeys { @@ -62,7 +62,6 @@ private ModdedCaptionKeys() { * Get an immutable collection containing all standard caption keys * * @return Immutable collection of keys - * @since 1.5.0 */ public static @NonNull Collection<@NonNull Caption> moddedCaptionKeys() { return Collections.unmodifiableCollection(RECOGNIZED_CAPTIONS); diff --git a/cloud-fabric/src/main/java/cloud/commandframework/fabric/FabricCaptionRegistry.java b/cloud-minecraft-modded-common/src/main/java/cloud/commandframework/minecraft/modded/ModdedCaptionRegistry.java similarity index 88% rename from cloud-fabric/src/main/java/cloud/commandframework/fabric/FabricCaptionRegistry.java rename to cloud-minecraft-modded-common/src/main/java/cloud/commandframework/minecraft/modded/ModdedCaptionRegistry.java index 566bb2fe..009f3272 100644 --- a/cloud-fabric/src/main/java/cloud/commandframework/fabric/FabricCaptionRegistry.java +++ b/cloud-minecraft-modded-common/src/main/java/cloud/commandframework/minecraft/modded/ModdedCaptionRegistry.java @@ -21,36 +21,30 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // -package cloud.commandframework.fabric; +package cloud.commandframework.minecraft.modded; import cloud.commandframework.captions.CaptionProvider; import cloud.commandframework.captions.StandardCaptionRegistry; -import cloud.commandframework.minecraft.modded.ModdedCaptionKeys; /** * Caption registry that uses bi-functions to produce messages. * - * @param Command sender type - * @since 1.5.0 + * @param command sender type */ -public class FabricCaptionRegistry extends StandardCaptionRegistry { +public class ModdedCaptionRegistry extends StandardCaptionRegistry { /** * Default caption for {@link ModdedCaptionKeys#ARGUMENT_PARSE_FAILURE_REGISTRY_ENTRY_UNKNOWN_ENTRY} - * - * @since 1.5.0 */ public static final String ARGUMENT_PARSE_FAILURE_REGISTRY_ENTRY_UNKNOWN_ENTRY = "Could not find value with key '' in registry ''."; /** * Default caption for {@link ModdedCaptionKeys#ARGUMENT_PARSE_FAILURE_TEAM_UNKNOWN} - * - * @since 1.5.0 */ public static final String ARGUMENT_PARSE_FAILURE_TEAM_UNKNOWN = "Could not find any team named ''!"; - protected FabricCaptionRegistry() { + public ModdedCaptionRegistry() { super(); this.registerProvider( diff --git a/cloud-neoforge/src/main/java/cloud/commandframework/neoforge/NeoForgeCommandManager.java b/cloud-neoforge/src/main/java/cloud/commandframework/neoforge/NeoForgeCommandManager.java index fb22543e..7f433062 100644 --- a/cloud-neoforge/src/main/java/cloud/commandframework/neoforge/NeoForgeCommandManager.java +++ b/cloud-neoforge/src/main/java/cloud/commandframework/neoforge/NeoForgeCommandManager.java @@ -42,6 +42,7 @@ import cloud.commandframework.execution.ExecutionCoordinator; import cloud.commandframework.meta.CommandMeta; import cloud.commandframework.meta.SimpleCommandMeta; +import cloud.commandframework.minecraft.modded.ModdedCaptionRegistry; import cloud.commandframework.minecraft.modded.ModdedCommandContextKeys; import cloud.commandframework.minecraft.modded.internal.ModdedParserMappings; import cloud.commandframework.minecraft.modded.internal.ModdedPreprocessor; @@ -100,6 +101,7 @@ protected NeoForgeCommandManager( ), senderMapper); this.registerDefaultExceptionHandlers(); registrationHandler.initialize(this); + this.captionRegistry(new ModdedCaptionRegistry<>()); this.registerCommandPreProcessor(new ModdedPreprocessor<>(senderMapper)); ModdedParserMappings.register(this, this.brigadierManager);