This repository was archived by the owner on Feb 17, 2024. It is now read-only.
forked from CivClassic/SimpleAdminHacks
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathGameFeaturesConfig.java
More file actions
185 lines (137 loc) · 5.47 KB
/
GameFeaturesConfig.java
File metadata and controls
185 lines (137 loc) · 5.47 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
package com.programmerdan.minecraft.simpleadminhacks.configs;
import com.programmerdan.minecraft.simpleadminhacks.SimpleAdminHacks;
import com.programmerdan.minecraft.simpleadminhacks.framework.SimpleHackConfig;
import org.bukkit.configuration.ConfigurationSection;
/**
* Holds configurations for the GameFeatures module.
*
* @author ProgrammerDan
*/
public class GameFeaturesConfig extends SimpleHackConfig {
private boolean potatoXPEnabled;
private boolean villagerTrading;
private boolean witherSpawning;
private boolean patrolSpawning;
private boolean isPhantomSpawning;
private boolean enderChestPlacement;
private boolean enderChestUse;
private boolean shulkerBoxUse;
private boolean totemPowers;
private boolean chorusFruitUse;
private boolean weepingAngel;
private int weepingAngelEnv;
private int weepingAngelPlayer;
private boolean blockWaterInHell;
private boolean minecartTeleport;
private boolean obsidianGenerators;
private boolean personalDeathMessages;
private boolean disableNetheriteCrafting;
private boolean goldBlockTeleport;
public GameFeaturesConfig(SimpleAdminHacks plugin, ConfigurationSection base) {
super(plugin, base);
}
@Override
protected void wireup(ConfigurationSection config) {
this.potatoXPEnabled = !config.getBoolean("disablePotatoXP", false);
if (!this.potatoXPEnabled) plugin().log(" Potato XP Disabled");
this.villagerTrading = config.getBoolean("villagerTrading", false);
if (!villagerTrading) plugin().log(" VillagerTrading is disabled");
this.witherSpawning = config.getBoolean("witherSpawning", false);
if (!this.witherSpawning) plugin().log(" Wither Spawning is disabled");
this.patrolSpawning = config.getBoolean("patrolSpawning", false);
if (!this.patrolSpawning) plugin().log("Patrol Spawning is disabled");
this.isPhantomSpawning = config.getBoolean("phantomSpawning", false);
if (!this.isPhantomSpawning) plugin().log("Phantom Spawning is disabled");
this.enderChestPlacement = config.getBoolean("enderChestPlacement", true);
if (!this.enderChestPlacement) plugin().log(" Placing EnderChests is disabled");
this.enderChestUse = config.getBoolean("enderChestUse", false);
if (!this.enderChestUse) plugin().log(" Using EnderChests is disabled");
this.shulkerBoxUse = config.getBoolean("shulkerBoxUse", false);
if (!this.shulkerBoxUse) plugin().log(" Using Shulker Boxes is disabled");
this.totemPowers = config.getBoolean("totemPower", false);
if (!this.totemPowers) plugin().log(" Undeath via totems is disabled");
this.chorusFruitUse = config.getBoolean("chorusFruitTeleportation", false);
if (!this.chorusFruitUse) {
plugin().log(" Chorus Fruit Teleportation is disabled");
}
this.weepingAngel = config.getBoolean("weepingAngel.enabled", false);
if (this.weepingAngel) {
this.weepingAngelEnv = config.getInt("weepingAngel.environment", 1);
this.weepingAngelPlayer = config.getInt("weepingAngel.playerKill", 5);
plugin().log(" Weeping Angel is enabled. Times | Env[" + weepingAngelEnv + "] PK[" + weepingAngelPlayer + "]");
}
this.blockWaterInHell = config.getBoolean("blockWaterInHell", true);
if (this.blockWaterInHell) plugin().log(" Blocking bucket use in hell biomes");
this.minecartTeleport = config.getBoolean("minecartTeleport", false);
if (this.minecartTeleport) plugin().log(" Minecart teleporter enabled");
this.obsidianGenerators = config.getBoolean("obsidianGenerators", false);
if (this.obsidianGenerators) plugin().log(" Obsidian generators enabled.");
this.personalDeathMessages = config.getBoolean("personalDeathMessages", false);
if (this.personalDeathMessages) plugin().log(" Personal death messages enabled.");
this.disableNetheriteCrafting = config.getBoolean("disableNetheriteCrafting", true);
if (this.disableNetheriteCrafting) plugin().log(" Disable Netherite Crafting enabled.");
this.goldBlockTeleport = config.getBoolean("goldBlockTeleport", false);
if (this.goldBlockTeleport) plugin().log(" Gold block teleporter enabled.");
/* Add additional feature config grabs here. */
}
/**
* @return If getting XP from potatos is enabled.
*/
public boolean isPotatoXPEnabled() {
return this.potatoXPEnabled;
}
public boolean isVillagerTrading() {
return this.villagerTrading;
}
public boolean isWitherSpawning() {
return this.witherSpawning;
}
public boolean isPatrolSpawning() {
return this.patrolSpawning;
}
public boolean isPhantomSpawning() {
return this.isPhantomSpawning;
}
public boolean isEnderChestPlacement() {
return this.enderChestPlacement;
}
public boolean isEnderChestUse() {
return this.enderChestUse;
}
public boolean isShulkerBoxUse() {
return this.shulkerBoxUse;
}
public boolean isTotemPowers() {
return this.totemPowers;
}
public boolean isChorusFruitTeleportation() {
return this.chorusFruitUse;
}
public boolean isWeepingAngel() {
return this.weepingAngel;
}
public int getWeepingAngelEnv() {
return this.weepingAngelEnv;
}
public int getWeepingAngelPlayer() {
return this.weepingAngelPlayer;
}
public boolean isBlockWaterInHell() {
return this.blockWaterInHell;
}
public boolean isMinecartTeleport() {
return this.minecartTeleport;
}
public boolean isObsidianGenerators() {
return this.obsidianGenerators;
}
public boolean isPersonalDeathMessages() {
return this.personalDeathMessages;
}
public boolean isDisableNetheriteCrafting() {
return this.disableNetheriteCrafting;
}
public boolean isGoldblockTeleport() {
return this.goldBlockTeleport;
}
}