feat: 使用新API
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
8f1dd50853
commit
54f6f9999d
@ -4,7 +4,6 @@ import java.io.File;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import pw.yumc.YumCore.config.FileConfig;
|
||||
import pw.yumc.YumCore.config.PlayerConfig;
|
||||
|
||||
/**
|
||||
* 配置管理
|
||||
@ -14,7 +13,7 @@ import pw.yumc.YumCore.config.PlayerConfig;
|
||||
*/
|
||||
public class ConfigManager {
|
||||
private final File dir;
|
||||
private final WeakHashMap<String, PlayerConfig> playerconfigs = new WeakHashMap<>();
|
||||
private final WeakHashMap<String, FileConfig> playerconfigs = new WeakHashMap<>();
|
||||
|
||||
private FileConfig config = null;
|
||||
|
||||
@ -38,7 +37,7 @@ public class ConfigManager {
|
||||
*/
|
||||
public FileConfig get(final String name) {
|
||||
if (!playerconfigs.containsKey(name)) {
|
||||
playerconfigs.put(name, new PlayerConfig(dir, name));
|
||||
playerconfigs.put(name, new FileConfig(dir, name));
|
||||
}
|
||||
return playerconfigs.get(name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user