Separated multiple variable declarations.

This commit is contained in:
MobiusDev
2018-09-09 23:01:15 +00:00
parent d33bfa17b2
commit 0f430720db
881 changed files with 3909 additions and 1507 deletions

View File

@@ -771,9 +771,8 @@ public class AdminEditChar implements IAdminCommandHandler
{
final String val = command.substring(20);
final int level = Integer.parseInt(val);
long newexp, oldexp = 0;
oldexp = pet.getStat().getExp();
newexp = pet.getStat().getExpForLevel(level);
final long oldexp = pet.getStat().getExp();
final long newexp = pet.getStat().getExpForLevel(level);
if (oldexp > newexp)
{
pet.getStat().removeExp(oldexp - newexp);
@@ -1305,7 +1304,7 @@ public class AdminEditChar implements IAdminCommandHandler
int CharactersFound = 0;
L2GameClient client;
String name, ip = "0.0.0.0";
String ip = "0.0.0.0";
final StringBuilder replyMSG = new StringBuilder(1000);
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
adminReply.setFile(activeChar, "data/html/admin/ipfind.htm");
@@ -1341,7 +1340,7 @@ public class AdminEditChar implements IAdminCommandHandler
}
}
name = player.getName();
final String name = player.getName();
CharactersFound += 1;
replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_info ");
replyMSG.append(name);

View File

@@ -567,7 +567,8 @@ public class AdminEffects implements IAdminCommandHandler
try
{
L2Object obj = activeChar.getTarget();
int level = 1, hittime = 1;
int level = 1;
int hittime = 1;
final int skill = Integer.parseInt(st.nextToken());
if (st.hasMoreTokens())
{

View File

@@ -140,7 +140,8 @@ public class AdminElement implements IAdminCommandHandler
if (itemInstance != null)
{
String old, current;
String old;
String current;
final AttributeHolder element = itemInstance.getAttribute(type);
if (element == null)
{

View File

@@ -194,7 +194,10 @@ public class AdminQuest implements IAdminCommandHandler
{
final String questName = command.substring("admin_quest_info ".length());
final Quest quest = QuestManager.getInstance().getQuest(questName);
String events = "", npcs = "", items = "", timers = "";
String events = "";
String npcs = "";
String items = "";
String timers = "";
int counter = 0;
if (quest == null)
{

View File

@@ -231,7 +231,9 @@ public class AdminTeleport implements IAdminCommandHandler
else if (command.startsWith("admin_go"))
{
int intVal = 150;
int x = activeChar.getX(), y = activeChar.getY(), z = activeChar.getZ();
int x = activeChar.getX();
int y = activeChar.getY();
int z = activeChar.getZ();
try
{
final String val = command.substring(8);

View File

@@ -38,7 +38,8 @@ public class VoiceCommand implements IBypassHandler
// only voice commands allowed
if ((command.length() > 7) && (command.charAt(6) == '.'))
{
final String vc, vparams;
final String vc;
final String vparams;
final int endOfCommand = command.indexOf(" ", 7);
if (endOfCommand > 0)
{

View File

@@ -253,7 +253,8 @@ public class Debug implements ITelnetCommand
static String getServerStatus()
{
int playerCount = 0, objectCount = 0;
int playerCount = 0;
int objectCount = 0;
final int max = LoginServerThread.getInstance().getMaxPlayer();
playerCount = L2World.getInstance().getPlayers().size();

View File

@@ -46,7 +46,9 @@ public class ChangePassword implements IVoicedCommandHandler
final StringTokenizer st = new StringTokenizer(target);
try
{
String curpass = null, newpass = null, repeatnewpass = null;
String curpass = null;
String newpass = null;
String repeatnewpass = null;
if (st.hasMoreTokens())
{
curpass = st.nextToken();