Package com.sijobe.spc.util

Examples of com.sijobe.spc.util.SettingsManager


   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());
   }
View Full Code Here


    */
   public static boolean saveSettings(Player player) {
      if (player == null) {
         return false;
      }
      SettingsManager manager = MANAGER.get(MinecraftServer.getDirectoryName());
      if (manager != null) {
         return manager.save(player.getPlayerName());
      }
      return false;
   }
View Full Code Here

TOP

Related Classes of com.sijobe.spc.util.SettingsManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.