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