Migrate to Configurate (#4072)

Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: Riley Park <riley.park@meino.net>
Co-authored-by: zml <zml@aoeu.xyz>

Migrates all uses of SnakeYAML and Bukkit's Configuration API to Sponge's Configurate.

Configurate enables us to the do the following stuff:
* Serialize YAML off the main thread
* (in the future) Automatically update our config
* (in the future) Manipulate comments in configs
* Be epic

This commit also *finally* strips out the 3.x storage/object mapping system in favour of Configurate's object mapper.
This commit is contained in:
Josh Roy 2021-06-07 08:49:33 -04:00 committed by GitHub
parent 19b4da07b9
commit 7653da0e4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 2091 additions and 2164 deletions

View file

@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.Kit;
import com.earth2me.essentials.User;
import com.earth2me.essentials.config.ConfigurateUtil;
import org.bukkit.Server;
import java.util.ArrayList;
@ -33,7 +34,7 @@ public class Commandshowkit extends EssentialsCommand {
@Override
protected List<String> getTabCompleteOptions(final Server server, final User user, final String commandLabel, final String[] args) {
if (args.length == 1) {
return new ArrayList<>(ess.getKits().getKits().getKeys(false)); // TODO: Move this to its own method
return new ArrayList<>(ConfigurateUtil.getKeys(ess.getKits().getKits())); // TODO: Move this to its own method
} else {
return Collections.emptyList();
}