mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-08 13:33:24 +00:00
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:
parent
19b4da07b9
commit
7653da0e4f
57 changed files with 2091 additions and 2164 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue