Write history
()
| 181 | * Write history |
| 182 | */ |
| 183 | public static void write(){ |
| 184 | final File historyFile = getHistoryFile(); |
| 185 | |
| 186 | // remove nonexistant entries |
| 187 | cleanList(); |
| 188 | |
| 189 | // write history |
| 190 | if(!historyFile.exists() || historyFile.canWrite()){ |
| 191 | writeListJSON(historyFile); |
| 192 | } else { |
| 193 | System.err.println("Could not write world history file " |
| 194 | + historyFile.getAbsolutePath()); |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | /** |
| 199 | * Read JSON-formatted history file |