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