Z0rdak / Yet-Another-World-Protector

Yet Another World Protector is a server-side protection mod which allows you to protect your creations against various different events/actions of players, mobs and the environment. It was inspired by the forge mod WorldProtector and the WorldGuard plugin.
https://www.curseforge.com/minecraft/mc-mods/yawp
GNU Affero General Public License v3.0
21 stars 8 forks source link

Implement ArgumentType subclasses for commonly used arguments #49

Closed Z0rdak closed 1 year ago

Z0rdak commented 1 year ago

Overview

Implementing the CLI for the mod can be very tedious and confusing with the Minecraft argument builder system. To make the development and future adaptions easier, it would be good to implement subclasses which take care of parsing the mod-specific arguments.

This could also be used as part of an API for other mods.

Todos

Create implementations for AreaTye, RegionType, IFlag, AbstractMarkableRegion and DimensionalRegion.

NOTE: Custom ArgumentType implementations can help with parsing arguments and getting the correct values to the argument, but without registering them, it is not possible to use them on a vanilla client. A workaround to use them is to manually use the listSuggestion method and use e.g. ArgumentType<String> for the custom arguments.

NOTE 2: When dropping support for vanilla clients it would be possible to use the custom argument types to their full potential. But this is not intended, yet.

Definition of Done