FortManager fort list made static.
This commit is contained in:
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -31,17 +31,11 @@ import com.l2jmobius.gameserver.model.entity.siege.Fort;
|
|||||||
/**
|
/**
|
||||||
* @author programmos, scoria dev
|
* @author programmos, scoria dev
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FortManager
|
public class FortManager
|
||||||
{
|
{
|
||||||
protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
public static final FortManager getInstance()
|
private static final List<Fort> _forts = new ArrayList<>();
|
||||||
{
|
|
||||||
return SingletonHolder._instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
private final List<Fort> _forts = new ArrayList<>();
|
|
||||||
|
|
||||||
public FortManager()
|
public FortManager()
|
||||||
{
|
{
|
||||||
@@ -194,6 +188,11 @@ public class FortManager
|
|||||||
return _forts;
|
return _forts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final FortManager getInstance()
|
||||||
|
{
|
||||||
|
return SingletonHolder._instance;
|
||||||
|
}
|
||||||
|
|
||||||
private static class SingletonHolder
|
private static class SingletonHolder
|
||||||
{
|
{
|
||||||
protected static final FortManager _instance = new FortManager();
|
protected static final FortManager _instance = new FortManager();
|
||||||
|
@@ -34,7 +34,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final List<Fort> _forts = new ArrayList<>();
|
private static final List<Fort> _forts = new ArrayList<>();
|
||||||
|
|
||||||
public final int findNearestFortIndex(L2Object obj)
|
public final int findNearestFortIndex(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
|
||||||
|
|
||||||
private final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
private static final Map<Integer, Fort> _forts = new ConcurrentSkipListMap<>();
|
||||||
|
|
||||||
public final Fort findNearestFort(L2Object obj)
|
public final Fort findNearestFort(L2Object obj)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user