-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
ConfigSounds.java
45 lines (36 loc) · 1.26 KB
/
ConfigSounds.java
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
package io.github.thatsmusic99.headsplus.config;
import java.io.IOException;
public class ConfigSounds extends HPConfig {
private static ConfigSounds instance;
public ConfigSounds() throws Exception {
super("sounds.yml");
instance = this;
}
public static ConfigSounds get() {
return instance;
}
@Override
public void addDefaults() {
for (Defaults d : Defaults.values()) {
addDefault("sounds." + d.name + ".sound", "ENTITY_EXPERIENCE_ORB_PICKUP");
addDefault("sounds." + d.name + ".volume", 1.0f);
addDefault("sounds." + d.name + ".pitch", 1.0f);
addDefault("sounds." + d.name + ".enabled", d.enabled);
}
}
private enum Defaults {
SELLHEAD("on-sell-head", true),
BUYHEAD("on-buy-head", true),
CHANGESECTION("on-change-section", true),
ENTITYHEADDROP("on-entity-head-drop", false),
PLAYERHEADDROP("on-player-head-drop", false),
LEVELUP("on-level-up", true),
HEADCRAFT("on-craft-head", false);
private final String name;
private final boolean enabled;
Defaults(String name, boolean enabled) {
this.name = name;
this.enabled = enabled;
}
}
}