Package org.spout.cereal.config.yaml

Examples of org.spout.cereal.config.yaml.YamlConfiguration


public class InputConfiguration extends ConfigurationHolderConfiguration {
  public static final ConfigurationHolder TOGGLE_INVENTORY = new ConfigurationHolder("KEY_E", "toggle-inventory");

  public InputConfiguration() {
    super(new YamlConfiguration(new File(VanillaPlugin.getInstance().getDataFolder(), "input.yml")));
  }
View Full Code Here


  /**
   * Creates a new OpConfiguration and instantiates a YamlConfiguration<br> containing the operators.
   */
  public OpConfiguration(File dataFolder) {
    config = new YamlConfiguration(new File(dataFolder, "ops.yml"));
  }
View Full Code Here

  // Client
  public static final ConfigurationHolder USERNAME = new ConfigurationHolder("Spouty", "client", "username");
  public static final ConfigurationHolder PASSWORD = new ConfigurationHolder("supersecretpassword", "client", "password");

  public VanillaConfiguration(File dataFolder) {
    super(new YamlConfiguration(new File(dataFolder, "config.yml")));
  }
View Full Code Here

  }

  @Override
  public RecipeYaml load(InputStream in) {
    Map<String, Recipe> recipes = new HashMap<String, Recipe>();
    YamlConfiguration config = new YamlConfiguration(in);
    try {
      config.load();
    } catch (ConfigurationException ex) {
      Spout.getLogger().warning("Unable to load recipes.yml: " + ex.getMessage());
    }
    ConfigurationNode recipesNode = config.getChild("recipes");
    for (String key : recipesNode.getKeys(false)) {
      ConfigurationNode recipe = recipesNode.getNode(key);
      RecipeBuilder builder = new RecipeBuilder();
      builder.setIncludeData(recipe.getNode("includedata") != null && recipe.getNode("includedata").getBoolean());
      String[] resultString = recipe.getNode("result").getString().split(",");
View Full Code Here

  private final ChannelGroup group = new DefaultChannelGroup("RconChannels", GlobalEventExecutor.INSTANCE);
  private final ServerBootstrap bootstrap = new ServerBootstrap();

  public RemoteConnectionServer(Logger logger, File dataFolder) {
    super(logger);
    this.config = new RconConfiguration(new YamlConfiguration(new File(dataFolder, "rcon.yml")));
    /*bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
      public ChannelPipeline getPipeline() throws Exception {
        RemoteConnectionSession session = new RemoteConnectionSession(RemoteConnectionServer.this);
        return Channels.pipeline(new RconEncoder(session),
            new RconDecoder(session),
View Full Code Here

TOP

Related Classes of org.spout.cereal.config.yaml.YamlConfiguration

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.