Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.TechManDylan.bukkit.TheReaperThatCares;
- import java.io.File;
- import org.bukkit.configuration.file.FileConfiguration;
- import org.bukkit.plugin.PluginManager;
- import org.bukkit.plugin.java.JavaPlugin;
- public class TheReaperThatCares extends JavaPlugin {
- FileConfiguration config;
- //////////////////////////
- //When Plugin is enabled//
- //////////////////////////
- public void onEnable(){
- try{
- /////////////////////////////
- //Config is get config file//
- /////////////////////////////
- config = getConfig();
- ///////////////////////////
- //Make Config Directory//
- ///////////////////////////
- File TheReaperThatCares = new File (getDataFolder() + "config.yml");
- ///////////////////////////
- // Making the config file//
- ///////////////////////////
- if(!config.contains("Config.NoExpLoss.Void")) {
- config.set("Config.ExpLoss.Void", true);
- }
- if(!config.contains("Config.NoExpLoss.Lightning")) {
- config.set("Config.ExpLoss.Lightning", true);
- }
- if(!config.contains("Config.NoExpLoss.Fall")) {
- config.set("Config.ExpLoss.Fall", true);
- }
- if(!config.contains("Config.NoExpLoss.Fire")) {
- config.set("Config.ExpLoss.Fire", true);
- }
- if(!config.contains("Config.NoExpLoss.Fire_Tick")) {
- config.set("Config.ExpLoss.Fire", true);
- }
- if(!config.contains("Config.NoExpLoss.Lava")) {
- config.set("Config.ExpLoss.Lava", true);
- }
- if(!config.contains("Config.NoExpLoss.Suffocation")) {
- config.set("Config.ExpLoss.Suffocation", true);
- }
- if(!config.contains("Config.NoExpLoss.Drowning")) {
- config.set("Config.ExpLoss.Drowning", true);
- }
- if(!config.contains("Config.NoExpLoss.Suicide")) {
- config.set("Config.ExpLoss.Suicide", true);
- }
- if(!config.contains("Config.NoExpLoss.Starvation")) {
- config.set("Config.ExpLoss.Starvation", true);
- }
- if(!config.contains("Config.NoExpLoss.Poison")) {
- config.set("Config.ExpLoss.Poison", true);
- }
- if(!config.contains("Config.NoExpLoss.Contact")) {
- config.set("Config.ExpLoss.Contact", true);
- }
- if(!config.contains("Config.NoExpLoss.Entity Explosion")) {
- config.set("Config.ExpLoss.Entity Explosion", true);
- }
- if(!config.contains("Config.NoExpLoss.Block Explosion")) {
- config.set("Config.ExpLoss.Block Explosion", true);
- }
- if(!config.contains("Config.NoExpLoss.Potion Damage")) {
- config.set("Config.ExpLoss.Mob Potion Damage", true);
- }
- if(!config.contains("Config.NoExpLoss.Player Attack")) {
- config.set("Config.ExpLoss.Player Attack", true);
- }
- if(!config.contains("Config.NoExpLoss.Mob Attack")) {
- config.set("Config.ExpLoss.Mob Attack", true);
- }
- if(!config.contains("Config.NoExpLoss.Player Projectile")) {
- config.set("Config.ExpLoss.Player Projectile", true);
- }
- if(!config.contains("Config.NoExpLoss.Mob Projectile")) {
- config.set("Config.ExpLoss.Mob Projectile", true);
- }
- saveConfig();
- /////////////////////
- // Config file made//
- /////////////////////
- //////////////////////////////
- //Catch and print any errors//
- //////////////////////////////
- } catch(Exception e1) {
- e1.printStackTrace();
- }
- PluginManager pm = this.getServer().getPluginManager();
- pm.registerEvents(new TheReaperThatCaresPlayerListener(), this);
- }
- ///////////////////////////
- //When plugin is disabled//
- ///////////////////////////
- public void onDisable(){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement