public static Settings loadSettings(Player player) {
if (player == null) {
return null;
}
String directoryName = MinecraftServer.getDirectoryName();
SettingsManager manager = MANAGER.get(directoryName);
if (manager == null) {
File spcPlayers = new File(MinecraftServer.getWorldDirectory(), "spc/players");
if (!spcPlayers.exists()) {
spcPlayers.mkdirs();
}
manager = new SettingsManager(spcPlayers, Constants.DEFAULT_SETTINGS);
MANAGER.put(directoryName, manager);
}
return manager.load(player.getPlayerName());
}