-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSettings.java
More file actions
97 lines (79 loc) · 3.05 KB
/
Copy pathSettings.java
File metadata and controls
97 lines (79 loc) · 3.05 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
package world.bentobox.controlpanel.config;
import java.util.HashSet;
import java.util.Set;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.api.configuration.ConfigEntry;
import world.bentobox.bentobox.api.configuration.ConfigObject;
import world.bentobox.bentobox.api.configuration.StoreAt;
/**
* Settings that implements ConfigObject is powerful and dynamic Config Objects that
* does not need custom parsing. If it is correctly loaded, all its values will be available.
*
* Without Getter and Setter this class will not work.
*
* To specify location for config object to be stored, you should use @StoreAt(filename="{config file name}", path="{Path to your addon}")
* To save comments in config file you should use @ConfigComment("{message}") that adds any message you want to be in file.
*/
@StoreAt(filename="config.yml", path="addons/ControlPanel")
@ConfigComment("ControlPanelAddon Configuration [version]")
@ConfigComment("This config file is dynamic and saved when the server is shutdown.")
@ConfigComment("")
public class Settings implements ConfigObject
{
// ---------------------------------------------------------------------
// Section: Getters and Setters
// ---------------------------------------------------------------------
/**
* This method returns the disabledGameModes value.
*
* @return the value of disabledGameModes.
*/
public Set<String> getDisabledGameModes()
{
return disabledGameModes;
}
/**
* This method sets the disabledGameModes value.
*
* @param disabledGameModes the disabledGameModes new value.
*/
public void setDisabledGameModes(Set<String> disabledGameModes)
{
this.disabledGameModes = disabledGameModes;
}
/**
* This method returns the templateFile value.
*
* @return the value of templateFile.
*/
public String getTemplateFile()
{
return templateFile;
}
/**
* This method sets the templateFile value.
*
* @param templateFile the templateFile new value.
*/
public void setTemplateFile(String templateFile)
{
this.templateFile = templateFile;
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
@ConfigComment("")
@ConfigComment("This list stores GameModes in which Likes addon should not work.")
@ConfigComment("To disable addon it is necessary to write its name in new line that starts with -. Example:")
@ConfigComment("disabled-gamemodes:")
@ConfigComment(" - BSkyBlock")
@ConfigEntry(path = "disabled-gamemodes")
private Set<String> disabledGameModes = new HashSet<>();
@ConfigComment("")
@ConfigComment("The template file that control panels are imported from.")
@ConfigComment("This file is read when panels are first seeded and re-read on every reload,")
@ConfigComment("so editing it and running 'bbox reload' will apply your changes.")
@ConfigComment("It must exist in the addon folder (addons/ControlPanel).")
@ConfigEntry(path = "template-file")
private String templateFile = "controlPanelTemplate.yml";
}