mirror of
https://github.com/asofold/CompatNoCheatPlus.git
synced 2024-11-24 12:16:46 +01:00
add list of plugins to load to config
This commit is contained in:
parent
f316dc8379
commit
078072f043
@ -1,8 +1,7 @@
|
||||
package me.asofold.bukkit.cncp.setttings;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import me.asofold.bukkit.cncp.config.compatlayer.CompatConfig;
|
||||
@ -11,13 +10,12 @@ import me.asofold.bukkit.cncp.config.compatlayer.NewConfig;
|
||||
|
||||
public class Settings {
|
||||
public Set<String> forceEnableLater = new HashSet<String>();
|
||||
|
||||
public Set<String> loadPlugins = new HashSet<String>();
|
||||
|
||||
public static CompatConfig getDefaultConfig(){
|
||||
CompatConfig cfg = new NewConfig(null);
|
||||
List<String> tempList = new LinkedList<String>();
|
||||
tempList.add("NoCheatPlus");
|
||||
cfg.set("plugins.force-enable-later", tempList);
|
||||
cfg.set("plugins.force-enable-later", Arrays.asList(new String[]{ "NoCheatPlus" }));
|
||||
cfg.set("plugins.load", Arrays.asList(new String[]{ "WorldGuard" }));
|
||||
return cfg;
|
||||
}
|
||||
|
||||
@ -28,6 +26,7 @@ public class Settings {
|
||||
public boolean fromConfig(CompatConfig cfg){
|
||||
// plugins to force enabling after this plugin.
|
||||
ConfigUtil.readStringSetFromList(cfg, "plugins.force-enable-later", forceEnableLater, true, true, false);
|
||||
ConfigUtil.readStringSetFromList(cfg, "plugins.load", loadPlugins, true, true, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user