summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
blob: d9161bda8290fe83b5e260c8eec5eae5c695e9d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
package com.earth2me.essentials.protect;


public enum ProtectConfig
{
	datatype("protect.datatype", "sqlite"),
	mysqlDB("protect.mysqlDb", "jdbc:mysql://localhost:3306/minecraft"),
	dbUsername("protect.username", "root"),
	dbPassword("protect.password", ""),
	memstore("protect.memstore", false),
	disable_contactdmg("protect.disable.contactdmg", false),
	disable_lavadmg("protect.disable.lavadmg", false),
	disable_build("protect.disable.build", false),
	disable_pvp("protect.disable.pvp", false),
	disable_projectiles("protect.disable.projectiles", false),
	disable_fall("protect.disable.fall", false),
	disable_suffocate("protect.disable.suffocate", false),
	disable_firedmg("protect.disable.firedmg", false),
	disable_lightning("protect.disable.lightning", false),
	disable_drown("protect.disable.drown", false),
	disable_weather_storm("protect.disable.weather.storm", false),
	disable_weather_lightning("protect.disable.weather.lightning", false),
	disable_weather_thunder("protect.disable.weather.thunder", false),
	prevent_fire_spread("protect.prevent.fire-spread", true),
	prevent_flint_fire("protect.prevent.flint-fire", false),
	prevent_lava_fire_spread("protect.prevent.lava-fire-spread", true),
	prevent_lightning_fire_spread("protect.prevent.lightning-fire-spread", true),
	prevent_water_flow("protect.prevent.water-flow", false),
	prevent_lava_flow("protect.prevent.lava-flow", false),
	prevent_water_bucket_flow("protect.prevent.water-bucket-flow", false),
	prevent_portal_creation("protect.prevent.portal-creation", false),
	prevent_block_on_rail("protect.protect.prevent-block-on-rails", false),
	prevent_tnt_explosion("protect.prevent.tnt-explosion", false),
	prevent_creeper_explosion("protect.prevent.creeper-explosion", true),
	prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false),
	prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false),
	prevent_entitytarget("protect.prevent.entitytarget", false),
	protect_rails("protect.protect.rails", true),
	protect_below_rails("protect.protect.block-below", true),
	protect_signs("protect.protect.signs", true),
	protect_against_signs("protect.protect.block-below", true),
	alert_on_placement("protect.alert.on-placement"),
	alert_on_use("protect.alert.on-use"),
	alert_on_break("protect.alert.on-break"),
	blacklist_placement("protect.blacklist.placement"),
	blacklist_usage("protect.blacklist.usage"),
	blacklist_break("protect.blacklist.break");
	private final String configName;
	private final String defValueString;
	private final boolean defValueBoolean;
	private final boolean isList;
	private final boolean isString;

	private ProtectConfig(final String configName)
	{
		this(configName, null, false, true, false);
	}
	
	private ProtectConfig(final String configName, final String defValueString)
	{
		this(configName, defValueString, false, false, true);
	}

	private ProtectConfig(final String configName, final boolean defValueBoolean)
	{
		this(configName, null, defValueBoolean, false, false);
	}

	private ProtectConfig(final String configName, final String defValueString, final boolean defValueBoolean, final boolean isList, final boolean isString)
	{
		this.configName = configName;
		this.defValueString = defValueString;
		this.defValueBoolean = defValueBoolean;
		this.isList = isList;
		this.isString = isString;
	}

	/**
	 * @return the configName
	 */
	public String getConfigName()
	{
		return configName;
	}

	/**
	 * @return the default value String
	 */
	public String getDefaultValueString()
	{
		return defValueString;
	}

	/**
	 * @return the default value boolean
	 */
	public boolean getDefaultValueBoolean()
	{
		return defValueBoolean;
	}

	public boolean isString()
	{
		return isString;
	}
	
	public boolean isList()
	{
		return isList;
	}
}