Package org.bukkit.configuration

Examples of org.bukkit.configuration.ConfigurationSection.createSection()


          for (Map.Entry<String, Object> entry : section.getValues(false).entrySet()) {
            final String lowerString = entry.getKey().toLowerCase();
            if (!lowerString.equals(entry.getKey())) {
              section.set(entry.getKey(), null);
              if (entry.getValue() instanceof  ConfigurationSection) {
                section.createSection(lowerString, ((ConfigurationSection) entry.getValue()).getValues(false));
              } else {
                section.set(lowerString, entry.getValue());
              }
            }
          }
View Full Code Here


    // get arena section
    ConfigurationSection arenaSection = SimpleSpleef.getPlugin().getConfig().getConfigurationSection("arenas." + arena);
   
    // create section, if needed
    if (!arenaSection.isConfigurationSection(adminCommand))
      arenaSection.createSection(adminCommand);
    // get this section
    ConfigurationSection mySection = arenaSection.getConfigurationSection(adminCommand);
    // enable section
    mySection.set("enabled", true);
    // create section with location stuff - block which the player is standing on
View Full Code Here

    // get this section
    ConfigurationSection mySection = arenaSection.getConfigurationSection(adminCommand);
    // enable section
    mySection.set("enabled", true);
    // create section with location stuff - block which the player is standing on
    mySection.createSection(aOrB, LocationHelper.getXYZLocation(((Player) sender).getLocation().getBlock().getRelative(BlockFace.DOWN).getLocation()));
   
    // save config to file
    SimpleSpleef.getPlugin().saveConfig();
   
    // feedback to player
View Full Code Here

    // get arena section
    ConfigurationSection arenaSection = SimpleSpleef.getPlugin().getConfig().getConfigurationSection("arenas." + arena);
   
    // create section, if needed
    if (!arenaSection.isConfigurationSection(adminCommand))
      arenaSection.createSection(adminCommand);
    // get this section
    ConfigurationSection mySection = arenaSection.getConfigurationSection(adminCommand);
    // enable section
    mySection.set("enabled", true);
    // create section with location stuff - selected blocks
View Full Code Here

    // get this section
    ConfigurationSection mySection = arenaSection.getConfigurationSection(adminCommand);
    // enable section
    mySection.set("enabled", true);
    // create section with location stuff - selected blocks
    mySection.createSection("a", LocationHelper.getXYZLocation(new Location(world, minP.getX(), minP.getY(), minP.getZ())));
    mySection.createSection("b", LocationHelper.getXYZLocation(new Location(world, maxP.getX(), maxP.getY(), maxP.getZ())));

    // save config to file
    SimpleSpleef.getPlugin().saveConfig();
View Full Code Here

    ConfigurationSection mySection = arenaSection.getConfigurationSection(adminCommand);
    // enable section
    mySection.set("enabled", true);
    // create section with location stuff - selected blocks
    mySection.createSection("a", LocationHelper.getXYZLocation(new Location(world, minP.getX(), minP.getY(), minP.getZ())));
    mySection.createSection("b", LocationHelper.getXYZLocation(new Location(world, maxP.getX(), maxP.getY(), maxP.getZ())));

    // save config to file
    SimpleSpleef.getPlugin().saveConfig();

    // feedback to player
View Full Code Here

    // get arena section
    ConfigurationSection arenaSection = SimpleSpleef.getPlugin().getConfig().getConfigurationSection("arenas." + arena);

    // create section
    arenaSection.createSection(spawn + "Spawn", LocationHelper.getExactLocation(((Player) sender).getLocation(), true));

    // save config to file
    SimpleSpleef.getPlugin().saveConfig();
   
    // feedback to player
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.