Update/toml json config #35
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
Add dependencies com.electronwill.night-config:core, toml, and json
Add the appropriate bukkit tags required by the minecrell/plugin-yml gradle plugin to Veritas and Tyr.
Created GenericConfig class for TOML and JSON configurations.
Added ConfigType enum to define configuration formats, parsers, and writers for TOML and JSON.
Created FileUtils class containing useful file and directory creation methods
Added @ApiStatus.Internal to both the BukkitDelegate class and Completions annotation to specify that they should not be used externally.
Changed Configuration#getList(String, Class) to Configuration#getCollection(String, Class)
Adjusted return value of ContextProvider#fromString to return Optional instead of
@NullableTAdjusted classes which used previous API methods to use the newly updated ones.
Patchwork
Patchwork has had some moderately impactful API changes. Classes have been renamed, return values have been changed, and classes have been relocated to different packages. Please see the commit details to see which classes have changed or refer to the Javadoc.
Discord Bot
The discord bot has many supported commands, all able to be added or removed at will through the json files in Veritas' data folder. Supported commands are:
staffoption which, when true, lists only those with staff permissions currently online.