mirror of
https://github.com/asofold/CompatNoCheatPlus.git
synced 2025-02-16 01:22:03 +01:00
Preserve order of entries in the lists read from the configuration.
This commit is contained in:
parent
f6b666220f
commit
a59efb80f9
@ -20,4 +20,8 @@ STACK
|
||||
|
||||
VERSION HISTORY
|
||||
---------------------------
|
||||
(0.1.0)
|
||||
- (add) List to enable plugins: plugins.ensure-enable [Forces their events to be processed before NoCheatPlus gets them!]
|
||||
- (bugfix) Preserve order of entries in the lists read from the configuration.
|
||||
|
||||
(0.0.0) [initial version]
|
||||
|
@ -3,7 +3,7 @@ package me.asofold.bukkit.cncp;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Logger;
|
||||
@ -168,7 +168,7 @@ public class CompatNoCheatPlus extends JavaPlugin implements Listener {
|
||||
}
|
||||
|
||||
public boolean reloadSettings() {
|
||||
final Set<String> oldForceEnableLater = new HashSet<String>();
|
||||
final Set<String> oldForceEnableLater = new LinkedHashSet<String>();
|
||||
oldForceEnableLater.addAll(settings.forceEnableLater);
|
||||
// Read and apply config to settings:
|
||||
File file = new File(getDataFolder() , "cncp.yml");
|
||||
|
@ -1,7 +1,7 @@
|
||||
package me.asofold.bukkit.cncp.setttings;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import me.asofold.bukkit.cncp.config.compatlayer.CompatConfig;
|
||||
@ -9,8 +9,8 @@ import me.asofold.bukkit.cncp.config.compatlayer.ConfigUtil;
|
||||
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 Set<String> forceEnableLater = new LinkedHashSet<String>();
|
||||
public Set<String> loadPlugins = new LinkedHashSet<String>();
|
||||
|
||||
public static CompatConfig getDefaultConfig(){
|
||||
CompatConfig cfg = new NewConfig(null);
|
||||
|
Loading…
Reference in New Issue
Block a user