	/**
	 * Fired when a player logs in
	 * @param player
	 */
	@Override
	public void onPlayerLogin(L2PcInstance player)
	{
		_log.log(Level.INFO, "Player " + player.getName() + " just logged in!");
		List<Integer> items = new ArrayList<>();
		for (L2ItemInstance item : player.getInventory().getItems())
		{
			items.add(item.getItemId());
		}
		addItemTracker(items);
		addTransformNotify(player);
		addSkillUseNotify(player, -1);
		addAttackNotify(player);
	}

	/**
	 * Fired when a player logs in
	 * @param player
	 */
	@Override
	public void onPlayerLogin(L2PcInstance player)
	{
		_log.log(Level.INFO, "Player " + player.getName() + " just logged in!");
		List<Integer> items = new FastList<Integer>();
		for (L2ItemInstance item : player.getInventory().getItems())
		{
			items.add(item.getItemId());
		}
		addItemTracker(items);
		addTransformNotify(player);
		addSkillUseNotify(player, -1);
		addAttackNotify(player);
	}

Replace Generic With Diamond FastList<Integer> with ArrayList<> in method public onPlayerLogin(player L2PcInstance) : void from class custom.Listeners.Listeners


	/**
	 * Collect awaiting quests/start points and display a QuestChooseWindow (if several available) or QuestWindow.
	 * @param player the L2PcInstance that talk with the {@code npc}.
	 * @param npc the L2NpcInstance that chats with the {@code player}.
	 */
	public static void showQuestWindow(L2PcInstance player, L2Npc npc)
	{
		// collect awaiting quests and start points
		List<Quest> options = new FastList<>();

		QuestState[] awaits = player.getQuestsForTalk(npc.getTemplate().getNpcId());
		List<Quest> starts = npc.getTemplate().getEventQuests(QuestEventType.QUEST_START);

		// Quests are limited between 1 and 999 because those are the quests that are supported by the client.
		// By limiting them there, we are allowed to create custom quests at higher IDs without interfering
		if (awaits != null)
		{
			for (QuestState x : awaits)
			{
				if (!options.contains(x.getQuest()))
				{
					if ((x.getQuest().getQuestIntId() > 0) && (x.getQuest().getQuestIntId() < 20000))
					{
						options.add(x.getQuest());
					}
				}
			}
		}

		if (starts != null)
		{
			for (Quest x : starts)
			{
				if (!options.contains(x))
				{
					if ((x.getQuestIntId() > 0) && (x.getQuestIntId() < 20000))
					{
						options.add(x);
					}
				}
			}
		}

		// Display a QuestChooseWindow (if several quests are available) or QuestWindow
		if (options.size() > 1)
		{
			showQuestChooseWindow(player, npc, options.toArray(new Quest[options.size()]));
		}
		else if (options.size() == 1)
		{
			showQuestWindow(player, npc, options.get(0).getName());
		}
		else
		{
			showQuestWindow(player, npc, "");
		}
	}

	/**
	 * Collect awaiting quests/start points and display a QuestChooseWindow (if several available) or QuestWindow.
	 * @param player the L2PcInstance that talk with the {@code npc}.
	 * @param npc the L2NpcInstance that chats with the {@code player}.
	 */
	public static void showQuestWindow(L2PcInstance player, L2Npc npc)
	{
		// collect awaiting quests and start points
		List<Quest> options = new FastList<Quest>();

		QuestState[] awaits = player.getQuestsForTalk(npc.getTemplate().getNpcId());
		List<Quest> starts = npc.getTemplate().getEventQuests(QuestEventType.QUEST_START);

		// Quests are limited between 1 and 999 because those are the quests that are supported by the client.
		// By limiting them there, we are allowed to create custom quests at higher IDs without interfering
		if (awaits != null)
		{
			for (QuestState x : awaits)
			{
				if (!options.contains(x.getQuest()))
				{
					if ((x.getQuest().getQuestIntId() > 0) && (x.getQuest().getQuestIntId() < 20000))
					{
						options.add(x.getQuest());
					}
				}
			}
		}

		if (starts != null)
		{
			for (Quest x : starts)
			{
				if (!options.contains(x))
				{
					if ((x.getQuestIntId() > 0) && (x.getQuestIntId() < 20000))
					{
						options.add(x);
					}
				}
			}
		}

		// Display a QuestChooseWindow (if several quests are available) or QuestWindow
		if (options.size() > 1)
		{
			showQuestChooseWindow(player, npc, options.toArray(new Quest[options.size()]));
		}
		else if (options.size() == 1)
		{
			showQuestWindow(player, npc, options.get(0).getName());
		}
		else
		{
			showQuestWindow(player, npc, "");
		}
	}

