mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 13:08:04 +02:00
Prevent that a config file is loaded/saved by more than one thread.
This commit is contained in:
parent
4c8d0ea2d9
commit
c9e64d9e46
@ -39,7 +39,7 @@ public class EssentialsConf extends YamlConfiguration
|
||||
this.configFile = configFile;
|
||||
}
|
||||
|
||||
public void load()
|
||||
public synchronized void load()
|
||||
{
|
||||
configFile = configFile.getAbsoluteFile();
|
||||
if (!configFile.getParentFile().exists())
|
||||
@ -356,7 +356,7 @@ public class EssentialsConf extends YamlConfiguration
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(final File file) throws IOException
|
||||
public synchronized void save(final File file) throws IOException
|
||||
{
|
||||
if (file == null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user