Package marauroa.common

Examples of marauroa.common.Configuration


      /* Initialize quests */
      SingletonRepository.getStendhalQuestSystem().init();

      new ScriptRunner();

      final Configuration config = Configuration.getConfiguration();
      try {
        final String[] extensionsToLoad = config.get("server_extension").split(",");
        for (final String element : extensionsToLoad) {
          String extension = null;
          try {
            extension = element;
            if (extension.length() > 0) {
              StendhalServerExtension.getInstance(config.get(extension)).init();
            }
          } catch (final RuntimeException ex) {
            logger.error("Error while loading extension: " + extension, ex);
          }
        }
View Full Code Here


   *            Player
   */
  static void welcome(final Player player) {
    String msg = welcomeMessage;
    try {
      final Configuration config = Configuration.getConfiguration();
      if (config.has("server_welcome")) {
        msg = config.get("server_welcome");
        if (msg.startsWith("http://")) {
          final URL url = new URL(msg);
          HttpURLConnection.setFollowRedirects(false);
          final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
                    try {
View Full Code Here

  /**
   * Executes the program. Use "start()" for asynchronous access.
   */
  public void run() {
    Configuration configuration;
    try {
      configuration = Configuration.getConfiguration();
    } catch (IOException e1) {
      logger.error(e1, e1);
      return;
    }

    // check that a password for this account was configured
    if (!configuration.has("stendhal.program." + account)) {
      return;
    }

    String cmd = configuration.get("stendhal.program." + account);
    send(cmd, message);
  }
View Full Code Here

      + File.separator + "stendhal.cache";

    // create a new cache file if doesn't exist already
    boolean ret = new File(cacheFile).createNewFile();

    cacheManager = new Configuration(new ConfigurationParams(
        false, stendhal.getGameFolder(), "cache/stendhal.cache"));

    return ret;
  }
View Full Code Here

TOP

Related Classes of marauroa.common.Configuration

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.