Replace Generic With Diamond FastList<Quest> with FastList<> in method public showQuestWindow(player L2PcInstance, npc L2Npc) : void from class handlers.bypasshandlers.QuestLink


	@Override
	public boolean onActionTime()
	{
		List<L2Character> targetList = new FastList<>();

		// Getting the possible targets

		Collection<L2Object> objs = getEffected().getKnownList().getKnownObjects().values();
		// synchronized (getEffected().getKnownList().getKnownObjects())
		{
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2Attackable) && (obj != getEffected()))
					targetList.add((L2Character) obj);
			}
		}
		// if there is no target, exit function
		if (targetList.isEmpty())
			return true;

		// Choosing randomly a new target
		int nextTargetIdx = Rnd.nextInt(targetList.size());
		L2Object target = targetList.get(nextTargetIdx);

		// Attacking the target
		getEffected().setTarget(target);
		getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);

		return true;
	}

	@Override
	public boolean onActionTime()
	{
		List<L2Character> targetList = new FastList<L2Character>();

		// Getting the possible targets

		Collection<L2Object> objs = getEffected().getKnownList().getKnownObjects().values();
		// synchronized (getEffected().getKnownList().getKnownObjects())
		{
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2Attackable) && (obj != getEffected()))
					targetList.add((L2Character) obj);
			}
		}
		// if there is no target, exit function
		if (targetList.isEmpty())
			return true;

		// Choosing randomly a new target
		int nextTargetIdx = Rnd.nextInt(targetList.size());
		L2Object target = targetList.get(nextTargetIdx);

		// Attacking the target
		getEffected().setTarget(target);
		getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);

		return true;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public onActionTime() : boolean from class handlers.effecthandlers.ConfuseMob


	@Override
	public boolean onActionTime()
	{
		List<L2Character> targetList = new FastList<>();

		// Getting the possible targets

		Collection<L2Object> objs = getEffected().getKnownList().getKnownObjects().values();
		// synchronized (getEffected().getKnownList().getKnownObjects())
		{
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2Character) && (obj != getEffected()))
					targetList.add((L2Character) obj);
			}
		}
		// if there is no target, exit function
		if (targetList.isEmpty())
			return true;

		// Choosing randomly a new target
		int nextTargetIdx = Rnd.nextInt(targetList.size());
		L2Object target = targetList.get(nextTargetIdx);

		// Attacking the target
		getEffected().setTarget(target);
		getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);

		return true;
	}

	@Override
	public boolean onActionTime()
	{
		List<L2Character> targetList = new FastList<L2Character>();

		// Getting the possible targets

		Collection<L2Object> objs = getEffected().getKnownList().getKnownObjects().values();
		// synchronized (getEffected().getKnownList().getKnownObjects())
		{
			for (L2Object obj : objs)
			{
				if ((obj instanceof L2Character) && (obj != getEffected()))
					targetList.add((L2Character) obj);
			}
		}
		// if there is no target, exit function
		if (targetList.isEmpty())
			return true;

		// Choosing randomly a new target
		int nextTargetIdx = Rnd.nextInt(targetList.size());
		L2Object target = targetList.get(nextTargetIdx);

		// Attacking the target
		getEffected().setTarget(target);
		getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);

		return true;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public onActionTime() : boolean from class handlers.effecthandlers.Confusion


	@Override
	public boolean onActionTime()
	{
		if (getCount() >= getTotalCount() - 2)
			return true; // do nothing first 2 times
		int mpConsume = getSkill().getMpConsume();

		L2PcInstance caster = (L2PcInstance) getEffector();

		boolean ss = false;
		boolean bss = false;

		L2ItemInstance weaponInst = caster.getActiveWeaponInstance();
		if (weaponInst != null)
		{
			switch (weaponInst.getChargedSpiritshot())
			{
				case L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT:
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
					bss = true;
					break;
				case L2ItemInstance.CHARGED_SPIRITSHOT:
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
					ss = true;
					break;
			}
		}

		FastList<L2Character> targets = new FastList<>();

		for (L2Character cha : _actor.getKnownList().getKnownCharactersInRadius(getSkill().getSkillRadius()))
		{
			if (cha == null || cha == caster)
				continue;

			if (cha instanceof L2Attackable || cha instanceof L2Playable)
			{
				if (cha.isAlikeDead())
					continue;

				if (mpConsume > caster.getCurrentMp())
				{
					caster.sendPacket(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP);
					return false;
				}

				caster.reduceCurrentMp(mpConsume);
				if (cha instanceof L2Playable)
				{
					if (caster.canAttackCharacter(cha))
					{
						targets.add(cha);
						caster.updatePvPStatus(cha);
					}
				}
				else
					targets.add(cha);
			}
		}

		if (!targets.isEmpty())
		{
			caster.broadcastPacket(new MagicSkillLaunched(caster, getSkill().getId(), getSkill().getLevel(), targets.toArray(new L2Character[targets.size()])));
			for (L2Character target : targets)
			{
				boolean mcrit = Formulas.calcMCrit(caster.getMCriticalHit(target, getSkill()));
				byte shld = Formulas.calcShldUse(caster, target, getSkill());
				int mdam = (int) Formulas.calcMagicDam(caster, target, getSkill(), shld, ss, bss, mcrit);

				if (target instanceof L2Summon)
					target.broadcastStatusUpdate();

				if (mdam > 0)
				{
					if (!target.isRaid()
							&& Formulas.calcAtkBreak(target, mdam))
					{
						target.breakAttack();
						target.breakCast();
					}
					caster.sendDamageMessage(target, mdam, mcrit, false, false);
					target.reduceCurrentHp(mdam, caster, getSkill());
				}
				target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
			}
		}
		return true;
	}

	@Override
	public boolean onActionTime()
	{
		if (getCount() >= getTotalCount() - 2)
			return true; // do nothing first 2 times
		int mpConsume = getSkill().getMpConsume();

		L2PcInstance caster = (L2PcInstance) getEffector();

		boolean ss = false;
		boolean bss = false;

		L2ItemInstance weaponInst = caster.getActiveWeaponInstance();
		if (weaponInst != null)
		{
			switch (weaponInst.getChargedSpiritshot())
			{
				case L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT:
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
					bss = true;
					break;
				case L2ItemInstance.CHARGED_SPIRITSHOT:
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
					ss = true;
					break;
			}
		}

		FastList<L2Character> targets = new FastList<L2Character>();

		for (L2Character cha : _actor.getKnownList().getKnownCharactersInRadius(getSkill().getSkillRadius()))
		{
			if (cha == null || cha == caster)
				continue;

			if (cha instanceof L2Attackable || cha instanceof L2Playable)
			{
				if (cha.isAlikeDead())
					continue;

				if (mpConsume > caster.getCurrentMp())
				{
					caster.sendPacket(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP);
					return false;
				}

				caster.reduceCurrentMp(mpConsume);
				if (cha instanceof L2Playable)
				{
					if (caster.canAttackCharacter(cha))
					{
						targets.add(cha);
						caster.updatePvPStatus(cha);
					}
				}
				else
					targets.add(cha);
			}
		}

		if (!targets.isEmpty())
		{
			caster.broadcastPacket(new MagicSkillLaunched(caster, getSkill().getId(), getSkill().getLevel(), targets.toArray(new L2Character[targets.size()])));
			for (L2Character target : targets)
			{
				boolean mcrit = Formulas.calcMCrit(caster.getMCriticalHit(target, getSkill()));
				byte shld = Formulas.calcShldUse(caster, target, getSkill());
				int mdam = (int) Formulas.calcMagicDam(caster, target, getSkill(), shld, ss, bss, mcrit);

				if (target instanceof L2Summon)
					target.broadcastStatusUpdate();

				if (mdam > 0)
				{
					if (!target.isRaid()
							&& Formulas.calcAtkBreak(target, mdam))
					{
						target.breakAttack();
						target.breakCast();
					}
					caster.sendDamageMessage(target, mdam, mcrit, false, false);
					target.reduceCurrentHp(mdam, caster, getSkill());
				}
				target.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, caster);
			}
		}
		return true;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public onActionTime() : boolean from class handlers.effecthandlers.SignetMDam


	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		L2PcInstance player = null;
		if (activeChar instanceof L2PcInstance)
			player = (L2PcInstance) activeChar;

		L2PcInstance targetPlayer;
		List<L2Character> targetToRes = new FastList<>();

		for (L2Character target: (L2Character[]) targets)
		{
			if (target instanceof L2PcInstance)
			{
				targetPlayer = target.getActingPlayer();

				// Check for same party or for same clan, if target is for clan.
				if (skill.getTargetType() == L2TargetType.TARGET_CORPSE_CLAN)
				{
					if ((player != null) && (player.getClanId() != targetPlayer.getClanId()))
					{
						continue;
					}
				}
			}
			if (target.isVisible())
				targetToRes.add(target);
		}

		if (targetToRes.isEmpty())
		{
			activeChar.abortCast();
			return;
		}

		for (L2Character cha : targetToRes)
			if (activeChar instanceof L2PcInstance)
			{
				if (cha instanceof L2PcInstance)
					((L2PcInstance) cha).reviveRequest((L2PcInstance) activeChar, skill, false);
				else if (cha instanceof L2PetInstance)
					((L2PetInstance) cha).getOwner().reviveRequest((L2PcInstance) activeChar, skill, true);
			}
			else
			{
				DecayTaskManager.getInstance().cancelDecayTask(cha);
				cha.doRevive(Formulas.calculateSkillResurrectRestorePercent(skill.getPower(), activeChar));
			}
	}

	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		L2PcInstance player = null;
		if (activeChar instanceof L2PcInstance)
			player = (L2PcInstance) activeChar;

		L2PcInstance targetPlayer;
		List<L2Character> targetToRes = new FastList<L2Character>();

		for (L2Character target: (L2Character[]) targets)
		{
			if (target instanceof L2PcInstance)
			{
				targetPlayer = target.getActingPlayer();

				// Check for same party or for same clan, if target is for clan.
				if (skill.getTargetType() == L2TargetType.TARGET_CORPSE_CLAN)
				{
					if ((player != null) && (player.getClanId() != targetPlayer.getClanId()))
					{
						continue;
					}
				}
			}
			if (target.isVisible())
				targetToRes.add(target);
		}

		if (targetToRes.isEmpty())
		{
			activeChar.abortCast();
			return;
		}

		for (L2Character cha : targetToRes)
			if (activeChar instanceof L2PcInstance)
			{
				if (cha instanceof L2PcInstance)
					((L2PcInstance) cha).reviveRequest((L2PcInstance) activeChar, skill, false);
				else if (cha instanceof L2PetInstance)
					((L2PetInstance) cha).getOwner().reviveRequest((L2PcInstance) activeChar, skill, true);
			}
			else
			{
				DecayTaskManager.getInstance().cancelDecayTask(cha);
				cha.doRevive(Formulas.calculateSkillResurrectRestorePercent(skill.getPower(), activeChar));
			}
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public useSkill(activeChar L2Character, skill L2Skill, targets L2Object[]) : void from class handlers.skillhandlers.Resurrect


	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		// discharge shots
		final L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance();
		if (weaponInst != null)
		{
			if (skill.isMagic())
			{
				if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
				{
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
				}
				else if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT)
				{
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
				}
			}
		}
		else if (activeChar instanceof L2Summon)
		{
			final L2Summon activeSummon = (L2Summon) activeChar;

			if (skill.isMagic())
			{
				if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
				{
					activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE);
				}
				else if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_SPIRITSHOT)
				{
					activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			((L2Npc) activeChar)._spiritshotcharged = false;
		}

		L2Character target;
		L2Effect effect;

		int count = skill.getMaxNegatedEffects();
		for (L2Object obj : targets)
		{
			if (!(obj instanceof L2Character))
			{
				continue;
			}
			target = (L2Character) obj;

			if (target.isDead())
			{
				continue;
			}

			if (!(target instanceof L2PcInstance))
			{
				continue;
			}

			Env env;
			int lastSkillId = 0;
			final L2Effect[] effects = target.getAllEffects();
			final ArrayList<L2Effect> toSteal = new ArrayList<>(count);

			for (int i = effects.length; --i >= 0;) // reverse order
			{
				effect = effects[i];
				if (effect == null)
				{
					continue;
				}

				if (!effect.canBeStolen()) // remove effect if can't be stolen
				{
					effects[i] = null;
					continue;
				}

				// if eff time is smaller than 5 sec, will not be stolen, just to save CPU,
				// avoid synchronization(?) problems and NPEs
				if ((effect.getAbnormalTime() - effect.getTime()) < 5)
				{
					effects[i] = null;
					continue;
				}

				// first pass - only dances/songs
				if (!effect.getSkill().isDance())
				{
					continue;
				}

				if (effect.getSkill().getId() != lastSkillId)
				{
					lastSkillId = effect.getSkill().getId();
					count--;
				}

				toSteal.add(effect);
				if (count == 0)
				{
					break;
				}
			}

			if (count > 0) // second pass
			{
				lastSkillId = 0;
				for (int i = effects.length; --i >= 0;)
				{
					effect = effects[i];
					if (effect == null)
					{
						continue;
					}

					// second pass - all except dances/songs
					if (effect.getSkill().isDance())
					{
						continue;
					}

					if (effect.getSkill().getId() != lastSkillId)
					{
						lastSkillId = effect.getSkill().getId();
						count--;
					}

					toSteal.add(effect);
					if (count == 0)
					{
						break;
					}
				}
			}

			if (toSteal.size() == 0)
			{
				continue;
			}

			// stealing effects
			for (L2Effect eff : toSteal)
			{
				env = new Env();
				env.setCharacter(target);
				env.setTarget(activeChar);
				env.setSkill(eff.getSkill());
				try
				{
					effect = eff.getEffectTemplate().getStolenEffect(env, eff);
					if (effect != null)
					{
						effect.scheduleEffect();
						if (effect.getShowIcon() && (activeChar instanceof L2PcInstance))
						{
							SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
							sm.addSkillName(effect);
							activeChar.sendPacket(sm);
						}
					}
					// Finishing stolen effect
					eff.exit();
				}
				catch (RuntimeException e)
				{
					_log.log(Level.WARNING, "Cannot steal effect: " + eff + " Stealer: " + activeChar + " Stolen: " + target, e);
				}
			}

			// Possibility of a lethal strike
			Formulas.calcLethalHit(activeChar, target, skill);
		}

		if (skill.hasSelfEffects())
		{
			// Applying self-effects
			effect = activeChar.getFirstEffect(skill.getId());
			if ((effect != null) && effect.isSelfEffect())
			{
				// Replace old effect with new one.
				effect.exit();
			}
			skill.getEffectsSelf(activeChar);
		}
	}

	@Override
	public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
	{
		// discharge shots
		final L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance();
		if (weaponInst != null)
		{
			if (skill.isMagic())
			{
				if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
				{
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
				}
				else if (weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_SPIRITSHOT)
				{
					weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
				}
			}
		}
		else if (activeChar instanceof L2Summon)
		{
			final L2Summon activeSummon = (L2Summon) activeChar;

			if (skill.isMagic())
			{
				if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
				{
					activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE);
				}
				else if (activeSummon.getChargedSpiritShot() == L2ItemInstance.CHARGED_SPIRITSHOT)
				{
					activeSummon.setChargedSpiritShot(L2ItemInstance.CHARGED_NONE);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			((L2Npc) activeChar)._spiritshotcharged = false;
		}

		L2Character target;
		L2Effect effect;

		int count = skill.getMaxNegatedEffects();
		for (L2Object obj : targets)
		{
			if (!(obj instanceof L2Character))
			{
				continue;
			}
			target = (L2Character) obj;

			if (target.isDead())
			{
				continue;
			}

			if (!(target instanceof L2PcInstance))
			{
				continue;
			}

			Env env;
			int lastSkillId = 0;
			final L2Effect[] effects = target.getAllEffects();
			final ArrayList<L2Effect> toSteal = new ArrayList<L2Effect>(count);

			for (int i = effects.length; --i >= 0;) // reverse order
			{
				effect = effects[i];
				if (effect == null)
				{
					continue;
				}

				if (!effect.canBeStolen()) // remove effect if can't be stolen
				{
					effects[i] = null;
					continue;
				}

				// if eff time is smaller than 5 sec, will not be stolen, just to save CPU,
				// avoid synchronization(?) problems and NPEs
				if ((effect.getAbnormalTime() - effect.getTime()) < 5)
				{
					effects[i] = null;
					continue;
				}

				// first pass - only dances/songs
				if (!effect.getSkill().isDance())
				{
					continue;
				}

				if (effect.getSkill().getId() != lastSkillId)
				{
					lastSkillId = effect.getSkill().getId();
					count--;
				}

				toSteal.add(effect);
				if (count == 0)
				{
					break;
				}
			}

			if (count > 0) // second pass
			{
				lastSkillId = 0;
				for (int i = effects.length; --i >= 0;)
				{
					effect = effects[i];
					if (effect == null)
					{
						continue;
					}

					// second pass - all except dances/songs
					if (effect.getSkill().isDance())
					{
						continue;
					}

					if (effect.getSkill().getId() != lastSkillId)
					{
						lastSkillId = effect.getSkill().getId();
						count--;
					}

					toSteal.add(effect);
					if (count == 0)
					{
						break;
					}
				}
			}

			if (toSteal.size() == 0)
			{
				continue;
			}

			// stealing effects
			for (L2Effect eff : toSteal)
			{
				env = new Env();
				env.setCharacter(target);
				env.setTarget(activeChar);
				env.setSkill(eff.getSkill());
				try
				{
					effect = eff.getEffectTemplate().getStolenEffect(env, eff);
					if (effect != null)
					{
						effect.scheduleEffect();
						if (effect.getShowIcon() && (activeChar instanceof L2PcInstance))
						{
							SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
							sm.addSkillName(effect);
							activeChar.sendPacket(sm);
						}
					}
					// Finishing stolen effect
					eff.exit();
				}
				catch (RuntimeException e)
				{
					_log.log(Level.WARNING, "Cannot steal effect: " + eff + " Stealer: " + activeChar + " Stolen: " + target, e);
				}
			}

			// Possibility of a lethal strike
			Formulas.calcLethalHit(activeChar, target, skill);
		}

		if (skill.hasSelfEffects())
		{
			// Applying self-effects
			effect = activeChar.getFirstEffect(skill.getId());
			if ((effect != null) && effect.isSelfEffect())
			{
				// Replace old effect with new one.
				effect.exit();
			}
			skill.getEffectsSelf(activeChar);
		}
	}

Replace Generic With Diamond ArrayList<L2Effect> with ArrayList<> in method public useSkill(activeChar L2Character, skill L2Skill, targets L2Object[]) : void from class handlers.skillhandlers.StealBuffs


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			if (onlyFirst)
				return new L2Character[] { player };

			targetList.add(player);

			final int radius = skill.getSkillRadius();

			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());

			if (player.getClan() != null)
			{
				// Get all visible objects in a spherical area near the L2Character
				final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
				for (L2PcInstance obj : objs)
				{
					if (obj == null)
						continue;
					if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId()) && (obj.getClan() == null || obj.getClanId() != player.getClanId()))
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp
					// casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, false))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			if (onlyFirst)
				return new L2Character[] { player };

			targetList.add(player);

			final int radius = skill.getSkillRadius();

			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());

			if (player.getClan() != null)
			{
				// Get all visible objects in a spherical area near the L2Character
				final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
				for (L2PcInstance obj : objs)
				{
					if (obj == null)
						continue;
					if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId()) && (obj.getClan() == null || obj.getClanId() != player.getClanId()))
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp
					// casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, false))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetAlly


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		target = activeChar.getPet();
		if (target == null || !(target instanceof L2ServitorInstance) || target.isDead())
			return _emptyTargetList;

		if (onlyFirst)
			return new L2Character[] { target };

		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final Collection<L2Character> objs = target.getKnownList().getKnownCharacters();
		final int radius = skill.getSkillRadius();

		for (L2Character obj : objs)
		{
			if (obj == null || obj == target || obj == activeChar)
				continue;

			if (!Util.checkIfInRange(radius, target, obj, true))
				continue;

			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
				continue;

			if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
				break;

			targetList.add(obj);
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		target = activeChar.getPet();
		if (target == null || !(target instanceof L2ServitorInstance) || target.isDead())
			return _emptyTargetList;

		if (onlyFirst)
			return new L2Character[] { target };

		final boolean srcInArena = (activeChar.isInsideZone(L2Character.ZONE_PVP) && !activeChar.isInsideZone(L2Character.ZONE_SIEGE));
		final Collection<L2Character> objs = target.getKnownList().getKnownCharacters();
		final int radius = skill.getSkillRadius();

		for (L2Character obj : objs)
		{
			if (obj == null || obj == target || obj == activeChar)
				continue;

			if (!Util.checkIfInRange(radius, target, obj, true))
				continue;

			if (!(obj instanceof L2Attackable || obj instanceof L2Playable))
				continue;

			if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena))
				continue;

			if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
				break;

			targetList.add(obj);
		}

		if (targetList.isEmpty())
			return _emptyTargetList;

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetAreaSummon


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			if (onlyFirst)
				return new L2Character[] { player };

			targetList.add(player);

			final int radius = skill.getSkillRadius();
			final L2Clan clan = player.getClan();

			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());

			if (clan != null)
			{
				L2PcInstance obj;
				for (L2ClanMember member : clan.getMembers())
				{
					obj = member.getPlayerInstance();

					if (obj == null || obj == player)
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, false))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			// for buff purposes, returns friendly mobs nearby and mob itself
			final L2Npc npc = (L2Npc) activeChar;
			if (npc.getFactionId() == null || npc.getFactionId().isEmpty())
			{
				return new L2Character[] { activeChar };
			}

			targetList.add(activeChar);

			final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();

			for (L2Object newTarget : objs)
			{
				if (newTarget instanceof L2Npc && npc.getFactionId().equals(((L2Npc) newTarget).getFactionId()))
				{
					if (!Util.checkIfInRange(skill.getCastRange(), activeChar, newTarget, true))
						continue;

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add((L2Npc) newTarget);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			if (onlyFirst)
				return new L2Character[] { player };

			targetList.add(player);

			final int radius = skill.getSkillRadius();
			final L2Clan clan = player.getClan();

			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());

			if (clan != null)
			{
				L2PcInstance obj;
				for (L2ClanMember member : clan.getMembers())
				{
					obj = member.getPlayerInstance();

					if (obj == null || obj == player)
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, false))
						continue;

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			// for buff purposes, returns friendly mobs nearby and mob itself
			final L2Npc npc = (L2Npc) activeChar;
			if (npc.getFactionId() == null || npc.getFactionId().isEmpty())
			{
				return new L2Character[] { activeChar };
			}

			targetList.add(activeChar);

			final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();

			for (L2Object newTarget : objs)
			{
				if (newTarget instanceof L2Npc && npc.getFactionId().equals(((L2Npc) newTarget).getFactionId()))
				{
					if (!Util.checkIfInRange(skill.getCastRange(), activeChar, newTarget, true))
						continue;

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add((L2Npc) newTarget);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetClan


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] {player};

			final int radius = skill.getSkillRadius();

			if (L2Skill.addSummon(activeChar, player, radius, true))
				targetList.add(player.getPet());

			if (player.getClan() != null)
			{
				// Get all visible objects in a spherical area near the L2Character
				final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
				//synchronized (activeChar.getKnownList().getKnownObjects())
				{
					for (L2PcInstance obj : objs)
					{
						if (obj == null)
							continue;
						if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId())
								&& (obj.getClan() == null || obj.getClanId() != player.getClanId()))
							continue;

						if (player.isInDuel())
						{
							if (player.getDuelId() != obj.getDuelId())
								continue;
							if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
								continue;
						}

						// Don't add this target if this is a Pc->Pc pvp
						// casting and pvp condition not met
						if (!player.checkPvpSkill(obj, skill))
							continue;

						if (!TvTEvent.checkForTvTSkill(player, obj, skill))
							continue;

						if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, true))
							targetList.add(obj.getPet());

						if (!L2Skill.addCharacter(activeChar, obj, radius, true))
							continue;

						// Siege battlefield resurrect has been made possible for participants
						if (skill.getSkillType() == L2SkillType.RESURRECT)
						{
							if (obj.isInsideZone(L2Character.ZONE_SIEGE) && !obj.isInSiege())
								continue;
						}

						if (onlyFirst)
							return new L2Character[] { obj };

						if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
							break;

						targetList.add(obj);
					}
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] {player};

			final int radius = skill.getSkillRadius();

			if (L2Skill.addSummon(activeChar, player, radius, true))
				targetList.add(player.getPet());

			if (player.getClan() != null)
			{
				// Get all visible objects in a spherical area near the L2Character
				final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
				//synchronized (activeChar.getKnownList().getKnownObjects())
				{
					for (L2PcInstance obj : objs)
					{
						if (obj == null)
							continue;
						if ((obj.getAllyId() == 0 || obj.getAllyId() != player.getAllyId())
								&& (obj.getClan() == null || obj.getClanId() != player.getClanId()))
							continue;

						if (player.isInDuel())
						{
							if (player.getDuelId() != obj.getDuelId())
								continue;
							if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
								continue;
						}

						// Don't add this target if this is a Pc->Pc pvp
						// casting and pvp condition not met
						if (!player.checkPvpSkill(obj, skill))
							continue;

						if (!TvTEvent.checkForTvTSkill(player, obj, skill))
							continue;

						if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, true))
							targetList.add(obj.getPet());

						if (!L2Skill.addCharacter(activeChar, obj, radius, true))
							continue;

						// Siege battlefield resurrect has been made possible for participants
						if (skill.getSkillType() == L2SkillType.RESURRECT)
						{
							if (obj.isInsideZone(L2Character.ZONE_SIEGE) && !obj.isInSiege())
								continue;
						}

						if (onlyFirst)
							return new L2Character[] { obj };

						if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
							break;

						targetList.add(obj);
					}
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetCorpseAlly


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			final int radius = skill.getSkillRadius();
			final L2Clan clan = player.getClan();

			if (L2Skill.addSummon(activeChar, player, radius, true))
				targetList.add(player.getPet());

			if (clan != null)
			{
				L2PcInstance obj;
				for (L2ClanMember member : clan.getMembers())
				{
					obj = member.getPlayerInstance();

					if (obj == null || obj == player)
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, true))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, true))
						continue;

					if (skill.getSkillType() == L2SkillType.RESURRECT)
					{
						// check target is not in a active siege zone
						if (obj.isInsideZone(L2Character.ZONE_SIEGE) && !obj.isInSiege())
							continue;
					}

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			// for buff purposes, returns friendly mobs nearby and mob itself
			final L2Npc npc = (L2Npc) activeChar;
			if (npc.getFactionId() == null || npc.getFactionId().isEmpty())
			{
				return new L2Character[] { activeChar };
			}

			targetList.add(activeChar);

			final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();

			for (L2Object newTarget : objs)
			{
				if (newTarget instanceof L2Npc && npc.getFactionId().equals(((L2Npc) newTarget).getFactionId()))
				{
					if (!Util.checkIfInRange(skill.getCastRange(), activeChar, newTarget, true))
						continue;

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add((L2Npc) newTarget);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (activeChar instanceof L2Playable)
		{
			final L2PcInstance player = activeChar.getActingPlayer();

			if (player == null)
				return _emptyTargetList;

			if (player.isInOlympiadMode())
				return new L2Character[] { player };

			final int radius = skill.getSkillRadius();
			final L2Clan clan = player.getClan();

			if (L2Skill.addSummon(activeChar, player, radius, true))
				targetList.add(player.getPet());

			if (clan != null)
			{
				L2PcInstance obj;
				for (L2ClanMember member : clan.getMembers())
				{
					obj = member.getPlayerInstance();

					if (obj == null || obj == player)
						continue;

					if (player.isInDuel())
					{
						if (player.getDuelId() != obj.getDuelId())
							continue;
						if (player.isInParty() && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
							continue;
					}

					// Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
					if (!player.checkPvpSkill(obj, skill))
						continue;

					if (!TvTEvent.checkForTvTSkill(player, obj, skill))
						continue;

					if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, true))
						targetList.add(obj.getPet());

					if (!L2Skill.addCharacter(activeChar, obj, radius, true))
						continue;

					if (skill.getSkillType() == L2SkillType.RESURRECT)
					{
						// check target is not in a active siege zone
						if (obj.isInsideZone(L2Character.ZONE_SIEGE) && !obj.isInSiege())
							continue;
					}

					if (onlyFirst)
						return new L2Character[] { obj };

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(obj);
				}
			}
		}
		else if (activeChar instanceof L2Npc)
		{
			// for buff purposes, returns friendly mobs nearby and mob itself
			final L2Npc npc = (L2Npc) activeChar;
			if (npc.getFactionId() == null || npc.getFactionId().isEmpty())
			{
				return new L2Character[] { activeChar };
			}

			targetList.add(activeChar);

			final Collection<L2Object> objs = activeChar.getKnownList().getKnownObjects().values();

			for (L2Object newTarget : objs)
			{
				if (newTarget instanceof L2Npc && npc.getFactionId().equals(((L2Npc) newTarget).getFactionId()))
				{
					if (!Util.checkIfInRange(skill.getCastRange(), activeChar, newTarget, true))
						continue;

					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add((L2Npc) newTarget);
				}
			}
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetCorpseClan


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		final boolean isSummon = target instanceof L2ServitorInstance;
		if (!(isSummon || target instanceof L2Attackable) || !target.isDead())
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		// Corpse mob only available for half time
		switch (skill.getSkillType())
		{
			case SUMMON:
			{
				if (isSummon && ((L2ServitorInstance)target).getOwner() != null
						&& ((L2ServitorInstance)target).getOwner().getObjectId() == activeChar.getObjectId())
					return _emptyTargetList;

				break;
			}
			case DRAIN:
			{
				if (!((L2Attackable) target).checkCorpseTime(activeChar.getActingPlayer(), (Config.NPC_DECAY_TIME / 2), true))
				{
					return _emptyTargetList;
				}
			}
		}

		if (!onlyFirst)
		{
			targetList.add(target);
			return targetList.toArray(new L2Object[targetList.size()]);
		}
		return new L2Character[] { target };
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		final boolean isSummon = target instanceof L2ServitorInstance;
		if (!(isSummon || target instanceof L2Attackable) || !target.isDead())
		{
			activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
			return _emptyTargetList;
		}

		// Corpse mob only available for half time
		switch (skill.getSkillType())
		{
			case SUMMON:
			{
				if (isSummon && ((L2ServitorInstance)target).getOwner() != null
						&& ((L2ServitorInstance)target).getOwner().getObjectId() == activeChar.getObjectId())
					return _emptyTargetList;

				break;
			}
			case DRAIN:
			{
				if (!((L2Attackable) target).checkCorpseTime(activeChar.getActingPlayer(), (Config.NPC_DECAY_TIME / 2), true))
				{
					return _emptyTargetList;
				}
			}
		}

		if (!onlyFirst)
		{
			targetList.add(target);
			return targetList.toArray(new L2Object[targetList.size()]);
		}
		return new L2Character[] { target };
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetCorpseMob


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (onlyFirst)
			return new L2Character[] { activeChar };

		targetList.add(activeChar);

		final int radius = skill.getSkillRadius();

		L2PcInstance player = activeChar.getActingPlayer();
		if (activeChar instanceof L2Summon)
		{
			if (L2Skill.addCharacter(activeChar, player, radius, false))
				targetList.add(player);
		}
		else if (activeChar instanceof L2PcInstance)
		{
			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());
		}

		if (activeChar.isInParty())
		{
			// Get a list of Party Members
			for (L2PcInstance partyMember : activeChar.getParty().getMembers())
			{
				if (partyMember == null || partyMember == player)
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				if (L2Skill.addCharacter(activeChar, partyMember, radius, false))
					targetList.add(partyMember);

				if (L2Skill.addSummon(activeChar, partyMember, radius, false))
					targetList.add(partyMember.getPet());
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (onlyFirst)
			return new L2Character[] { activeChar };

		targetList.add(activeChar);

		final int radius = skill.getSkillRadius();

		L2PcInstance player = activeChar.getActingPlayer();
		if (activeChar instanceof L2Summon)
		{
			if (L2Skill.addCharacter(activeChar, player, radius, false))
				targetList.add(player);
		}
		else if (activeChar instanceof L2PcInstance)
		{
			if (L2Skill.addSummon(activeChar, player, radius, false))
				targetList.add(player.getPet());
		}

		if (activeChar.isInParty())
		{
			// Get a list of Party Members
			for (L2PcInstance partyMember : activeChar.getParty().getMembers())
			{
				if (partyMember == null || partyMember == player)
					continue;

				if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
					break;

				if (L2Skill.addCharacter(activeChar, partyMember, radius, false))
					targetList.add(partyMember);

				if (L2Skill.addSummon(activeChar, partyMember, radius, false))
					targetList.add(partyMember.getPet());
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetParty


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (onlyFirst)
			return new L2Character[] { activeChar };

		final L2PcInstance player = activeChar.getActingPlayer();

		if (player == null)
			return _emptyTargetList;

		targetList.add(player);

		final int radius = skill.getSkillRadius();
		final boolean hasClan = player.getClan() != null;
		final boolean hasParty = player.isInParty();

		if (L2Skill.addSummon(activeChar, player, radius, false))
			targetList.add(player.getPet());

		// if player in clan and not in party
		if (!(hasClan || hasParty))
			return targetList.toArray(new L2Character[targetList.size()]);

		// Get all visible objects in a spherical area near the L2Character
		final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
		for (L2PcInstance obj : objs)
		{
			if (obj == null)
				continue;

			// olympiad mode - adding only own side
			if (player.isInOlympiadMode())
			{
				if (!obj.isInOlympiadMode())
					continue;
				if (player.getOlympiadGameId() != obj.getOlympiadGameId())
					continue;
				if (player.getOlympiadSide() != obj.getOlympiadSide())
					continue;
			}

			if (player.isInDuel())
			{
				if (player.getDuelId() != obj.getDuelId())
					continue;

				if (hasParty && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
					continue;
			}

			if (!((hasClan && obj.getClanId() == player.getClanId()) || (hasParty && obj.isInParty() && player.getParty().getLeaderObjectId() == obj.getParty().getLeaderObjectId())))
				continue;

			// Don't add this target if this is a Pc->Pc pvp
			// casting and pvp condition not met
			if (!player.checkPvpSkill(obj, skill))
				continue;

			if (!TvTEvent.checkForTvTSkill(player, obj, skill))
				continue;

			if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
				targetList.add(obj.getPet());

			if (!L2Skill.addCharacter(activeChar, obj, radius, false))
				continue;

			if (onlyFirst)
				return new L2Character[] { obj };

			if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
				break;

			targetList.add(obj);
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (onlyFirst)
			return new L2Character[] { activeChar };

		final L2PcInstance player = activeChar.getActingPlayer();

		if (player == null)
			return _emptyTargetList;

		targetList.add(player);

		final int radius = skill.getSkillRadius();
		final boolean hasClan = player.getClan() != null;
		final boolean hasParty = player.isInParty();

		if (L2Skill.addSummon(activeChar, player, radius, false))
			targetList.add(player.getPet());

		// if player in clan and not in party
		if (!(hasClan || hasParty))
			return targetList.toArray(new L2Character[targetList.size()]);

		// Get all visible objects in a spherical area near the L2Character
		final Collection<L2PcInstance> objs = activeChar.getKnownList().getKnownPlayersInRadius(radius);
		for (L2PcInstance obj : objs)
		{
			if (obj == null)
				continue;

			// olympiad mode - adding only own side
			if (player.isInOlympiadMode())
			{
				if (!obj.isInOlympiadMode())
					continue;
				if (player.getOlympiadGameId() != obj.getOlympiadGameId())
					continue;
				if (player.getOlympiadSide() != obj.getOlympiadSide())
					continue;
			}

			if (player.isInDuel())
			{
				if (player.getDuelId() != obj.getDuelId())
					continue;

				if (hasParty && obj.isInParty() && player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())
					continue;
			}

			if (!((hasClan && obj.getClanId() == player.getClanId()) || (hasParty && obj.isInParty() && player.getParty().getLeaderObjectId() == obj.getParty().getLeaderObjectId())))
				continue;

			// Don't add this target if this is a Pc->Pc pvp
			// casting and pvp condition not met
			if (!player.checkPvpSkill(obj, skill))
				continue;

			if (!TvTEvent.checkForTvTSkill(player, obj, skill))
				continue;

			if (!onlyFirst && L2Skill.addSummon(activeChar, obj, radius, false))
				targetList.add(obj.getPet());

			if (!L2Skill.addCharacter(activeChar, obj, radius, false))
				continue;

			if (onlyFirst)
				return new L2Character[] { obj };

			if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
				break;

			targetList.add(obj);
		}

		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetPartyClan


	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<>();
		if (onlyFirst)
			return new L2Character[] { activeChar };

		L2PcInstance player = null;

		if (activeChar instanceof L2Summon)
		{
			player = ((L2Summon) activeChar).getOwner();
			targetList.add(player);
		}
		else if (activeChar instanceof L2PcInstance)
		{
			player = (L2PcInstance) activeChar;
			if (activeChar.getPet() != null)
				targetList.add(activeChar.getPet());
		}

		if (activeChar.getParty() != null)
		{
			List<L2PcInstance> partyList = activeChar.getParty().getMembers();

			for (L2PcInstance partyMember : partyList)
			{
				if (partyMember == null)
					continue;
				else if (partyMember == player)
					continue;
				else if (!partyMember.isDead() && Util.checkIfInRange(skill.getSkillRadius(), activeChar, partyMember, true))
				{
					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(partyMember);

					if (partyMember.getPet() != null && !partyMember.getPet().isDead())
					{
						targetList.add(partyMember.getPet());
					}
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

	@Override
	public L2Object[] getTargetList(L2Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
	{
		List<L2Character> targetList = new FastList<L2Character>();
		if (onlyFirst)
			return new L2Character[] { activeChar };

		L2PcInstance player = null;

		if (activeChar instanceof L2Summon)
		{
			player = ((L2Summon) activeChar).getOwner();
			targetList.add(player);
		}
		else if (activeChar instanceof L2PcInstance)
		{
			player = (L2PcInstance) activeChar;
			if (activeChar.getPet() != null)
				targetList.add(activeChar.getPet());
		}

		if (activeChar.getParty() != null)
		{
			List<L2PcInstance> partyList = activeChar.getParty().getMembers();

			for (L2PcInstance partyMember : partyList)
			{
				if (partyMember == null)
					continue;
				else if (partyMember == player)
					continue;
				else if (!partyMember.isDead() && Util.checkIfInRange(skill.getSkillRadius(), activeChar, partyMember, true))
				{
					if (skill.getMaxTargets() > -1 && targetList.size() >= skill.getMaxTargets())
						break;

					targetList.add(partyMember);

					if (partyMember.getPet() != null && !partyMember.getPet().isDead())
					{
						targetList.add(partyMember.getPet());
					}
				}
			}
		}
		return targetList.toArray(new L2Character[targetList.size()]);
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getTargetList(skill L2Skill, activeChar L2Character, onlyFirst boolean, target L2Character) : L2Object[] from class handlers.targethandlers.TargetPartyNotMe


	@Override
	public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime)
	{
		if (command.startsWith("debug") && command.length() > 6)
		{
			StringTokenizer st = new StringTokenizer(command.substring(6));
			// TODO: Rewrite to use ARM.
			FileOutputStream fos = null;
			OutputStreamWriter out = null;
			try
			{
				String dbg = st.nextToken();

				if (dbg.equals("decay"))
				{
					_print.print(DecayTaskManager.getInstance().toString());
				}
				else if (dbg.equals("packetsend"))
				{
					if (st.countTokens() < 2)
					{
						_print.println("Usage: debug packetsend <charName> <packetData>");
						return false;
					}
					String charName = st.nextToken();
					L2PcInstance targetPlayer = L2World.getInstance().getPlayer(charName);

					if (targetPlayer == null)
					{
						_print.println("Player " + charName + " cannot be found online");
						return false;
					}

					AdminForgePacket sp = new AdminForgePacket();
					while (st.hasMoreTokens())
					{
						String b = st.nextToken();
						if (!b.isEmpty())
							sp.addPart("C".getBytes()[0], "0x" + b);
					}

					targetPlayer.sendPacket(sp);
					_print.println("Packet sent to player " + charName);
				}
				else if (dbg.equals("PacketTP"))
				{
					String str = ThreadPoolManager.getInstance().getPacketStats();
					_print.println(str);
					int i = 0;
					File f = new File("./log/StackTrace-PacketTP-" + i + ".txt");
					while (f.exists())
					{
						i++;
						f = new File("./log/StackTrace-PacketTP-" + i + ".txt");
					}
					f.getParentFile().mkdirs();
					fos = new FileOutputStream(f);
					out = new OutputStreamWriter(fos, "UTF-8");
					out.write(str);
				}
				else if (dbg.equals("IOPacketTP"))
				{
					String str = ThreadPoolManager.getInstance().getIOPacketStats();
					_print.println(str);
					int i = 0;
					File f = new File("./log/StackTrace-IOPacketTP-" + i + ".txt");
					while (f.exists())
					{
						i++;
						f = new File("./log/StackTrace-IOPacketTP-" + i + ".txt");
					}
					f.getParentFile().mkdirs();
					fos = new FileOutputStream(f);
					out = new OutputStreamWriter(fos, "UTF-8");
					out.write(str);
				}
				else if (dbg.equals("GeneralTP"))
				{
					String str = ThreadPoolManager.getInstance().getGeneralStats();
					_print.println(str);
					int i = 0;
					File f = new File("./log/StackTrace-GeneralTP-" + i + ".txt");
					while (f.exists())
					{
						i++;
						f = new File("./log/StackTrace-GeneralTP-" + i + ".txt");
					}
					f.getParentFile().mkdirs();
					fos = new FileOutputStream(f);
					out = new OutputStreamWriter(fos, "UTF-8");
					out.write(str);
				}
				else if (dbg.equals("full"))
				{
					Calendar cal = Calendar.getInstance();
					SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");

					StringBuilder sb = new StringBuilder();
					sb.append(sdf.format(cal.getTime()));
					sb.append("\n\nL2J Server Version: " + Config.SERVER_VERSION);
					sb.append("\nDP Revision: " + Config.DATAPACK_VERSION);
					sb.append("\n\n");
					uptime = _uptime;
					sb.append(getServerStatus());
					sb.append("\n\n");
					sb.append("\n## Java Platform Information ##");
					sb.append("\nJava Runtime Name: " + System.getProperty("java.runtime.name"));
					sb.append("\nJava Version: " + System.getProperty("java.version"));
					sb.append("\nJava Class Version: " + System.getProperty("java.class.version"));
					sb.append('\n');
					sb.append("\n## Virtual Machine Information ##");
					sb.append("\nVM Name: " + System.getProperty("java.vm.name"));
					sb.append("\nVM Version: " + System.getProperty("java.vm.version"));
					sb.append("\nVM Vendor: " + System.getProperty("java.vm.vendor"));
					sb.append("\nVM Info: " + System.getProperty("java.vm.info"));
					sb.append('\n');
					sb.append("\n## OS Information ##");
					sb.append("\nName: " + System.getProperty("os.name"));
					sb.append("\nArchiteture: " + System.getProperty("os.arch"));
					sb.append("\nVersion: " + System.getProperty("os.version"));
					sb.append('\n');
					sb.append("\n## Runtime Information ##");
					sb.append("\nCPU Count: " + Runtime.getRuntime().availableProcessors());
					sb.append("\nCurrent Free Heap Size: " + (Runtime.getRuntime().freeMemory() / 1024 / 1024) + " mb");
					sb.append("\nCurrent Heap Size: " + (Runtime.getRuntime().totalMemory() / 1024 / 1024) + " mb");
					sb.append("\nMaximum Heap Size: " + (Runtime.getRuntime().maxMemory() / 1024 / 1024) + " mb");

					sb.append('\n');
					sb.append("\n## Class Path Information ##\n");
					String cp = System.getProperty("java.class.path");
					String[] libs = cp.split(File.pathSeparator);
					for (String lib : libs)
					{
						sb.append(lib);
						sb.append('\n');
					}

					sb.append('\n');
					sb.append("## Threads Information ##\n");
					Map<Thread, StackTraceElement[]> allThread = Thread.getAllStackTraces();

					FastTable<Entry<Thread, StackTraceElement[]>> entries = new FastTable<>();
					entries.setValueComparator(new FastComparator<Entry<Thread, StackTraceElement[]>>()
					{

						/**
						 *
						 */
						private static final long serialVersionUID = 1L;

						@Override
						public boolean areEqual(Entry<Thread, StackTraceElement[]> e1, Entry<Thread, StackTraceElement[]> e2)
						{
							return e1.getKey().getName().equals(e2.getKey().getName());
						}

						@Override
						public int compare(Entry<Thread, StackTraceElement[]> e1, Entry<Thread, StackTraceElement[]> e2)
						{
							return e1.getKey().getName().compareTo(e2.getKey().getName());
						}

						@Override
						public int hashCodeOf(Entry<Thread, StackTraceElement[]> e)
						{
							return e.hashCode();
						}

					});
					entries.addAll(allThread.entrySet());
					entries.sort();
					for (Entry<Thread, StackTraceElement[]> entry : entries)
					{
						StackTraceElement[] stes = entry.getValue();
						Thread t = entry.getKey();
						sb.append("--------------\n");
						sb.append(t.toString() + " (" + t.getId() + ")\n");
						sb.append("State: " + t.getState() + '\n');
						sb.append("isAlive: " + t.isAlive() + " | isDaemon: " + t.isDaemon() + " | isInterrupted: " + t.isInterrupted() + '\n');
						sb.append('\n');
						for (StackTraceElement ste : stes)
						{
							sb.append(ste.toString());
							sb.append('\n');
						}
						sb.append('\n');
					}

					sb.append('\n');
					ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
					long[] ids = findDeadlockedThreads(mbean);
					if (ids != null && ids.length > 0)
					{
						Thread[] threads = new Thread[ids.length];
						for (int i = 0; i < threads.length; i++)
						{
							threads[i] = findMatchingThread(mbean.getThreadInfo(ids[i]));
						}
						sb.append("Deadlocked Threads:\n");
						sb.append("-------------------\n");
						for (Thread thread : threads)
						{
							System.err.println(thread);
							for (StackTraceElement ste : thread.getStackTrace())
							{
								sb.append("\t" + ste);
								sb.append('\n');
							}
						}
					}

					sb.append("\n\n## Thread Pool Manager Statistics ##\n");
					for (String line : ThreadPoolManager.getInstance().getStats())
					{
						sb.append(line);
						sb.append('\n');
					}

					int i = 0;
					File f = new File("./log/Debug-" + i + ".txt");
					while (f.exists())
					{
						i++;
						f = new File("./log/Debug-" + i + ".txt");
					}
					f.getParentFile().mkdirs();
					fos = new FileOutputStream(f);
					out = new OutputStreamWriter(fos, "UTF-8");
					out.write(sb.toString());
					out.flush();
					out.close();
					fos.close();

					_print.println("Debug output saved to log/" + f.getName());
					_print.flush();
				}
			}
			catch (Exception e)
			{
			}
			finally
			{
				try
				{
					if (out != null)
					{
						out.close();
					}
				}
				catch (Exception e)
				{
				}

				try
				{
					if (fos != null)
					{
						fos.close();
					}
				}
				catch (Exception e)
				{
				}
			}

		}
		return false;
	}

	@Override
	public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime)
	{
		if (command.startsWith("debug") && command.length() > 6)
		{
			StringTokenizer st = new StringTokenizer(command.substring(6));
			// TODO: Rewrite to use ARM.
			FileOutputStream fos = null;
			OutputStreamWriter out = null;
			try
			{
				String dbg = st.nextToken();

				if (dbg.equals("decay"))
				{
					_print.print(DecayTaskManager.getInstance().toString());
				}
				else if (dbg.equals("packetsend"))
				{
					if (st.countTokens() < 2)
					{
						_print.println("Usage: debug packetsend <charName> <packetData>");
						return false;
					}
					String charName = st.nextToken();
					L2PcInstance targetPlayer = L2World.getInstance().getPlayer(charName);

					if (targetPlayer == null)
					{
						_print.println("Player " + charName + " cannot be found online");
						return false;
					}

					AdminForgePacket sp = new AdminForgePacket();
					while (st.hasMoreTokens())
					{
						String b = st.nextToken();
						if (!b.isEmpty())
							sp.addPart("C".getBytes()[0], "0x" + b);
					}

					targetPlayer.sendPacket(sp);
					_print.println("Packet sent to player " + charName);
				}
				else if (dbg.equals("PacketTP"))
				{
					String str = ThreadPoolManager.getInstance().getPacketStats();
					_print.println(str);
					int i = 0;
					File f = new File("./log/StackTrace-PacketTP-" + i + ".txt");
					while (f.exists())
					{
						i++;
						f = new File("./log/StackTrace-PacketTP-" + i + ".txt");
					}
					f.getParentFile().mkdirs();
					fos = new FileOutputStream(f);
					out = new OutputStreamWriter(fos, "UTF-8");
					out.write(str);
				}
				else if (dbg.equals("IOPacketTP"))
				{
					String str = ThreadPoolManager.getInstance().getIOPacketStats();
					_print.println(str);
					int i = 0;
					File f = new File("./log/StackTrace-IOPacketTP-" + i + ".txt");
					while (f.exists())
					{
						i++;
						f = new File("./log/StackTrace-IOPacketTP-" + i + ".txt");
					}
					f.getParentFile().mkdirs();
					fos = new FileOutputStream(f);
					out = new OutputStreamWriter(fos, "UTF-8");
					out.write(str);
				}
				else if (dbg.equals("GeneralTP"))
				{
					String str = ThreadPoolManager.getInstance().getGeneralStats();
					_print.println(str);
					int i = 0;
					File f = new File("./log/StackTrace-GeneralTP-" + i + ".txt");
					while (f.exists())
					{
						i++;
						f = new File("./log/StackTrace-GeneralTP-" + i + ".txt");
					}
					f.getParentFile().mkdirs();
					fos = new FileOutputStream(f);
					out = new OutputStreamWriter(fos, "UTF-8");
					out.write(str);
				}
				else if (dbg.equals("full"))
				{
					Calendar cal = Calendar.getInstance();
					SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");

					StringBuilder sb = new StringBuilder();
					sb.append(sdf.format(cal.getTime()));
					sb.append("\n\nL2J Server Version: " + Config.SERVER_VERSION);
					sb.append("\nDP Revision: " + Config.DATAPACK_VERSION);
					sb.append("\n\n");
					uptime = _uptime;
					sb.append(getServerStatus());
					sb.append("\n\n");
					sb.append("\n## Java Platform Information ##");
					sb.append("\nJava Runtime Name: " + System.getProperty("java.runtime.name"));
					sb.append("\nJava Version: " + System.getProperty("java.version"));
					sb.append("\nJava Class Version: " + System.getProperty("java.class.version"));
					sb.append('\n');
					sb.append("\n## Virtual Machine Information ##");
					sb.append("\nVM Name: " + System.getProperty("java.vm.name"));
					sb.append("\nVM Version: " + System.getProperty("java.vm.version"));
					sb.append("\nVM Vendor: " + System.getProperty("java.vm.vendor"));
					sb.append("\nVM Info: " + System.getProperty("java.vm.info"));
					sb.append('\n');
					sb.append("\n## OS Information ##");
					sb.append("\nName: " + System.getProperty("os.name"));
					sb.append("\nArchiteture: " + System.getProperty("os.arch"));
					sb.append("\nVersion: " + System.getProperty("os.version"));
					sb.append('\n');
					sb.append("\n## Runtime Information ##");
					sb.append("\nCPU Count: " + Runtime.getRuntime().availableProcessors());
					sb.append("\nCurrent Free Heap Size: " + (Runtime.getRuntime().freeMemory() / 1024 / 1024) + " mb");
					sb.append("\nCurrent Heap Size: " + (Runtime.getRuntime().totalMemory() / 1024 / 1024) + " mb");
					sb.append("\nMaximum Heap Size: " + (Runtime.getRuntime().maxMemory() / 1024 / 1024) + " mb");

					sb.append('\n');
					sb.append("\n## Class Path Information ##\n");
					String cp = System.getProperty("java.class.path");
					String[] libs = cp.split(File.pathSeparator);
					for (String lib : libs)
					{
						sb.append(lib);
						sb.append('\n');
					}

					sb.append('\n');
					sb.append("## Threads Information ##\n");
					Map<Thread, StackTraceElement[]> allThread = Thread.getAllStackTraces();

					FastTable<Entry<Thread, StackTraceElement[]>> entries = new FastTable<Entry<Thread, StackTraceElement[]>>();
					entries.setValueComparator(new FastComparator<Entry<Thread, StackTraceElement[]>>()
					{

						/**
						 *
						 */
						private static final long serialVersionUID = 1L;

						@Override
						public boolean areEqual(Entry<Thread, StackTraceElement[]> e1, Entry<Thread, StackTraceElement[]> e2)
						{
							return e1.getKey().getName().equals(e2.getKey().getName());
						}

						@Override
						public int compare(Entry<Thread, StackTraceElement[]> e1, Entry<Thread, StackTraceElement[]> e2)
						{
							return e1.getKey().getName().compareTo(e2.getKey().getName());
						}

						@Override
						public int hashCodeOf(Entry<Thread, StackTraceElement[]> e)
						{
							return e.hashCode();
						}

					});
					entries.addAll(allThread.entrySet());
					entries.sort();
					for (Entry<Thread, StackTraceElement[]> entry : entries)
					{
						StackTraceElement[] stes = entry.getValue();
						Thread t = entry.getKey();
						sb.append("--------------\n");
						sb.append(t.toString() + " (" + t.getId() + ")\n");
						sb.append("State: " + t.getState() + '\n');
						sb.append("isAlive: " + t.isAlive() + " | isDaemon: " + t.isDaemon() + " | isInterrupted: " + t.isInterrupted() + '\n');
						sb.append('\n');
						for (StackTraceElement ste : stes)
						{
							sb.append(ste.toString());
							sb.append('\n');
						}
						sb.append('\n');
					}

					sb.append('\n');
					ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
					long[] ids = findDeadlockedThreads(mbean);
					if (ids != null && ids.length > 0)
					{
						Thread[] threads = new Thread[ids.length];
						for (int i = 0; i < threads.length; i++)
						{
							threads[i] = findMatchingThread(mbean.getThreadInfo(ids[i]));
						}
						sb.append("Deadlocked Threads:\n");
						sb.append("-------------------\n");
						for (Thread thread : threads)
						{
							System.err.println(thread);
							for (StackTraceElement ste : thread.getStackTrace())
							{
								sb.append("\t" + ste);
								sb.append('\n');
							}
						}
					}

					sb.append("\n\n## Thread Pool Manager Statistics ##\n");
					for (String line : ThreadPoolManager.getInstance().getStats())
					{
						sb.append(line);
						sb.append('\n');
					}

					int i = 0;
					File f = new File("./log/Debug-" + i + ".txt");
					while (f.exists())
					{
						i++;
						f = new File("./log/Debug-" + i + ".txt");
					}
					f.getParentFile().mkdirs();
					fos = new FileOutputStream(f);
					out = new OutputStreamWriter(fos, "UTF-8");
					out.write(sb.toString());
					out.flush();
					out.close();
					fos.close();

					_print.println("Debug output saved to log/" + f.getName());
					_print.flush();
				}
			}
			catch (Exception e)
			{
			}
			finally
			{
				try
				{
					if (out != null)
					{
						out.close();
					}
				}
				catch (Exception e)
				{
				}

				try
				{
					if (fos != null)
					{
						fos.close();
					}
				}
				catch (Exception e)
				{
				}
			}

		}
		return false;
	}

Replace Generic With Diamond FastTable<Entry<Thread,StackTraceElement[]>> with FastTable<> in method public useCommand(command String, _print PrintWriter, _cSocket Socket, _uptime int) : boolean from class handlers.telnethandlers.DebugHandler