// Path: src/think/rpgitems/Plugin.java
// @SuppressWarnings("deprecation")
// public class Plugin extends JavaPlugin {
// 
//     public static Logger logger = Logger.getLogger("RPGItems");
// 	
//     public static Plugin plugin;
// 
//     @Override
//     public void onLoad() {
//         plugin = this;
//         reloadConfig();
//         Font.load();
//         Power.powers.put("arrow", PowerArrow.class);
//         Power.powers.put("tntcannon", PowerTNTCannon.class);
//         Power.powers.put("rainbow", PowerRainbow.class);
//         Power.powers.put("flame", PowerFlame.class);
//         Power.powers.put("lightning", PowerLightning.class);
//         Power.powers.put("command", PowerCommand.class);
//         Power.powers.put("potionhit", PowerPotionHit.class);
//         Power.powers.put("teleport", PowerTeleport.class);
//         Power.powers.put("fireball", PowerFireball.class);
//         Power.powers.put("ice", PowerIce.class);
//         Power.powers.put("knockup", PowerKnockup.class);
//         Power.powers.put("rush", PowerRush.class);
//         Power.powers.put("potionself", PowerPotionSelf.class);
//         Power.powers.put("consume", PowerConsume.class);
//         Power.powers.put("unbreakable", PowerUnbreakable.class);
//         Power.powers.put("unbreaking", PowerUnbreaking.class);
//         Power.powers.put("rumble", PowerRumble.class);
//         Power.powers.put("skyhook", PowerSkyHook.class);
//         Power.powers.put("potiontick", PowerPotionTick.class);
//         Power.powers.put("food", PowerFood.class);
//         Power.powers.put("lifesteal", PowerLifeSteal.class);
//     }
// 
//     @Override
//     public void onEnable() {
//         Locale.init(this);
//         updateConfig();
//         WorldGuard.init(this);
//         ConfigurationSection conf = getConfig();
//         if (conf.getBoolean("autoupdate", true)) {
//             new Updater(this, 70226, this.getFile(), Updater.UpdateType.DEFAULT, false);
//         }
//         if (conf.getBoolean("localeInv", false)) {
//             Events.useLocaleInv = true;
//         }
//         getServer().getPluginManager().registerEvents(new Events(), this);
//         ItemManager.load(this);
//         Commands.register(new Handler());
//         Commands.register(new PowerHandler());
//         new PowerTicker().runTaskTimer(this, 0, 1);
//     }
// 
//     @Override
//     public void saveConfig() {
//         FileConfiguration config = getConfig();
//         FileOutputStream out = null;
//         try {
//             File f = new File(getDataFolder(), "config.yml");
//             if (!f.exists())
//                 f.createNewFile();
//             out = new FileOutputStream(f);
//             out.write(config.saveToString().getBytes("UTF-8"));
//         } catch (FileNotFoundException e) {
//         } catch (UnsupportedEncodingException e) {
//         } catch (IOException e) {
//         } finally {
//             try {
//                 if (out != null)
//                     out.close();
//             } catch (IOException e) {
//                 // TODO Auto-generated catch block
//                 e.printStackTrace();
//             }
//         }
//     }
// 
//     public static FileConfiguration config;
// 
//     @Override
//     public void reloadConfig() {
//         FileInputStream in = null;
//         config = new YamlConfiguration();
//         try {
//             File f = new File(getDataFolder(), "config.yml");
//             in = new FileInputStream(f);
//             byte[] data = new byte[(int) f.length()];
//             in.read(data);
//             String str = new String(data, "UTF-8");
//             config.loadFromString(str);
//         } catch (FileNotFoundException e) {
//         } catch (IOException e) {
//         } catch (InvalidConfigurationException e) {
//         } finally {
//             try {
//                 if (in != null)
//                     in.close();
//             } catch (IOException e) {
//                 // TODO Auto-generated catch block
//                 e.printStackTrace();
//             }
//         }
// 
//     }
// 
//     public FileConfiguration getConfig() {
//         return config;
//     }
// 
//     public void updateConfig() {
//         ConfigUpdater.updateConfig(getConfig());
//         saveConfig();
//     }
// 
//     @Override
//     public void onDisable() {
//     }
// 
//     @Override
//     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
//         StringBuilder out = new StringBuilder();
//         out.append(label).append(' ');
//         for (String arg : args)
//             out.append(arg).append(' ');
//         Commands.exec(sender, out.toString());
//         return true;
//     }
// 
//     @Override
//     public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
//         StringBuilder out = new StringBuilder();
//         out.append(alias).append(' ');
//         for (String arg : args)
//             out.append(arg).append(' ');
//         return Commands.complete(sender, out.toString());
//     }
// }


import java.io.File;
import java.io.IOException;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import think.rpgitems.Plugin;
/*
 *  This file is part of RPG Items.
 *
 *  RPG Items is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  RPG Items is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with RPG Items.  If not, see <http://www.gnu.org/licenses/>.
 */
package think.rpgitems.config;




public class Update01To02 implements Updater {

