View difference between Paste ID: ne73yMFD and JSNYwxZa
SHOW: | | - or go back to the newest paste.
1-
The Quickening
1+
package me.TechManDylan.bukkit.TheReaperThatCares;
2-
	- Gain another players EXP levels when you kill them.
2+
3-
	- Only a sword can kill and Immortal.
3+
import java.io.File;
4-
	- Sense other Immotals around you.
4+
5-
	- Dramatic lightning and explosions when you kill another Immortal.
5+
import org.bukkit.configuration.file.FileConfiguration;
6-
	- Encourages 1v1 combat as explosions will kill all surrounding players in a certain radius.
6+
import org.bukkit.plugin.PluginManager;
7-
	- Warning will be issued if in the blast radius.
7+
import org.bukkit.plugin.java.JavaPlugin;
8-
	- Player will be invincible while receiving the quickening and for 15 seconds after.
8+
9
public class TheReaperThatCares extends JavaPlugin {
10
	FileConfiguration config;
11
	//////////////////////////
12
	//When Plugin is enabled//
13
	//////////////////////////
14
	public void onEnable(){
15
		try{
16
			/////////////////////////////
17
			//Config is get config file//
18
			/////////////////////////////
19
			config = getConfig();
20
			///////////////////////////
21
			//Make Config Directory//
22
			///////////////////////////
23
			File TheReaperThatCares = new File (getDataFolder() + "config.yml");
24
			///////////////////////////
25
			// Making the config file//
26
			///////////////////////////
27
			if(!config.contains("Config.NoExpLoss.Void")) {
28
29
				config.set("Config.ExpLoss.Void", true);
30
31
				}
32
			if(!config.contains("Config.NoExpLoss.Lightning")) {
33
34
				config.set("Config.ExpLoss.Lightning", true);
35
36
				}	
37
			if(!config.contains("Config.NoExpLoss.Fall")) {
38
39
				config.set("Config.ExpLoss.Fall", true);
40
41
				}
42
			if(!config.contains("Config.NoExpLoss.Fire")) {
43
44
				config.set("Config.ExpLoss.Fire", true);
45
46
				}
47
			if(!config.contains("Config.NoExpLoss.Fire_Tick")) {
48
49
				config.set("Config.ExpLoss.Fire", true);
50
51
				}
52
			if(!config.contains("Config.NoExpLoss.Lava")) {
53
54
				config.set("Config.ExpLoss.Lava", true);
55
56
				}	
57
			if(!config.contains("Config.NoExpLoss.Suffocation")) {
58
59
				config.set("Config.ExpLoss.Suffocation", true);
60
61
				}	
62
			if(!config.contains("Config.NoExpLoss.Drowning")) {
63
64
				config.set("Config.ExpLoss.Drowning", true);
65
66
				}	
67
			if(!config.contains("Config.NoExpLoss.Suicide")) {
68
69
				config.set("Config.ExpLoss.Suicide", true);
70
71
				}	
72
			if(!config.contains("Config.NoExpLoss.Starvation")) {
73
74
				config.set("Config.ExpLoss.Starvation", true);
75
76
				}	
77
			if(!config.contains("Config.NoExpLoss.Poison")) {
78
79
				config.set("Config.ExpLoss.Poison", true);
80
81
				}	
82
			if(!config.contains("Config.NoExpLoss.Contact")) {
83
84
				config.set("Config.ExpLoss.Contact", true);
85
86
				}	
87
			if(!config.contains("Config.NoExpLoss.Entity Explosion")) {
88
89
				config.set("Config.ExpLoss.Entity Explosion", true);
90
91
				}	
92
			if(!config.contains("Config.NoExpLoss.Block Explosion")) {
93
94
				config.set("Config.ExpLoss.Block Explosion", true);
95
96
				}
97
			if(!config.contains("Config.NoExpLoss.Potion Damage")) {
98
99
				config.set("Config.ExpLoss.Mob Potion Damage", true);
100
101
				}	
102
			if(!config.contains("Config.NoExpLoss.Player Attack")) {
103
104
				config.set("Config.ExpLoss.Player Attack", true);
105
106
				}	
107
			if(!config.contains("Config.NoExpLoss.Mob Attack")) {
108
109
				config.set("Config.ExpLoss.Mob Attack", true);
110
111
				}	
112
			if(!config.contains("Config.NoExpLoss.Player Projectile")) {
113
114
				config.set("Config.ExpLoss.Player Projectile", true);
115
116
				}
117
			if(!config.contains("Config.NoExpLoss.Mob Projectile")) {
118
119
				config.set("Config.ExpLoss.Mob Projectile", true);
120
121
				}	
122
			saveConfig();
123
			/////////////////////
124
			// Config file made//
125
			/////////////////////
126
			
127
			//////////////////////////////
128
			//Catch and print any errors//
129
			//////////////////////////////
130
		} catch(Exception e1) {
131
			e1.printStackTrace();
132
		}
133
		PluginManager pm = this.getServer().getPluginManager();
134
		pm.registerEvents(new TheReaperThatCaresPlayerListener(), this);
135
		}
136
	///////////////////////////
137
	//When plugin is disabled//
138
	///////////////////////////
139
	public void onDisable(){ 
140
		
141
	}
142
}