2014-06-12 23:21:20 +00:00
package com.projectkorra.ProjectKorra ;
import java.util.ArrayList ;
public class ConfigManager {
static ProjectKorra plugin ;
public ConfigManager ( ProjectKorra plugin ) {
ConfigManager . plugin = plugin ;
configCheck ( ) ;
}
public static void configCheck ( ) {
ArrayList < String > earthbendable = new ArrayList < String > ( ) ;
earthbendable . add ( " STONE " ) ;
earthbendable . add ( " COAL_ORE " ) ;
earthbendable . add ( " DIAMOND_ORE " ) ;
earthbendable . add ( " DIRT " ) ;
earthbendable . add ( " GOLD_ORE " ) ;
earthbendable . add ( " GRASS " ) ;
earthbendable . add ( " GRAVEL " ) ;
earthbendable . add ( " IRON_ORE " ) ;
earthbendable . add ( " LAPIS_ORE " ) ;
earthbendable . add ( " NETHERRACK " ) ;
earthbendable . add ( " REDSTONE_ORE " ) ;
earthbendable . add ( " SAND " ) ;
earthbendable . add ( " SANDSTONE " ) ;
plugin . getConfig ( ) . addDefault ( " Properties.GlobalCooldown " , 500 ) ;
2014-06-13 23:41:52 +00:00
plugin . getConfig ( ) . addDefault ( " Properties.SeaLevel " , 62 ) ;
2014-06-12 23:21:20 +00:00
plugin . getConfig ( ) . addDefault ( " Properties.Air.CanBendWithWeapons " , false ) ;
plugin . getConfig ( ) . addDefault ( " Properties.Water.CanBendWithWeapons " , true ) ;
plugin . getConfig ( ) . addDefault ( " Properties.Water.NightFactor " , 1 . 5 ) ;
plugin . getConfig ( ) . addDefault ( " Properties.Earth.CanBendWithWeapons " , true ) ;
plugin . getConfig ( ) . addDefault ( " Properties.Earth.EarthbendableBlocks " , earthbendable ) ;
plugin . getConfig ( ) . addDefault ( " Properties.Fire.CanBendWithWeapons " , true ) ;
2014-06-12 23:43:41 +00:00
plugin . getConfig ( ) . addDefault ( " Properties.Fire.DayFactor " , 1 . 5 ) ;
2014-06-12 23:21:20 +00:00
plugin . getConfig ( ) . addDefault ( " Properties.Chi.CanBendWithWeapons " , true ) ;
2014-06-24 22:01:55 +00:00
plugin . getConfig ( ) . addDefault ( " Abilities.AvatarState.Enabled " , true ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.AvatarState.Description " , " The signature ability of the Avatar, this is a toggle. Click to activate to become "
+ " nearly unstoppable. While in the Avatar State, the user takes severely reduced damage from "
+ " all sources, regenerates health rapidly, and is granted extreme speed. Nearly all abilities "
+ " are incredibly amplified in this state. Additionally, AirShield and FireJet become toggle-able "
+ " abilities and last until you deactivate them or the Avatar State. Click again with the Avatar "
+ " State selected to deactivate it. " ) ;
2014-06-12 23:21:20 +00:00
plugin . getConfig ( ) . addDefault ( " Abilities.Air.Passive.Factor " , 0 . 3 ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.Air.Passive.Speed " , 2 ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.Air.Passive.Jump " , 3 ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.Water.Passive.SwimSpeedFactor " , 0 . 7 ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.Water.Plantbending.RegrowTime " , 180000 ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.Earth.Passive.Duration " , 2500 ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.Chi.Passive.FallReductionFactor " , 0 . 5 ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.Chi.Passive.Speed " , 1 ) ;
plugin . getConfig ( ) . addDefault ( " Abilities.Chi.Passive.Jump " , 2 ) ;
plugin . getConfig ( ) . addDefault ( " Storage.engine " , " sqlite " ) ;
plugin . getConfig ( ) . addDefault ( " Storage.MySQL.host " , " localhost " ) ;
plugin . getConfig ( ) . addDefault ( " Storage.MySQL.port " , 3306 ) ;
plugin . getConfig ( ) . addDefault ( " Storage.MySQL.pass " , " " ) ;
plugin . getConfig ( ) . addDefault ( " Storage.MySQL.db " , " minecraft " ) ;
plugin . getConfig ( ) . addDefault ( " Storage.MySQL.user " , " root " ) ;
plugin . getConfig ( ) . options ( ) . copyDefaults ( true ) ;
plugin . saveConfig ( ) ;
}
}