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