Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onEnable(){
- FileConfiguration config = new YamlConfiguration();
- try{
- config.load(this.getDataFolder() +"/Items.yml");
- }catch(Exception e){
- e.printStackTrace();
- }
- List<String> stuff = config.getStringList("");
- for(String s : stuff){
- int i = config.getInt(s + ".price");
- i = i*2;
- config.set(s + ".price", i);
- }
- try{
- config.save(this.getDataFolder() + "/Items.yml");
- }catch(Exception e){
- e.printStackTrace();
- }
- }
Add Comment
Please, Sign In to add comment