mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 19:25:15 +01:00
Fix chatfile - shouldn't have changed this with last fix
This commit is contained in:
parent
852c185b0b
commit
aa7d80407f
@ -127,15 +127,12 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent {
|
||||
|
||||
protected void handleWebChat() {
|
||||
File webchatFile = getStandaloneFile("dynmap_webchat.json");
|
||||
File webchatTempFile = getStandaloneFile("dynmap_webchat.json.new");
|
||||
if (webchatFile.exists() && lastTimestamp != 0) {
|
||||
JSONArray jsonMsgs = null;
|
||||
try {
|
||||
FileReader inputFileReader = new FileReader(webchatTempFile);
|
||||
FileReader inputFileReader = new FileReader(webchatFile);
|
||||
jsonMsgs = (JSONArray) parser.parse(inputFileReader);
|
||||
inputFileReader.close();
|
||||
webchatFile.delete();
|
||||
webchatTempFile.renameTo(webchatFile);
|
||||
} catch (IOException ex) {
|
||||
Log.severe("Exception while reading JSON-file.", ex);
|
||||
} catch (ParseException ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user