◆ get() [1/2]
PhaseDefinition org.turro.alliance.content.AlliancePhaseDefinitions.get |
( |
int |
index | ) |
|
◆ get() [2/2]
PhaseDefinition org.turro.alliance.content.AlliancePhaseDefinitions.get |
( |
String |
name | ) |
|
◆ getMapping()
int org.turro.alliance.content.AlliancePhaseDefinitions.getMapping |
( |
int |
index, |
|
|
String |
serverId |
|
) |
| |
Definition at line 54 of file AlliancePhaseDefinitions.java.
55 PhaseDefinition pd =
get(index);
56 if(pd ==
null)
return index;
57 return pd.getMapping().getOrDefault(serverId, index);
◆ instance()
◆ json()
static Jsons org.turro.alliance.content.AlliancePhaseDefinitions.json |
( |
| ) |
|
|
static |
Definition at line 106 of file AlliancePhaseDefinitions.java.
107 try(FileReader reader =
new FileReader(definitionsFile())) {
108 return Jsons.read(reader);
109 }
catch (IOException ex) {
110 WebLoggers.severe(AlliancePhaseDefinitions.class).exception(ex).log();
112 return Jsons.array();
◆ load()
Definition at line 117 of file AlliancePhaseDefinitions.java.
118 AlliancePhaseDefinitions definitions =
null;
119 if(watch.exists())
try {
121 JSONSerializer ser =
new JSONSerializer(
true);
122 definitions = ser.fromJson(FileUtil.getContent(watch.getFile()), AlliancePhaseDefinitions.class);
123 }
catch (IOException ex) {
124 Logger.getLogger(AlliancePhaseDefinitions.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
126 if(definitions ==
null) {
127 definitions =
new AlliancePhaseDefinitions();
128 definitions.setDefaults();
◆ reset()
static void org.turro.alliance.content.AlliancePhaseDefinitions.reset |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following file: