FortManager fort list made static.

This commit is contained in:
MobiusDev
2019-03-04 09:44:21 +00:00
parent d5f5be1fea
commit cf37fa4b7b
13 changed files with 18 additions and 19 deletions

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -31,17 +31,11 @@ import com.l2jmobius.gameserver.model.entity.siege.Fort;
/**
* @author programmos, scoria dev
*/
public class FortManager
{
protected static final Logger LOGGER = Logger.getLogger(FortManager.class.getName());
public static final FortManager getInstance()
{
return SingletonHolder._instance;
}
private final List<Fort> _forts = new ArrayList<>();
private static final List<Fort> _forts = new ArrayList<>();
public FortManager()
{
@@ -194,6 +188,11 @@ public class FortManager
return _forts;
}
public static final FortManager getInstance()
{
return SingletonHolder._instance;
}
private static class SingletonHolder
{
protected static final FortManager _instance = new FortManager();

View File

@@ -34,7 +34,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{

View File

@@ -35,7 +35,7 @@ public final class FortManager implements InstanceListManager
{
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)
{