    @Override
    public void update(ConfigurationSection section) {

// Path: src/think/rpgitems/Plugin.java
// @SuppressWarnings("deprecation")
// public class Plugin extends JavaPlugin {
// 
//     public static Logger logger = Logger.getLogger("RPGItems");
// 	
//     public static Plugin plugin;
// 
//     @Override
//     public void onLoad() {
//         plugin = this;
//         reloadConfig();
//         Font.load();
//         Power.powers.put("arrow", PowerArrow.class);
//         Power.powers.put("tntcannon", PowerTNTCannon.class);
//         Power.powers.put("rainbow", PowerRainbow.class);
//         Power.powers.put("flame", PowerFlame.class);
//         Power.powers.put("lightning", PowerLightning.class);
//         Power.powers.put("command", PowerCommand.class);
//         Power.powers.put("potionhit", PowerPotionHit.class);
//         Power.powers.put("teleport", PowerTeleport.class);
//         Power.powers.put("fireball", PowerFireball.class);
//         Power.powers.put("ice", PowerIce.class);
//         Power.powers.put("knockup", PowerKnockup.class);
//         Power.powers.put("rush", PowerRush.class);
//         Power.powers.put("potionself", PowerPotionSelf.class);
//         Power.powers.put("consume", PowerConsume.class);
//         Power.powers.put("unbreakable", PowerUnbreakable.class);
//         Power.powers.put("unbreaking", PowerUnbreaking.class);
//         Power.powers.put("rumble", PowerRumble.class);
//         Power.powers.put("skyhook", PowerSkyHook.class);
//         Power.powers.put("potiontick", PowerPotionTick.class);
//         Power.powers.put("food", PowerFood.class);
//         Power.powers.put("lifesteal", PowerLifeSteal.class);
//     }
// 
//     @Override
//     public void onEnable() {
//         Locale.init(this);
//         updateConfig();
//         WorldGuard.init(this);
//         ConfigurationSection conf = getConfig();
//         if (conf.getBoolean("autoupdate", true)) {
//             new Updater(this, 70226, this.getFile(), Updater.UpdateType.DEFAULT, false);
//         }
//         if (conf.getBoolean("localeInv", false)) {
//             Events.useLocaleInv = true;
//         }
//         getServer().getPluginManager().registerEvents(new Events(), this);
//         ItemManager.load(this);
//         Commands.register(new Handler());
//         Commands.register(new PowerHandler());
//         new PowerTicker().runTaskTimer(this, 0, 1);
//     }
// 
//     @Override
//     public void saveConfig() {
//         FileConfiguration config = getConfig();
//         FileOutputStream out = null;
//         try {
//             File f = new File(getDataFolder(), "config.yml");
//             if (!f.exists())
//                 f.createNewFile();
//             out = new FileOutputStream(f);
//             out.write(config.saveToString().getBytes("UTF-8"));
//         } catch (FileNotFoundException e) {
//         } catch (UnsupportedEncodingException e) {
//         } catch (IOException e) {
//         } finally {
//             try {
//                 if (out != null)
//                     out.close();
//             } catch (IOException e) {
//                 // TODO Auto-generated catch block
//                 e.printStackTrace();
//             }
//         }
//     }
// 
//     public static FileConfiguration config;
// 
//     @Override
//     public void reloadConfig() {
//         FileInputStream in = null;
//         config = new YamlConfiguration();
//         try {
//             File f = new File(getDataFolder(), "config.yml");
//             in = new FileInputStream(f);
//             byte[] data = new byte[(int) f.length()];
//             in.read(data);
//             String str = new String(data, "UTF-8");
//             config.loadFromString(str);
//         } catch (FileNotFoundException e) {
//         } catch (IOException e) {
//         } catch (InvalidConfigurationException e) {
//         } finally {
//             try {
//                 if (in != null)
//                     in.close();
//             } catch (IOException e) {
//                 // TODO Auto-generated catch block
//                 e.printStackTrace();
//             }
//         }
// 
//     }
// 
//     public FileConfiguration getConfig() {
//         return config;
//     }
// 
//     public void updateConfig() {
//         ConfigUpdater.updateConfig(getConfig());
//         saveConfig();
//     }
// 
//     @Override
//     public void onDisable() {
//     }
// 
//     @Override
//     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
//         StringBuilder out = new StringBuilder();
//         out.append(label).append(' ');
//         for (String arg : args)
//             out.append(arg).append(' ');
//         Commands.exec(sender, out.toString());
//         return true;
//     }
// 
//     @Override
//     public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
//         StringBuilder out = new StringBuilder();
//         out.append(alias).append(' ');
//         for (String arg : args)
//             out.append(arg).append(' ');
//         return Commands.complete(sender, out.toString());
//     }
// }


// Path: src/think/rpgitems/config/Update01To02.java
import java.io.File;
import java.io.IOException;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import think.rpgitems.Plugin;

/*
 *  This file is part of RPG Items.
 *
 *  RPG Items is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  RPG Items is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with RPG Items.  If not, see <http://www.gnu.org/licenses/>.
 */
package think.rpgitems.config;




public class Update01To02 implements Updater {

    @Override
    public void update(ConfigurationSection section) {

        File iFile = new File(Plugin.plugin.getDataFolder(), "items.yml");