Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Config
- {
- private static final String ANTI_LAG_BOOLEAN = "settings.antilag";
- private static final String DATABASE_HOST = "database.hostname";
- private static final String DATABASE_PORT = "database.port";
- private static final String DATABASE_DB = "database.db";
- private static final String DATABASE_USERNAME = "database.username";
- private static final String DATABASE_PASSWORD = "database.password";
- private static final String ARROW_COST_FLAME = "arrow.flame";
- private static final String ARROW_COST_SNOW = "arrow.snow";
- private static final String ARROW_COST_LOVE = "arrow.love";
- private static final String ARROW_COST_ANGRY = "arrow.angry";
- private static final String ARROW_COST_musical = "arrow.musical";
- private static final String ARROW_COST_magic = "arrow.magic";
- private static final String ARROW_COST_sticky = "arrow.sticky";
- private static final String PARTICLE_COST_PHENIX = "particle.phenix";
- private static final String PARTICLE_COST_ESKIMO = "particle.Eskimo";
- private static final String PARTICLE_COST_BLAZING = "particle.blazing";
- private static final String PARTICLE_COST_FLARE = "particle.flare";
- private static final String PARTICLE_COST_CHAMPION = "particle.champion";
- private static final String PARTICLE_COST_ARMAGEDDON = "particle.armageddon";
- private File configFile;
- private FileConfiguration config;
- public void onEnable ()
- {
- configFile = new File(NobleCore.getInstance().getDataFolder(), "mainConfig.yml");
- if (!configFile.exists())
- {
- configFile.getParentFile().mkdirs();
- FileUtils.copy(NobleCore.getInstance().getResource("mainConfig.yml"), configFile);
- }
- config = new YamlConfiguration();
- try
- {
- config.load(configFile);
- }
- catch (FileNotFoundException e)
- {
- e.printStackTrace();
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- catch (InvalidConfigurationException e)
- {
- e.printStackTrace();
- }
- }
- public void onDisable ()
- {
- }
- public String getDBHostName ()
- {
- return config.getString(DATABASE_HOST);
- }
- public String getDBDatabase ()
- {
- return config.getString(DATABASE_DB);
- }
- public String getDBPort ()
- {
- return config.getString(DATABASE_PORT);
- }
- public String getDBUsername ()
- {
- return config.getString(DATABASE_USERNAME);
- }
- public String getDBPassword ()
- {
- return config.getString(DATABASE_PASSWORD);
- }
- public int getArrowFlameCost ()
- {
- return config.getInt(ARROW_COST_FLAME);
- }
- public int getArrowSnowCost ()
- {
- return config.getInt(ARROW_COST_SNOW);
- }
- public int getArrowLoveCost ()
- {
- return config.getInt(ARROW_COST_LOVE);
- }
- public int getArrowAngryCost ()
- {
- return config.getInt(ARROW_COST_ANGRY);
- }
- public int getArrowMusicalCost ()
- {
- return config.getInt(ARROW_COST_musical);
- }
- public int getArrowMagicCost ()
- {
- return config.getInt(ARROW_COST_magic);
- }
- public int getArrowStickyCost ()
- {
- return config.getInt(ARROW_COST_sticky);
- }
- public int getPhenixCost ()
- {
- return config.getInt(PARTICLE_COST_PHENIX);
- }
- public int getEskimoCost ()
- {
- return config.getInt(PARTICLE_COST_ESKIMO);
- }
- public int getBlazingCost ()
- {
- return config.getInt(PARTICLE_COST_BLAZING);
- }
- public int getFlareCost ()
- {
- return config.getInt(PARTICLE_COST_FLARE);
- }
- public int getChampionCost ()
- {
- return config.getInt(PARTICLE_COST_CHAMPION);
- }
- public int getArmageddonCost ()
- {
- return config.getInt(PARTICLE_COST_ARMAGEDDON);
- }
- public boolean getAntiLagBoolean ()
- {
- return config.getBoolean(ANTI_LAG_BOOLEAN);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement