Package org.getspout.spout.config

Examples of org.getspout.spout.config.ConfigReader


        sender.sendMessage("Only players can add waypoints.");
        return true;
      }
      if (args.length > 1) {
        String name = args[1];
        (new ConfigReader()).addWaypoint(name, ((Player) sender).getLocation());
        sender.sendMessage("Waypoint [" + name + "] created successfully");
        return true;
      } else {
        sender.sendMessage("You must give a name to the waypoint.");
        return true;
      }
    }
    if (c.equals("list")) {
      String message = "Players online with " + ChatColor.BLUE + "Spoutcraft" + ChatColor.RESET + ":\n";
      for (Player plr : Bukkit.getOnlinePlayers()) {
        SpoutPlayer splr = SpoutManager.getPlayer(plr);
        if (splr.isSpoutCraftEnabled()) {
          message += ChatColor.GREEN + splr.getName() + ChatColor.RESET + ", ";
        }
      }
      message = message.substring(0, message.length() - 2);
      sender.sendMessage(message);
      return true;
    }
    if (c.equals("reload")) {
      (new ConfigReader()).read();
      sender.sendMessage("Configuration for SpoutPlugin has been reloaded.");
      return true;
    }
    if (c.equals("verify") && args.length > 1) {
      sender.sendMessage("[SpoutPlugin] Temporarily setting the MOTD to: " + args[1]);
View Full Code Here


    super.onDisable();
  }

  @Override
  public void onEnable() {
    (new ConfigReader()).read();

    // The infamous SpoutPlugin build check
    if (ConfigReader.isBuildCheck()) {
      InputStream is = getResource("plugin.yml");
      final YamlConfiguration config = YamlConfiguration.loadConfiguration(is);
View Full Code Here

TOP

Related Classes of org.getspout.spout.config.ConfigReader

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.