Proper naming for various methods and variables.

This commit is contained in:
MobiusDevelopment
2021-12-26 22:17:47 +00:00
parent f5f80399c5
commit 3e61211e14
369 changed files with 1098 additions and 1099 deletions

View File

@@ -1385,9 +1385,9 @@ public class Config
ALLOW_AIO_IN_EVENTS = generalConfig.getBoolean("AllowAioInEvents", false);
if (ENABLE_AIO_SYSTEM)
{
final String[] AioSkillsSplit = generalConfig.getString("AioSkills", "").split(";");
AIO_SKILLS = new HashMap<>(AioSkillsSplit.length);
for (String skill : AioSkillsSplit)
final String[] aioSkillsSplit = generalConfig.getString("AioSkills", "").split(";");
AIO_SKILLS = new HashMap<>(aioSkillsSplit.length);
for (String skill : aioSkillsSplit)
{
final String[] skillSplit = skill.split(",");
if (skillSplit.length != 2)

View File

@@ -197,15 +197,15 @@ public class AdminBuffs implements IAdminCommandHandler
activeChar.sendPacket(ms);
}
private void removeBuff(Player remover, String playername, int SkillId)
private void removeBuff(Player remover, String playername, int skillId)
{
final Player player = World.getInstance().getPlayer(playername);
if ((player != null) && (SkillId > 0))
if ((player != null) && (skillId > 0))
{
final Effect[] effects = player.getAllEffects().toArray(new Effect[0]);
for (Effect e : effects)
{
if ((e != null) && (e.getSkill().getId() == SkillId))
if ((e != null) && (e.getSkill().getId() == skillId))
{
e.exit(true);
remover.sendMessage("Removed " + e.getSkill().getName() + " level " + e.getSkill().getLevel() + " from " + playername);

View File

@@ -65,7 +65,7 @@ public class AdminMammon implements IAdminCommandHandler
teleportIndex = Integer.parseInt(command.substring(18));
}
}
catch (Exception NumberFormatException)
catch (Exception e)
{
BuilderUtil.sendSysMessage(activeChar, "Usage: //mammon_find [teleportIndex] (where 1 = Blacksmith, 2 = Merchant)");
}

View File

@@ -1133,8 +1133,8 @@ public class TradeList
return false;
}
final Item Item = (Item) obj;
if (item.getEnchant() != Item.getEnchantLevel())
final Item foundItem = (Item) obj;
if (item.getEnchant() != foundItem.getEnchantLevel())
{
final String msgErr = "[RequestPrivateStoreSell] player " + _owner.getName() + " tried to change enchant level in a private store (buy), ban this player!";
Util.handleIllegalPlayerAction(_owner, msgErr, Config.DEFAULT_PUNISH);

View File

@@ -12803,11 +12803,11 @@ public class Player extends Playable
}
}
public void broadcastSnoop(ChatType _chatType, String name, String text, CreatureSay cs)
public void broadcastSnoop(ChatType chatType, String name, String text, CreatureSay cs)
{
if (!_snoopListener.isEmpty())
{
final Snoop sn = new Snoop(this, _chatType, name, text);
final Snoop sn = new Snoop(this, chatType, name, text);
for (Player pci : _snoopListener)
{
if (pci != null)

View File

@@ -466,7 +466,7 @@ public class SignsPriest extends Folk
{
convertCount = Integer.parseInt(command.substring(19).trim());
}
catch (Exception NumberFormatException)
catch (Exception e)
{
player.sendMessage("You must enter an integer amount.");
break;

View File

@@ -242,7 +242,7 @@ public class VillageMaster extends Folk
paramOne = Integer.parseInt(command.substring(11, endIndex).trim());
}
}
catch (Exception NumberFormatException)
catch (Exception e)
{
}

View File

@@ -479,7 +479,7 @@ public class PlayerInventory extends Inventory
@Override
public Item destroyItem(String process, Item item, Player actor, WorldObject reference)
{
final Item Item = super.destroyItem(process, item, actor, reference);
final Item destroyedItem = super.destroyItem(process, item, actor, reference);
if ((_adena != null) && (_adena.getCount() <= 0))
{
@@ -491,7 +491,7 @@ public class PlayerInventory extends Inventory
_ancientAdena = null;
}
return Item;
return destroyedItem;
}
/**
@@ -559,7 +559,7 @@ public class PlayerInventory extends Inventory
@Override
public Item dropItem(String process, Item item, Player actor, WorldObject reference)
{
final Item Item = super.dropItem(process, item, actor, reference);
final Item droppedItem = super.dropItem(process, item, actor, reference);
if ((_adena != null) && ((_adena.getCount() <= 0) || (_adena.getOwnerId() != getOwnerId())))
{
@@ -571,7 +571,7 @@ public class PlayerInventory extends Inventory
_ancientAdena = null;
}
return Item;
return droppedItem;
}
/**

View File

@@ -31,10 +31,10 @@ public class Snoop implements IClientOutgoingPacket
private final String _speaker;
private final String _msg;
public Snoop(Player snooped, ChatType _chatType, String speaker, String msg)
public Snoop(Player snooped, ChatType chatType, String speaker, String msg)
{
_snooped = snooped;
_type = _chatType;
_type = chatType;
_speaker = speaker;
_msg = msg;
}

View File

@@ -405,7 +405,7 @@ public class GameStatusThread extends Thread
{
_print.println("Please Enter * amount of seconds to shutdown!");
}
catch (Exception NumberFormatException)
catch (Exception e)
{
_print.println("Numbers Only!");
}
@@ -423,7 +423,7 @@ public class GameStatusThread extends Thread
{
_print.println("Please Enter * amount of seconds to restart!");
}
catch (Exception NumberFormatException)
catch (Exception e)
{
_print.println("Numbers Only!");
}