mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-20 21:41:32 +02:00
Essentials should run now...
This commit is contained in:
@@ -27,7 +27,7 @@ public class Kits extends AsyncStorageObjectHolder<com.earth2me.essentials.setti
|
||||
@Override
|
||||
public File getStorageFile() throws IOException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
return new File(ess.getDataFolder(), "kits.yml");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -37,8 +37,8 @@ public abstract class AsyncStorageObjectHolder<T extends StorageObject> implemen
|
||||
|
||||
/**
|
||||
* Warning: If you access this method, you have to acquire a read or write lock first
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @return Object storing all the data
|
||||
*/
|
||||
@Override
|
||||
@@ -93,7 +93,7 @@ public abstract class AsyncStorageObjectHolder<T extends StorageObject> implemen
|
||||
{
|
||||
onReload(true);
|
||||
}
|
||||
|
||||
|
||||
public void onReload(boolean instant)
|
||||
{
|
||||
reader.schedule(instant);
|
||||
@@ -141,6 +141,10 @@ public abstract class AsyncStorageObjectHolder<T extends StorageObject> implemen
|
||||
public File onStart() throws IOException
|
||||
{
|
||||
final File file = getStorageFile();
|
||||
while (rwl.getReadHoldCount() > 0)
|
||||
{
|
||||
rwl.readLock().unlock();
|
||||
}
|
||||
rwl.writeLock().lock();
|
||||
return file;
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@ public class EssentialsConnect
|
||||
}
|
||||
ess = (IEssentials)essPlugin;
|
||||
protect = (IProtect)essProtect;
|
||||
protect.setSettings(new ProtectHolder(ess));
|
||||
ProtectReloader pr = new ProtectReloader();
|
||||
pr.onReload();
|
||||
ess.addReloadListener(pr);
|
||||
|
Reference in New Issue
Block a user