Added missing final modifiers.

This commit is contained in:
MobiusDev
2015-12-26 12:03:36 +00:00
parent cc92e5d062
commit e0d681a17e
974 changed files with 5919 additions and 5917 deletions

View File

@@ -409,7 +409,7 @@ public final class Instance
{
if (door != null)
{
L2WorldRegion region = door.getWorldRegion();
final L2WorldRegion region = door.getWorldRegion();
door.decayMe();
if (region != null)
@@ -453,11 +453,11 @@ public final class Instance
public void loadInstanceTemplate(String filename)
{
Document doc = null;
File xml = new File(Config.DATAPACK_ROOT, "instances/" + filename);
final File xml = new File(Config.DATAPACK_ROOT, "instances/" + filename);
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
doc = factory.newDocumentBuilder().parse(xml);
@@ -493,7 +493,7 @@ public final class Instance
{
_allowRandomWalk = Boolean.parseBoolean(a.getNodeValue());
}
Node first = n.getFirstChild();
final Node first = n.getFirstChild();
for (n = first; n != null; n = n.getNextSibling())
{
switch (n.getNodeName().toLowerCase())
@@ -562,15 +562,15 @@ public final class Instance
if ("door".equalsIgnoreCase(d.getNodeName()))
{
doorId = Integer.parseInt(d.getAttributes().getNamedItem("doorId").getNodeValue());
StatsSet set = new StatsSet();
final StatsSet set = new StatsSet();
set.add(DoorData.getInstance().getDoorTemplate(doorId));
for (Node bean = d.getFirstChild(); bean != null; bean = bean.getNextSibling())
{
if ("set".equalsIgnoreCase(bean.getNodeName()))
{
NamedNodeMap attrs = bean.getAttributes();
String setname = attrs.getNamedItem("name").getNodeValue();
String value = attrs.getNamedItem("val").getNodeValue();
final NamedNodeMap attrs = bean.getAttributes();
final String setname = attrs.getNamedItem("name").getNodeValue();
final String value = attrs.getNamedItem("val").getNodeValue();
set.set(setname, value);
}
}
@@ -585,8 +585,8 @@ public final class Instance
{
if ("group".equalsIgnoreCase(group.getNodeName()))
{
String spawnGroup = group.getAttributes().getNamedItem("name").getNodeValue();
List<L2Spawn> manualSpawn = new ArrayList<>();
final String spawnGroup = group.getAttributes().getNamedItem("name").getNodeValue();
final List<L2Spawn> manualSpawn = new ArrayList<>();
for (Node d = group.getFirstChild(); d != null; d = d.getNextSibling())
{
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0, delay = -1;
@@ -686,9 +686,9 @@ public final class Instance
}
case "exitpoint":
{
int x = Integer.parseInt(n.getAttributes().getNamedItem("x").getNodeValue());
int y = Integer.parseInt(n.getAttributes().getNamedItem("y").getNodeValue());
int z = Integer.parseInt(n.getAttributes().getNamedItem("z").getNodeValue());
final int x = Integer.parseInt(n.getAttributes().getNamedItem("x").getNodeValue());
final int y = Integer.parseInt(n.getAttributes().getNamedItem("y").getNodeValue());
final int z = Integer.parseInt(n.getAttributes().getNamedItem("z").getNodeValue());
_exitLocation = new Location(x, y, z);
break;
}
@@ -701,9 +701,9 @@ public final class Instance
{
try
{
int x = Integer.parseInt(loc.getAttributes().getNamedItem("x").getNodeValue());
int y = Integer.parseInt(loc.getAttributes().getNamedItem("y").getNodeValue());
int z = Integer.parseInt(loc.getAttributes().getNamedItem("z").getNodeValue());
final int x = Integer.parseInt(loc.getAttributes().getNamedItem("x").getNodeValue());
final int y = Integer.parseInt(loc.getAttributes().getNamedItem("y").getNodeValue());
final int z = Integer.parseInt(loc.getAttributes().getNamedItem("z").getNodeValue());
_enterLocations.add(new Location(x, y, z));
}
catch (Exception e)
@@ -806,7 +806,7 @@ public final class Instance
else if (_players.isEmpty() && (_emptyDestroyTime > 0))
{
Long emptyTimeLeft = (_lastLeft + _emptyDestroyTime) - System.currentTimeMillis();
final Long emptyTimeLeft = (_lastLeft + _emptyDestroyTime) - System.currentTimeMillis();
if (emptyTimeLeft <= 0)
{
interval = 0;
@@ -837,7 +837,7 @@ public final class Instance
{
timeLeft = remaining / 60000;
interval = 300000;
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTE_S_YOU_WILL_BE_FORCED_OUT_OF_THE_DUNGEON_WHEN_THE_TIME_EXPIRES);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTE_S_YOU_WILL_BE_FORCED_OUT_OF_THE_DUNGEON_WHEN_THE_TIME_EXPIRES);
sm.addString(Integer.toString(timeLeft));
Broadcast.toPlayersInInstance(sm, getId());
remaining = remaining - 300000;
@@ -846,7 +846,7 @@ public final class Instance
{
timeLeft = remaining / 60000;
interval = 60000;
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTE_S_YOU_WILL_BE_FORCED_OUT_OF_THE_DUNGEON_WHEN_THE_TIME_EXPIRES);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTE_S_YOU_WILL_BE_FORCED_OUT_OF_THE_DUNGEON_WHEN_THE_TIME_EXPIRES);
sm.addString(Integer.toString(timeLeft));
Broadcast.toPlayersInInstance(sm, getId());
remaining = remaining - 60000;