/**
	 * Add a list of Funcs to the Calculator set of the L2Character.

	 *
	 *  Concept :

	 * A L2Character owns a table of Calculators called _calculators.
	 * Each Calculator (a calculator per state) own a table of Func object.
	 * A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).

	 *
	 *  Caution : This method is ONLY for L2PcInstance

	 *
	 *  Example of use  :

	 *
 Equip an item from inventory

	 *
 Learn a new passive skill

	 *
 Use an active skill

	 *
	 * @param funcs The list of Func objects to add to the Calculator corresponding to the state affected
	 */
	public final void addStatFuncs(Func[] funcs)
	{

		List<Stats> modifiedStats = new ArrayList<>();

		for (Func f : funcs)
		{
			modifiedStats.add(f.stat);
			addStatFunc(f);
		}
		broadcastModifiedStats(modifiedStats);
	}

/**
	 * Add a list of Funcs to the Calculator set of the L2Character.

	 *
	 *  Concept :

	 * A L2Character owns a table of Calculators called _calculators.
	 * Each Calculator (a calculator per state) own a table of Func object.
	 * A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).

	 *
	 *  Caution : This method is ONLY for L2PcInstance

	 *
	 *  Example of use  :

	 *
 Equip an item from inventory

	 *
 Learn a new passive skill

	 *
 Use an active skill

	 *
	 * @param funcs The list of Func objects to add to the Calculator corresponding to the state affected
	 */
	public final void addStatFuncs(Func[] funcs)
	{

		FastList<Stats> modifiedStats = new FastList<Stats>();

		for (Func f : funcs)
		{
			modifiedStats.add(f.stat);
			addStatFunc(f);
		}
		broadcastModifiedStats(modifiedStats);
	}

Replace Generic With Diamond FastList<Stats> with ArrayList<> in method public addStatFuncs(funcs Func[]) : void from class com.l2jserver.gameserver.model.actor.L2Character


/**
	 * Remove a list of Funcs from the Calculator set of the L2PcInstance.

	 *
	 *  Concept :

	 * A L2Character owns a table of Calculators called _calculators.
	 * Each Calculator (a calculator per state) own a table of Func object.
	 * A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).

	 *
	 *  Caution : This method is ONLY for L2PcInstance

	 *
	 *  Example of use  :

	 *
 Unequip an item from inventory

	 *
 Stop an active skill

	 *
	 * @param funcs The list of Func objects to add to the Calculator corresponding to the state affected
	 */
	public final void removeStatFuncs(Func[] funcs)
	{

		List<Stats> modifiedStats = new ArrayList<>();

		for (Func f : funcs)
		{
			modifiedStats.add(f.stat);
			removeStatFunc(f);
		}

		broadcastModifiedStats(modifiedStats);

	}

/**
	 * Remove a list of Funcs from the Calculator set of the L2PcInstance.

	 *
	 *  Concept :

	 * A L2Character owns a table of Calculators called _calculators.
	 * Each Calculator (a calculator per state) own a table of Func object.
	 * A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).

	 *
	 *  Caution : This method is ONLY for L2PcInstance

	 *
	 *  Example of use  :

	 *
 Unequip an item from inventory

	 *
 Stop an active skill

	 *
	 * @param funcs The list of Func objects to add to the Calculator corresponding to the state affected
	 */
	public final void removeStatFuncs(Func[] funcs)
	{

		FastList<Stats> modifiedStats = new FastList<Stats>();

		for (Func f : funcs)
		{
			modifiedStats.add(f.stat);
			removeStatFunc(f);
		}

		broadcastModifiedStats(modifiedStats);

	}

Replace Generic With Diamond FastList<Stats> with ArrayList<> in method public removeStatFuncs(funcs Func[]) : void from class com.l2jserver.gameserver.model.actor.L2Character


	/**
	 * Disable this skill id for the duration of the delay in milliseconds.
	 * @param skill
	 * @param delay (seconds * 1000)
	 */
	public void disableSkill(L2Skill skill, long delay)
	{
		if (skill == null)
			return;

		if (_disabledSkills == null)
			_disabledSkills = new L2TIntObjectHashMap<>();

		_disabledSkills.put(Integer.valueOf(skill.getReuseHashCode()), delay > 10 ? System.currentTimeMillis() + delay : Long.MAX_VALUE);
	}

	/**
	 * Disable this skill id for the duration of the delay in milliseconds.
	 * @param skill
	 * @param delay (seconds * 1000)
	 */
	public void disableSkill(L2Skill skill, long delay)
	{
		if (skill == null)
			return;

		if (_disabledSkills == null)
			_disabledSkills = new L2TIntObjectHashMap<Long>();

		_disabledSkills.put(Integer.valueOf(skill.getReuseHashCode()), delay > 10 ? System.currentTimeMillis() + delay : Long.MAX_VALUE);
	}

Replace Generic With Diamond L2TIntObjectHashMap<Long> with L2TIntObjectHashMap<> in method public disableSkill(skill L2Skill, delay long) : void from class com.l2jserver.gameserver.model.actor.L2Character


	public Collection<L2DefenderInstance> getKnownDefenders()
	{
		FastList<L2DefenderInstance> result = new FastList<>();

		Collection<L2Object> objs = getKnownList().getKnownObjects().values();
		for (L2Object obj : objs)
		{
			if (obj instanceof L2DefenderInstance)
				result.add((L2DefenderInstance) obj);
		}

		return result;
	}

	public Collection<L2DefenderInstance> getKnownDefenders()
	{
		FastList<L2DefenderInstance> result = new FastList<L2DefenderInstance>();

		Collection<L2Object> objs = getKnownList().getKnownObjects().values();
		for (L2Object obj : objs)
		{
			if (obj instanceof L2DefenderInstance)
				result.add((L2DefenderInstance) obj);
		}

		return result;
	}

Replace Generic With Diamond FastList<L2DefenderInstance> with FastList<> in method public getKnownDefenders() : Collection<L2DefenderInstance> from class com.l2jserver.gameserver.model.actor.instance.L2DoorInstance


	/**
	 * @return a table containing all Quest in progress from the table _quests.
	 */
	public Quest[] getAllActiveQuests()
	{
		FastList<Quest> quests = new FastList<>();

		for (QuestState qs : _quests.values())
		{
			if (qs == null)
				continue;

			if (qs.getQuest() == null)
				continue;

			int questId = qs.getQuest().getQuestIntId();
			if ((questId>19999) || (questId<1))
				continue;

			if (!qs.isStarted() && !Config.DEVELOPER)
				continue;

			quests.add(qs.getQuest());
		}

		return quests.toArray(new Quest[quests.size()]);
	}

	/**
	 * @return a table containing all Quest in progress from the table _quests.
	 */
	public Quest[] getAllActiveQuests()
	{
		FastList<Quest> quests = new FastList<Quest>();

		for (QuestState qs : _quests.values())
		{
			if (qs == null)
				continue;

			if (qs.getQuest() == null)
				continue;

			int questId = qs.getQuest().getQuestIntId();
			if ((questId>19999) || (questId<1))
				continue;

			if (!qs.isStarted() && !Config.DEVELOPER)
				continue;

			quests.add(qs.getQuest());
		}

		return quests.toArray(new Quest[quests.size()]);
	}

Replace Generic With Diamond FastList<Quest> with FastList<> in method public getAllActiveQuests() : Quest[] from class com.l2jserver.gameserver.model.actor.instance.L2PcInstance


	/**
	 * @return a list of QuestStates which registered for notify of death of this L2PcInstance.
	 */
	public final List<QuestState> getNotifyQuestOfDeath()
	{
		if (_notifyQuestOfDeathList == null)
		{
			synchronized(this)
			{
				if (_notifyQuestOfDeathList == null)
					_notifyQuestOfDeathList = new FastList<>();
			}
		}

		return _notifyQuestOfDeathList;
	}

	/**
	 * @return a list of QuestStates which registered for notify of death of this L2PcInstance.
	 */
	public final List<QuestState> getNotifyQuestOfDeath()
	{
		if (_notifyQuestOfDeathList == null)
		{
			synchronized(this)
			{
				if (_notifyQuestOfDeathList == null)
					_notifyQuestOfDeathList = new FastList<QuestState>();
			}
		}

		return _notifyQuestOfDeathList;
	}

Replace Generic With Diamond FastList<QuestState> with FastList<> in method public getNotifyQuestOfDeath() : List<QuestState> from class com.l2jserver.gameserver.model.actor.instance.L2PcInstance


/**
	 * Set the L2Summon of the L2PcInstance.

	 * @param tamedBeast
	 */
	public void addTrainedBeast(L2TamedBeastInstance tamedBeast)
	{
		if (_tamedBeast == null)
			_tamedBeast = new FastList<>();
		_tamedBeast.add(tamedBeast);
	}

/**
	 * Set the L2Summon of the L2PcInstance.

	 * @param tamedBeast
	 */
	public void addTrainedBeast(L2TamedBeastInstance tamedBeast)
	{
		if (_tamedBeast == null)
			_tamedBeast = new FastList<L2TamedBeastInstance>();
		_tamedBeast.add(tamedBeast);
	}

Replace Generic With Diamond FastList<L2TamedBeastInstance> with FastList<> in method public addTrainedBeast(tamedBeast L2TamedBeastInstance) : void from class com.l2jserver.gameserver.model.actor.instance.L2PcInstance


	public Map<Integer, SubClass> getSubClasses()
	{
		if (_subClasses == null)
			_subClasses = new FastMap<>();

		return _subClasses;
	}

	public Map<Integer, SubClass> getSubClasses()
	{
		if (_subClasses == null)
			_subClasses = new FastMap<Integer, SubClass>();

		return _subClasses;
	}

Replace Generic With Diamond FastMap<Integer,SubClass> with FastMap<> in method public getSubClasses() : Map<Integer,SubClass> from class com.l2jserver.gameserver.model.actor.instance.L2PcInstance


	public void addBeastSkill(L2Skill skill)
	{
		if (_beastSkills == null)
			_beastSkills = new FastList<>();
		_beastSkills.add(skill);
	}

	public void addBeastSkill(L2Skill skill)
	{
		if (_beastSkills == null)
			_beastSkills = new FastList<L2Skill>();
		_beastSkills.add(skill);
	}

Replace Generic With Diamond FastList<L2Skill> with FastList<> in method public addBeastSkill(skill L2Skill) : void from class com.l2jserver.gameserver.model.actor.instance.L2TamedBeastInstance


	public Collection<L2Character> getKnownCharacters()
	{
		FastList<L2Character> result = new FastList<>();

		final Collection<L2Object> objs = getKnownObjects().values();
		for (L2Object obj : objs)
		{
			if (obj instanceof L2Character)
				result.add((L2Character) obj);
		}
		return result;
	}

	public Collection<L2Character> getKnownCharacters()
	{
		FastList<L2Character> result = new FastList<L2Character>();

		final Collection<L2Object> objs = getKnownObjects().values();
		for (L2Object obj : objs)
		{
			if (obj instanceof L2Character)
				result.add((L2Character) obj);
		}
		return result;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getKnownCharacters() : Collection<L2Character> from class com.l2jserver.gameserver.model.actor.knownlist.CharKnownList


	public Collection<L2Character> getKnownCharactersInRadius(long radius)
	{
		FastList<L2Character> result = new FastList<>();

		final Collection<L2Object> objs = getKnownObjects().values();
		for (L2Object obj : objs)
		{
			if (obj instanceof L2Character)
			{
				if (Util.checkIfInRange((int) radius, getActiveChar(), obj, true))
					result.add((L2Character) obj);
			}
		}

		return result;
	}

	public Collection<L2Character> getKnownCharactersInRadius(long radius)
	{
		FastList<L2Character> result = new FastList<L2Character>();

		final Collection<L2Object> objs = getKnownObjects().values();
		for (L2Object obj : objs)
		{
			if (obj instanceof L2Character)
			{
				if (Util.checkIfInRange((int) radius, getActiveChar(), obj, true))
					result.add((L2Character) obj);
			}
		}

		return result;
	}

Replace Generic With Diamond FastList<L2Character> with FastList<> in method public getKnownCharactersInRadius(radius long) : Collection<L2Character> from class com.l2jserver.gameserver.model.actor.knownlist.CharKnownList


	public final Collection<L2PcInstance> getKnownPlayersInRadius(long radius)
	{
		FastList<L2PcInstance> result = new FastList<>();

		final Collection<L2PcInstance> plrs = getKnownPlayers().values();
		for (L2PcInstance player : plrs)
		{
			if (Util.checkIfInRange((int) radius, getActiveChar(), player, true))
			{
				result.add(player);
			}
		}
		return result;
	}

	public final Collection<L2PcInstance> getKnownPlayersInRadius(long radius)
	{
		FastList<L2PcInstance> result = new FastList<L2PcInstance>();

		final Collection<L2PcInstance> plrs = getKnownPlayers().values();
		for (L2PcInstance player : plrs)
		{
			if (Util.checkIfInRange((int) radius, getActiveChar(), player, true))
			{
				result.add(player);
			}
		}
		return result;
	}

Replace Generic With Diamond FastList<L2PcInstance> with FastList<> in method public getKnownPlayersInRadius(radius long) : Collection<L2PcInstance> from class com.l2jserver.gameserver.model.actor.knownlist.CharKnownList


		public void registerDebuff(L2Effect debuff)
		{
			if (_debuffs == null)
				_debuffs = new FastList<>();

			_debuffs.add(debuff);
		}

		public void registerDebuff(L2Effect debuff)
		{
			if (_debuffs == null)
				_debuffs = new FastList<L2Effect>();

			_debuffs.add(debuff);
		}

Replace Generic With Diamond FastList<L2Effect> with FastList<> in method public registerDebuff(debuff L2Effect) : void from class com.l2jserver.gameserver.model.entity.Duel.PlayerCondition


	public Duel(L2PcInstance playerA, L2PcInstance playerB, int partyDuel, int duelId)
	{
		_duelId = duelId;
		_playerA = playerA;
		_playerB = playerB;
		_partyDuel = partyDuel == 1 ? true : false;

		_duelEndTime = Calendar.getInstance();
		if (_partyDuel)
			_duelEndTime.add(Calendar.SECOND, 300);
		else
			_duelEndTime.add(Calendar.SECOND, 120);

		_playerConditions = new FastList<>();

		setFinished(false);

		if (_partyDuel)
		{
			// increase countdown so that start task can teleport players
			_countdown++;
			// inform players that they will be portet shortly
			SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.IN_A_MOMENT_YOU_WILL_BE_TRANSPORTED_TO_THE_SITE_WHERE_THE_DUEL_WILL_TAKE_PLACE);
			broadcastToTeam1(sm);
			broadcastToTeam2(sm);
		}
		// Schedule duel start
		ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleStartDuelTask(this), 3000);
	}

	public Duel(L2PcInstance playerA, L2PcInstance playerB, int partyDuel, int duelId)
	{
		_duelId = duelId;
		_playerA = playerA;
		_playerB = playerB;
		_partyDuel = partyDuel == 1 ? true : false;

		_duelEndTime = Calendar.getInstance();
		if (_partyDuel)
			_duelEndTime.add(Calendar.SECOND, 300);
		else
			_duelEndTime.add(Calendar.SECOND, 120);

		_playerConditions = new FastList<PlayerCondition>();

		setFinished(false);

		if (_partyDuel)
		{
			// increase countdown so that start task can teleport players
			_countdown++;
			// inform players that they will be portet shortly
			SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.IN_A_MOMENT_YOU_WILL_BE_TRANSPORTED_TO_THE_SITE_WHERE_THE_DUEL_WILL_TAKE_PLACE);
			broadcastToTeam1(sm);
			broadcastToTeam2(sm);
		}
		// Schedule duel start
		ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleStartDuelTask(this), 3000);
	}

Replace Generic With Diamond FastList<PlayerCondition> with FastList<> in method public Duel(playerA L2PcInstance, playerB L2PcInstance, partyDuel int, duelId int) from class com.l2jserver.gameserver.model.entity.Duel


	/**
	 * @return list of L2PcInstance registered as attacker in the zone.
	 */
	@Override
	public List<L2PcInstance> getAttackersInZone()
	{
		List<L2PcInstance> players = new FastList<>();
		L2Clan clan;
		for (L2SiegeClan siegeclan : getAttackerClans())
		{
			clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

	/**
	 * @return list of L2PcInstance registered as attacker in the zone.
	 */
	@Override
	public List<L2PcInstance> getAttackersInZone()
	{
		List<L2PcInstance> players = new FastList<L2PcInstance>();
		L2Clan clan;
		for (L2SiegeClan siegeclan : getAttackerClans())
		{
			clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

Replace Generic With Diamond FastList<L2PcInstance> with FastList<> in method public getAttackersInZone() : List<L2PcInstance> from class com.l2jserver.gameserver.model.entity.FortSiege


	/**
	 * @return list of L2PcInstance owning the fort in the zone.
	 */
	public List<L2PcInstance> getOwnersInZone()
	{
		List<L2PcInstance> players = new FastList<>();
		L2Clan clan;
		if (getFort().getOwnerClan() != null)
		{
			clan = ClanTable.getInstance().getClan(getFort().getOwnerClan().getClanId());
			if (clan != getFort().getOwnerClan())
				return null;

			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

	/**
	 * @return list of L2PcInstance owning the fort in the zone.
	 */
	public List<L2PcInstance> getOwnersInZone()
	{
		List<L2PcInstance> players = new FastList<L2PcInstance>();
		L2Clan clan;
		if (getFort().getOwnerClan() != null)
		{
			clan = ClanTable.getInstance().getClan(getFort().getOwnerClan().getClanId());
			if (clan != getFort().getOwnerClan())
				return null;

			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

Replace Generic With Diamond FastList<L2PcInstance> with FastList<> in method public getOwnersInZone() : List<L2PcInstance> from class com.l2jserver.gameserver.model.entity.FortSiege


	/** Return list of L2PcInstance registered as attacker in the zone. */
	@Override
	public List<L2PcInstance> getAttackersInZone()
	{
		List<L2PcInstance> players = new ArrayList<>();
		L2Clan clan;
		for (L2SiegeClan siegeclan : getAttackerClans())
		{
			clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

	/** Return list of L2PcInstance registered as attacker in the zone. */
	@Override
	public List<L2PcInstance> getAttackersInZone()
	{
		List<L2PcInstance> players = new FastList<L2PcInstance>();
		L2Clan clan;
		for (L2SiegeClan siegeclan : getAttackerClans())
		{
			clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

Replace Generic With Diamond FastList<L2PcInstance> with ArrayList<> in method public getAttackersInZone() : List<L2PcInstance> from class com.l2jserver.gameserver.model.entity.Siege


	/**
	 * @return list of L2PcInstance registered as defender but not owner in the zone.
	 */
	public List<L2PcInstance> getDefendersButNotOwnersInZone()
	{
		List<L2PcInstance> players = new ArrayList<>();
		L2Clan clan;
		for (L2SiegeClan siegeclan : getDefenderClans())
		{
			clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
			if (clan.getClanId() == getCastle().getOwnerId())
				continue;
			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

	/**
	 * @return list of L2PcInstance registered as defender but not owner in the zone.
	 */
	public List<L2PcInstance> getDefendersButNotOwnersInZone()
	{
		List<L2PcInstance> players = new FastList<L2PcInstance>();
		L2Clan clan;
		for (L2SiegeClan siegeclan : getDefenderClans())
		{
			clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
			if (clan.getClanId() == getCastle().getOwnerId())
				continue;
			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

Replace Generic With Diamond FastList<L2PcInstance> with ArrayList<> in method public getDefendersButNotOwnersInZone() : List<L2PcInstance> from class com.l2jserver.gameserver.model.entity.Siege


	/**
	 * @return list of L2PcInstance owning the castle in the zone.
	 */
	public List<L2PcInstance> getOwnersInZone()
	{
		List<L2PcInstance> players = new ArrayList<>();
		L2Clan clan;
		for (L2SiegeClan siegeclan : getDefenderClans())
		{
			clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
			if (clan.getClanId() != getCastle().getOwnerId())
				continue;
			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

	/**
	 * @return list of L2PcInstance owning the castle in the zone.
	 */
	public List<L2PcInstance> getOwnersInZone()
	{
		List<L2PcInstance> players = new FastList<L2PcInstance>();
		L2Clan clan;
		for (L2SiegeClan siegeclan : getDefenderClans())
		{
			clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
			if (clan.getClanId() != getCastle().getOwnerId())
				continue;
			for (L2PcInstance player : clan.getOnlineMembers(0))
			{
				if (player == null)
					continue;

				if (player.isInSiege())
					players.add(player);
			}
		}
		return players;
	}

Replace Generic With Diamond FastList<L2PcInstance> with ArrayList<> in method public getOwnersInZone() : List<L2PcInstance> from class com.l2jserver.gameserver.model.entity.Siege


	/**
	 * Cleanup the team and make it ready for adding players again<br>
	 */
	public void cleanMe()
	{
		_participatedPlayers.clear();
		_participatedPlayers = new FastMap<>();
		_points = 0;
	}

	/**
	 * Cleanup the team and make it ready for adding players again<br>
	 */
	public void cleanMe()
	{
		_participatedPlayers.clear();
		_participatedPlayers = new FastMap<Integer, L2PcInstance>();
		_points = 0;
	}

Replace Generic With Diamond FastMap<Integer,L2PcInstance> with FastMap<> in method public cleanMe() : void from class com.l2jserver.gameserver.model.entity.TvTEventTeam


	@Override
	public List<L2SiegeClan> getAttackerClans()
	{
		FastList<L2SiegeClan> result = new FastList<>();
		result.addAll(_attackers.values());
		return result;
	}

	@Override
	public List<L2SiegeClan> getAttackerClans()
	{
		FastList<L2SiegeClan> result = new FastList<L2SiegeClan>();
		result.addAll(_attackers.values());
		return result;
	}

Replace Generic With Diamond FastList<L2SiegeClan> with FastList<> in method public getAttackerClans() : List<L2SiegeClan> from class com.l2jserver.gameserver.model.entity.clanhall.ClanHallSiegeEngine


		/**
		 * Constructor of the ChangeRecorder
		 * @param inventory
		 */
		ChangeRecorder(Inventory inventory)
		{
			_inventory = inventory;
			_changed = new FastList<>();
			_inventory.addPaperdollListener(this);
		}

		/**
		 * Constructor of the ChangeRecorder
		 * @param inventory
		 */
		ChangeRecorder(Inventory inventory)
		{
			_inventory = inventory;
			_changed = new FastList<L2ItemInstance>();
			_inventory.addPaperdollListener(this);
		}

Replace Generic With Diamond FastList<L2ItemInstance> with FastList<> in method package ChangeRecorder(inventory Inventory) from class com.l2jserver.gameserver.model.itemcontainer.Inventory.ChangeRecorder


	/**
	 * Constructor of the inventory
	 */
	protected Inventory()
	{
		_paperdoll = new L2ItemInstance[PAPERDOLL_TOTALSLOTS];
		_paperdollListeners = new ArrayList<>();

		if (this instanceof PcInventory)
		{
			addPaperdollListener(ArmorSetListener.getInstance());
			addPaperdollListener(BowCrossRodListener.getInstance());
			addPaperdollListener(ItemSkillsListener.getInstance());
			addPaperdollListener(BraceletListener.getInstance());
		}

		//common
		addPaperdollListener(StatsListener.getInstance());

	}

	/**
	 * Constructor of the inventory
	 */
	protected Inventory()
	{
		_paperdoll = new L2ItemInstance[PAPERDOLL_TOTALSLOTS];
		_paperdollListeners = new ArrayList<PaperdollListener>();

		if (this instanceof PcInventory)
		{
			addPaperdollListener(ArmorSetListener.getInstance());
			addPaperdollListener(BowCrossRodListener.getInstance());
			addPaperdollListener(ItemSkillsListener.getInstance());
			addPaperdollListener(BraceletListener.getInstance());
		}

		//common
		addPaperdollListener(StatsListener.getInstance());

	}

Replace Generic With Diamond ArrayList<PaperdollListener> with ArrayList<> in method protected Inventory() from class com.l2jserver.gameserver.model.itemcontainer.Inventory


/**
	 * Returns the item's list from inventory by using its itemId

	 *
	 * @param itemId : int designating the ID of the item
	 * @return List<L2ItemInstance> designating the items list (empty list if not found)
	 */
	public List<L2ItemInstance> getItemsByItemId(int itemId)
	{
		List<L2ItemInstance> returnList = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item != null && item.getItemId() == itemId)
			{
				returnList.add(item);
			}
		}

		return returnList;
	}

/**
	 * Returns the item's list from inventory by using its itemId

	 *
	 * @param itemId : int designating the ID of the item
	 * @return List<L2ItemInstance> designating the items list (empty list if not found)
	 */
	public List<L2ItemInstance> getItemsByItemId(int itemId)
	{
		List<L2ItemInstance> returnList = new FastList<L2ItemInstance>();
		for (L2ItemInstance item : _items)
		{
			if (item != null && item.getItemId() == itemId)
			{
				returnList.add(item);
			}
		}

		return returnList;
	}

Replace Generic With Diamond FastList<L2ItemInstance> with FastList<> in method public getItemsByItemId(itemId int) : List<L2ItemInstance> from class com.l2jserver.gameserver.model.itemcontainer.ItemContainer


	/**
	 * Returns the list of items in inventory
	 * @return L2ItemInstance : items in inventory
	 */
	@Override
	public L2ItemInstance[] getItems()
	{
		List<L2ItemInstance> list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isFreightable())
				list.add(item);
		}

		return list.toArray(new L2ItemInstance[list.size()]);
	}

	/**
	 * Returns the list of items in inventory
	 * @return L2ItemInstance : items in inventory
	 */
	@Override
	public L2ItemInstance[] getItems()
	{
		List<L2ItemInstance> list = new FastList<L2ItemInstance>();
		for (L2ItemInstance item : _items)
		{
			if (item.isFreightable())
				list.add(item);
		}

		return list.toArray(new L2ItemInstance[list.size()]);
	}

Replace Generic With Diamond FastList<L2ItemInstance> with FastList<> in method public getItems() : L2ItemInstance[] from class com.l2jserver.gameserver.model.itemcontainer.PcFreight


	public ListContainer()
	{
		_entries = new ArrayList<>();
	}

	public ListContainer()
	{
		_entries = new ArrayList<Entry>();
	}

Replace Generic With Diamond ArrayList<Entry> with ArrayList<> in method public ListContainer() from class com.l2jserver.gameserver.model.multisell.ListContainer


	protected final List<List<Integer>> hasEnoughRegisteredClassed()
	{
		List<List<Integer>> result = null;
		for (Map.Entry<Integer, List<Integer>> classList : _classBasedRegisters.entrySet())
		{
			if (classList.getValue() != null && classList.getValue().size() >= Config.ALT_OLY_CLASSED)
			{
				if (result == null)
					result = new FastList<>();

				result.add(classList.getValue());
			}
		}
		return result;
	}

	protected final List<List<Integer>> hasEnoughRegisteredClassed()
	{
		List<List<Integer>> result = null;
		for (Map.Entry<Integer, List<Integer>> classList : _classBasedRegisters.entrySet())
		{
			if (classList.getValue() != null && classList.getValue().size() >= Config.ALT_OLY_CLASSED)
			{
				if (result == null)
					result = new FastList<List<Integer>>();

				result.add(classList.getValue());
			}
		}
		return result;
	}

Replace Generic With Diamond FastList<List<Integer>> with FastList<> in method protected hasEnoughRegisteredClassed() : List<List<Integer>> from class com.l2jserver.gameserver.model.olympiad.OlympiadManager


	/**
	 * @param nodeA
	 * @param nodeB
	 */
	public static void drawLine(WayPointNode nodeA, WayPointNode nodeB)
	{
		int x1 = nodeA.getX(), y1 = nodeA.getY(), z1 = nodeA.getZ();
		int x2 = nodeB.getX(), y2 = nodeB.getY(), z2 = nodeB.getZ();
		int modX = x1 - x2 > 0 ? -1 : 1;
		int modY = y1 - y2 > 0 ? -1 : 1;
		int modZ = z1 - z2 > 0 ? -1 : 1;

		int diffX = Math.abs(x1 - x2);
		int diffY = Math.abs(y1 - y2);
		int diffZ = Math.abs(z1 - z2);

		int distance = (int) Math.sqrt(diffX * diffX + diffY * diffY + diffZ * diffZ);

		int steps = distance / 40;

		List<WayPointNode> lineNodes = new FastList<>();

		for (int i = 0; i < steps; i++)
		{
			x1 = x1 + (modX * diffX / steps);
			y1 = y1 + (modY * diffY / steps);
			z1 = z1 + (modZ * diffZ / steps);

			lineNodes.add(WayPointNode.spawn(LINE_TYPE, _lineId, x1, y1, z1));
		}

		nodeA.addLineInfo(nodeB, lineNodes);
		nodeB.addLineInfo(nodeA, lineNodes);
	}

	/**
	 * @param nodeA
	 * @param nodeB
	 */
	public static void drawLine(WayPointNode nodeA, WayPointNode nodeB)
	{
		int x1 = nodeA.getX(), y1 = nodeA.getY(), z1 = nodeA.getZ();
		int x2 = nodeB.getX(), y2 = nodeB.getY(), z2 = nodeB.getZ();
		int modX = x1 - x2 > 0 ? -1 : 1;
		int modY = y1 - y2 > 0 ? -1 : 1;
		int modZ = z1 - z2 > 0 ? -1 : 1;

		int diffX = Math.abs(x1 - x2);
		int diffY = Math.abs(y1 - y2);
		int diffZ = Math.abs(z1 - z2);

		int distance = (int) Math.sqrt(diffX * diffX + diffY * diffY + diffZ * diffZ);

		int steps = distance / 40;

		List<WayPointNode> lineNodes = new FastList<WayPointNode>();

		for (int i = 0; i < steps; i++)
		{
			x1 = x1 + (modX * diffX / steps);
			y1 = y1 + (modY * diffY / steps);
			z1 = z1 + (modZ * diffZ / steps);

			lineNodes.add(WayPointNode.spawn(LINE_TYPE, _lineId, x1, y1, z1));
		}

		nodeA.addLineInfo(nodeB, lineNodes);
		nodeB.addLineInfo(nodeA, lineNodes);
	}

Replace Generic With Diamond FastList<WayPointNode> with FastList<> in method public drawLine(nodeA WayPointNode, nodeB WayPointNode) : void from class com.l2jserver.gameserver.model.waypoint.WayPointNode


	public List<WayPointNode> getLineNodes()
	{
		List<WayPointNode> list = new FastList<>();

		for (List<WayPointNode> points : _linkLists.values())
		{
			list.addAll(points);
		}

		return list;
	}

	public List<WayPointNode> getLineNodes()
	{
		List<WayPointNode> list = new FastList<WayPointNode>();

		for (List<WayPointNode> points : _linkLists.values())
		{
			list.addAll(points);
		}

		return list;
	}

Replace Generic With Diamond FastList<WayPointNode> with FastList<> in method public getLineNodes() : List<WayPointNode> from class com.l2jserver.gameserver.model.waypoint.WayPointNode


	public final void addSpawn(int x, int y, int z)
	{
		if (_spawnLocs == null)
			_spawnLocs = new ArrayList<>();

		_spawnLocs.add(new Location(x, y, z));
	}

	public final void addSpawn(int x, int y, int z)
	{
		if (_spawnLocs == null)
			_spawnLocs = new ArrayList<Location>();

		_spawnLocs.add(new Location(x, y, z));
	}

Replace Generic With Diamond ArrayList<Location> with ArrayList<> in method public addSpawn(x int, y int, z int) : void from class com.l2jserver.gameserver.model.zone.L2ZoneRespawn


	public final void addOtherSpawn(int x, int y, int z)
	{
		if (_otherSpawnLocs == null)
			_otherSpawnLocs = new ArrayList<>();

		_otherSpawnLocs.add(new Location(x, y, z));
	}

	public final void addOtherSpawn(int x, int y, int z)
	{
		if (_otherSpawnLocs == null)
			_otherSpawnLocs = new ArrayList<Location>();

		_otherSpawnLocs.add(new Location(x, y, z));
	}

Replace Generic With Diamond ArrayList<Location> with ArrayList<> in method public addOtherSpawn(x int, y int, z int) : void from class com.l2jserver.gameserver.model.zone.L2ZoneRespawn


	public final void addChaoticSpawn(int x, int y, int z)
	{
		if (_chaoticSpawnLocs == null)
			_chaoticSpawnLocs = new ArrayList<>();

		_chaoticSpawnLocs.add(new Location(x, y, z));
	}

	public final void addChaoticSpawn(int x, int y, int z)
	{
		if (_chaoticSpawnLocs == null)
			_chaoticSpawnLocs = new ArrayList<Location>();

		_chaoticSpawnLocs.add(new Location(x, y, z));
	}

Replace Generic With Diamond ArrayList<Location> with ArrayList<> in method public addChaoticSpawn(x int, y int, z int) : void from class com.l2jserver.gameserver.model.zone.L2ZoneRespawn


	public final void addBanishSpawn(int x, int y, int z)
	{
		if (_banishSpawnLocs == null)
			_banishSpawnLocs = new ArrayList<>();

		_banishSpawnLocs.add(new Location(x, y, z));
	}

	public final void addBanishSpawn(int x, int y, int z)
	{
		if (_banishSpawnLocs == null)
			_banishSpawnLocs = new ArrayList<Location>();

		_banishSpawnLocs.add(new Location(x, y, z));
	}

Replace Generic With Diamond ArrayList<Location> with ArrayList<> in method public addBanishSpawn(x int, y int, z int) : void from class com.l2jserver.gameserver.model.zone.L2ZoneRespawn


	public L2OlympiadStadiumZone(int id)
	{
		super(id);
		_buffers = new ArrayList<>(2);
	}

	public L2OlympiadStadiumZone(int id)
	{
		super(id);
		_buffers = new ArrayList<L2Spawn>(2);
	}

Replace Generic With Diamond ArrayList<L2Spawn> with ArrayList<> in method public L2OlympiadStadiumZone(id int) from class com.l2jserver.gameserver.model.zone.type.L2OlympiadStadiumZone


	public L2GameClient(MMOConnection<L2GameClient> con)
	{
		super(con);
		_state = GameClientState.CONNECTED;
		_connectionStartTime = System.currentTimeMillis();
		_crypt = new GameCrypt();
		_stats = new ClientStats();

		_packetQueue = new ArrayBlockingQueue<>(Config.CLIENT_PACKET_QUEUE_SIZE);

		if (Config.CHAR_STORE_INTERVAL > 0)
		{
			_autoSaveInDB = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoSaveTask(), 300000L, (Config.CHAR_STORE_INTERVAL * 60000L));
		}
		else
		{
			_autoSaveInDB = null;
		}

		try
		{
			_addr = con != null ? con.getInetAddress() : InetAddress.getLocalHost();
		}
		catch (UnknownHostException e)
		{
			throw new Error("Unable to determine localhost address.");
		}
	}

	public L2GameClient(MMOConnection<L2GameClient> con)
	{
		super(con);
		_state = GameClientState.CONNECTED;
		_connectionStartTime = System.currentTimeMillis();
		_crypt = new GameCrypt();
		_stats = new ClientStats();

		_packetQueue = new ArrayBlockingQueue<ReceivablePacket<L2GameClient>>(Config.CLIENT_PACKET_QUEUE_SIZE);

		if (Config.CHAR_STORE_INTERVAL > 0)
		{
			_autoSaveInDB = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoSaveTask(), 300000L, (Config.CHAR_STORE_INTERVAL * 60000L));
		}
		else
		{
			_autoSaveInDB = null;
		}

		try
		{
			_addr = con != null ? con.getInetAddress() : InetAddress.getLocalHost();
		}
		catch (UnknownHostException e)
		{
			throw new Error("Unable to determine localhost address.");
		}
	}

Replace Generic With Diamond ArrayBlockingQueue<ReceivablePacket<L2GameClient>> with ArrayBlockingQueue<> in method public L2GameClient(con MMOConnection<L2GameClient>) from class com.l2jserver.gameserver.network.L2GameClient


	@Override
	public void runImpl()
	{
		final L2PcInstance player = getClient().getActiveChar();
		if (player == null)
			return;

		if (!getClient().getFloodProtectors().getMultiSell().tryPerformAction("multisell choose"))
		{
			player.setMultiSell(null);
			return;
		}

		if (_amount < 1 || _amount > 5000)
		{
			player.setMultiSell(null);
			return;
		}

		PreparedListContainer list = player.getMultiSell();
		if (list == null || list.getListId() != _listId)
		{
			player.setMultiSell(null);
			return;
		}

		L2Npc target = player.getLastFolkNPC();
		if (!player.isGM() && (target == null
				|| !list.checkNpcObjectId(target.getObjectId())
				|| !target.canInteract(player)))
		{
			player.setMultiSell(null);
			return;
		}

		for (Entry entry : list.getEntries())
		{
			if (entry.getEntryId() == _entryId)
			{
				if (!entry.isStackable() && _amount > 1)
				{
					_log.severe("Character: " + player.getName() + " is trying to set amount > 1 on non-stackable multisell, id:" + _listId + ":" + _entryId);
					player.setMultiSell(null);
					return;
				}

				final PcInventory inv = player.getInventory();

				int slots = 0;
				int weight = 0;
				for (Ingredient e : entry.getProducts())
				{
					if (e.getItemId() < 0) // special
						continue;

					if (!e.isStackable())
						slots += e.getItemCount() * _amount;
					else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
						slots++;
					weight += e.getItemCount() * _amount * e.getWeight();
				}

				if (!inv.validateWeight(weight))
				{
					player.sendPacket(SystemMessageId.WEIGHT_LIMIT_EXCEEDED);
					return;
				}

				if (!inv.validateCapacity(slots))
				{
					player.sendPacket(SystemMessageId.SLOTS_FULL);
					return;
				}

				ArrayList<Ingredient> ingredientsList = new ArrayList<>(entry.getIngredients().size());
				// Generate a list of distinct ingredients and counts in order to check if the correct item-counts
				// are possessed by the player
				boolean newIng;
				for (Ingredient e : entry.getIngredients())
				{
					newIng = true;
					// at this point, the template has already been modified so that enchantments are properly included
					// whenever they need to be applied.  Uniqueness of items is thus judged by item id AND enchantment level
					for (int i = ingredientsList.size(); --i >= 0;)
					{
						Ingredient ex = ingredientsList.get(i);
						// if the item was already added in the list, merely increment the count
						// this happens if 1 list entry has the same ingredient twice (example 2 swords = 1 dual)
						if ((ex.getItemId() == e.getItemId()) && (ex.getEnchantLevel() == e.getEnchantLevel()))
						{
							if (ex.getItemCount() + e.getItemCount() > Integer.MAX_VALUE)
							{
								player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
								return;
							}
							// two same ingredients, merge into one and replace old
							final Ingredient ing = ex.getCopy();
							ing.setItemCount(ex.getItemCount() + e.getItemCount());
							ingredientsList.set(i, ing);
							newIng = false;
							break;
						}
					}
					if (newIng)
					{
						// if it's a new ingredient, just store its info directly (item id, count, enchantment)
						ingredientsList.add(e);
					}
				}

				// now check if the player has sufficient items in the inventory to cover the ingredients' expences
				for (Ingredient e : ingredientsList)
				{
					if (e.getItemCount() * _amount > Integer.MAX_VALUE)
					{
						player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
						return;
					}
					if (e.getItemId() < 0)
					{
						if (!MultiSell.checkSpecialIngredient(e.getItemId(), e.getItemCount() * _amount, player))
							return;
					}
					else
					{
						// if this is not a list that maintains enchantment, check the count of all items that have the given id.
						// otherwise, check only the count of items with exactly the needed enchantment level
						final long required = ((Config.ALT_BLACKSMITH_USE_RECIPES || !e.getMaintainIngredient()) ? (e.getItemCount() * _amount) : e.getItemCount());
						if (inv.getInventoryItemCount(e.getItemId(), list.getMaintainEnchantment() ? e.getEnchantLevel() : -1, false) < required)
						{
							SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_UNIT_OF_THE_ITEM_S1_REQUIRED);
							sm.addItemName(e.getTemplate());
							sm.addNumber((int)required);
							player.sendPacket(sm);
							return;
						}
					}
				}

				FastList<L2Augmentation> augmentation = FastList.newInstance();
				Elementals[] elemental = null;
				/** All ok, remove items and add final product */

				try
				{
					for (Ingredient e : entry.getIngredients())
					{
						if (e.getItemId() < 0)
						{
							if (!MultiSell.getSpecialIngredient(e.getItemId(), e.getItemCount() * _amount, player))
								return;
						}
						else
						{
							L2ItemInstance itemToTake = inv.getItemByItemId(e.getItemId()); // initialize and initial guess for the item to take.
							if (itemToTake == null)
							{ //this is a cheat, transaction will be aborted and if any items already taken will not be returned back to inventory!
								_log.severe("Character: " + player.getName() + " is trying to cheat in multisell, id:" + _listId + ":" + _entryId);
								player.setMultiSell(null);
								return;
							}

							/*if (itemToTake.isEquipped())
							{ //this is a cheat, transaction will be aborted and if any items already taken will not be returned back to inventory!
								_log.severe("Character: " + player.getName() + " is trying to cheat in multisell, exchanging equipped item, merchatnt id:" + merchant.getNpcId());
								player.setMultiSell(null);
								return;
							}*/

							if (Config.ALT_BLACKSMITH_USE_RECIPES || !e.getMaintainIngredient())
							{
								// if it's a stackable item, just reduce the amount from the first (only) instance that is found in the inventory
								if (itemToTake.isStackable())
								{
									if (!player.destroyItem("Multisell", itemToTake.getObjectId(), (e.getItemCount() * _amount), player.getTarget(), true))
									{
										player.setMultiSell(null);
										return;
									}
								}
								else
								{
									// for non-stackable items, one of two scenaria are possible:
									// a) list maintains enchantment: get the instances that exactly match the requested enchantment level
									// b) list does not maintain enchantment: get the instances with the LOWEST enchantment level

									// a) if enchantment is maintained, then get a list of items that exactly match this enchantment
									if (list.getMaintainEnchantment())
									{
										// loop through this list and remove (one by one) each item until the required amount is taken.
										L2ItemInstance[] inventoryContents = inv.getAllItemsByItemId(e.getItemId(), e.getEnchantLevel(), false);
										for (int i = 0; i < (e.getItemCount() * _amount); i++)
										{
											if (inventoryContents[i].isAugmented())
												augmentation.add(inventoryContents[i].getAugmentation());
											if(inventoryContents[i].getElementals() != null)
												elemental = inventoryContents[i].getElementals();
											if (!player.destroyItem("Multisell", inventoryContents[i].getObjectId(), 1, player.getTarget(), true))
											{
												player.setMultiSell(null);
												return;
											}
										}
									}
									else
										// b) enchantment is not maintained.  Get the instances with the LOWEST enchantment level
									{
										/* NOTE: There are 2 ways to achieve the above goal.
										 * 1) Get all items that have the correct itemId, loop through them until the lowest enchantment
										 * 		level is found.  Repeat all this for the next item until proper count of items is reached.
										 * 2) Get all items that have the correct itemId, sort them once based on enchantment level,
										 * 		and get the range of items that is necessary.
										 * Method 1 is faster for a small number of items to be exchanged.
										 * Method 2 is faster for large amounts.
										 *
										 * EXPLANATION:
										 *   Worst case scenario for algorithm 1 will make it run in a number of cycles given by:
										 * m*(2n-m+1)/2 where m is the number of items to be exchanged and n is the total
										 * number of inventory items that have a matching id.
										 *   With algorithm 2 (sort), sorting takes n*log(n) time and the choice is done in a single cycle
										 * for case b (just grab the m first items) or in linear time for case a (find the beginning of items
										 * with correct enchantment, index x, and take all items from x to x+m).
										 * Basically, whenever m > log(n) we have: m*(2n-m+1)/2 = (2nm-m*m+m)/2 >
										 * (2nlogn-logn*logn+logn)/2 = nlog(n) - log(n*n) + log(n) = nlog(n) + log(n/n*n) =
										 * nlog(n) + log(1/n) = nlog(n) - log(n) = (n-1)log(n)
										 * So for m < log(n) then m*(2n-m+1)/2 > (n-1)log(n) and m*(2n-m+1)/2 > nlog(n)
										 *
										 * IDEALLY:
										 * In order to best optimize the performance, choose which algorithm to run, based on whether 2^m > n
										 * if ( (2<<(e.getItemCount() * _amount)) < inventoryContents.length )
										 *   // do Algorithm 1, no sorting
										 * else
										 *   // do Algorithm 2, sorting
										 *
										 * CURRENT IMPLEMENTATION:
										 * In general, it is going to be very rare for a person to do a massive exchange of non-stackable items
										 * For this reason, we assume that algorithm 1 will always suffice and we keep things simple.
										 * If, in the future, it becomes necessary that we optimize, the above discussion should make it clear
										 * what optimization exactly is necessary (based on the comments under "IDEALLY").
										 */

										// choice 1.  Small number of items exchanged.  No sorting.
										for (int i = 1; i <= (e.getItemCount() * _amount); i++)
										{
											L2ItemInstance[] inventoryContents = inv.getAllItemsByItemId(e.getItemId(), false);

											itemToTake = inventoryContents[0];
											// get item with the LOWEST enchantment level  from the inventory...
											// +0 is lowest by default...
											if (itemToTake.getEnchantLevel() > 0)
											{
												for (L2ItemInstance item : inventoryContents)
												{
													if (item.getEnchantLevel() < itemToTake.getEnchantLevel())
													{
														itemToTake = item;
														// nothing will have enchantment less than 0. If a zero-enchanted
														// item is found, just take it
														if (itemToTake.getEnchantLevel() == 0)
															break;
													}
												}
											}
											if (!player.destroyItem("Multisell", itemToTake.getObjectId(), 1, player.getTarget(), true))
											{
												player.setMultiSell(null);
												return;
											}
										}
									}
								}
							}
						}
					}

					// Generate the appropriate items
					for (Ingredient e : entry.getProducts())
					{
						if (e.getItemId() < 0)
						{
							MultiSell.addSpecialProduct(e.getItemId(), e.getItemCount() * _amount, player);
						}
						else
						{
							if (e.isStackable())
								inv.addItem("Multisell", e.getItemId(), e.getItemCount() * _amount, player, player.getTarget());
							else
							{
								L2ItemInstance product = null;
								for (int i = 0; i < (e.getItemCount() * _amount); i++)
								{
									product = inv.addItem("Multisell", e.getItemId(), 1, player, player.getTarget());
									if (list.getMaintainEnchantment())
									{
										if (i < augmentation.size())
											product.setAugmentation(new L2Augmentation(augmentation.get(i).getAugmentationId(), augmentation.get(i).getSkill()));
										if (elemental != null)
											for (Elementals elm : elemental)
												product.setElementAttr(elm.getElement(), elm.getValue());
										product.setEnchantLevel(e.getEnchantLevel());
										product.updateDatabase();
									}
								}
							}
							// msg part
							SystemMessage sm;

							if (e.getItemCount() * _amount > 1)
							{
								sm = SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S);
								sm.addItemName(e.getItemId());
								sm.addItemNumber(e.getItemCount() * _amount);
								player.sendPacket(sm);
								sm = null;
							}
							else
							{
								if (list.getMaintainEnchantment() && e.getEnchantLevel() > 0)
								{
									sm = SystemMessage.getSystemMessage(SystemMessageId.ACQUIRED_S1_S2);
									sm.addItemNumber(e.getEnchantLevel());
									sm.addItemName(e.getItemId());
								}
								else
								{
									sm = SystemMessage.getSystemMessage(SystemMessageId.EARNED_ITEM_S1);
									sm.addItemName(e.getItemId());
								}
								player.sendPacket(sm);
								sm = null;
							}
						}
					}
					player.sendPacket(new ItemList(player, false));

					StatusUpdate su = new StatusUpdate(player);
					su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
					player.sendPacket(su);
					su = null;
				}
				finally
				{
					FastList.recycle(augmentation);
				}

				// finally, give the tax to the castle...
				if (entry.getTaxAmount() > 0)
					target.getCastle().addToTreasury(entry.getTaxAmount() * _amount);

				break;
			}
		}
	}

	@Override
	public void runImpl()
	{
		final L2PcInstance player = getClient().getActiveChar();
		if (player == null)
			return;

		if (!getClient().getFloodProtectors().getMultiSell().tryPerformAction("multisell choose"))
		{
			player.setMultiSell(null);
			return;
		}

		if (_amount < 1 || _amount > 5000)
		{
			player.setMultiSell(null);
			return;
		}

		PreparedListContainer list = player.getMultiSell();
		if (list == null || list.getListId() != _listId)
		{
			player.setMultiSell(null);
			return;
		}

		L2Npc target = player.getLastFolkNPC();
		if (!player.isGM() && (target == null
				|| !list.checkNpcObjectId(target.getObjectId())
				|| !target.canInteract(player)))
		{
			player.setMultiSell(null);
			return;
		}

		for (Entry entry : list.getEntries())
		{
			if (entry.getEntryId() == _entryId)
			{
				if (!entry.isStackable() && _amount > 1)
				{
					_log.severe("Character: " + player.getName() + " is trying to set amount > 1 on non-stackable multisell, id:" + _listId + ":" + _entryId);
					player.setMultiSell(null);
					return;
				}

				final PcInventory inv = player.getInventory();

				int slots = 0;
				int weight = 0;
				for (Ingredient e : entry.getProducts())
				{
					if (e.getItemId() < 0) // special
						continue;

					if (!e.isStackable())
						slots += e.getItemCount() * _amount;
					else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
						slots++;
					weight += e.getItemCount() * _amount * e.getWeight();
				}

				if (!inv.validateWeight(weight))
				{
					player.sendPacket(SystemMessageId.WEIGHT_LIMIT_EXCEEDED);
					return;
				}

				if (!inv.validateCapacity(slots))
				{
					player.sendPacket(SystemMessageId.SLOTS_FULL);
					return;
				}

				ArrayList<Ingredient> ingredientsList = new ArrayList<Ingredient>(entry.getIngredients().size());
				// Generate a list of distinct ingredients and counts in order to check if the correct item-counts
				// are possessed by the player
				boolean newIng;
				for (Ingredient e : entry.getIngredients())
				{
					newIng = true;
					// at this point, the template has already been modified so that enchantments are properly included
					// whenever they need to be applied.  Uniqueness of items is thus judged by item id AND enchantment level
					for (int i = ingredientsList.size(); --i >= 0;)
					{
						Ingredient ex = ingredientsList.get(i);
						// if the item was already added in the list, merely increment the count
						// this happens if 1 list entry has the same ingredient twice (example 2 swords = 1 dual)
						if ((ex.getItemId() == e.getItemId()) && (ex.getEnchantLevel() == e.getEnchantLevel()))
						{
							if (ex.getItemCount() + e.getItemCount() > Integer.MAX_VALUE)
							{
								player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
								return;
							}
							// two same ingredients, merge into one and replace old
							final Ingredient ing = ex.getCopy();
							ing.setItemCount(ex.getItemCount() + e.getItemCount());
							ingredientsList.set(i, ing);
							newIng = false;
							break;
						}
					}
					if (newIng)
					{
						// if it's a new ingredient, just store its info directly (item id, count, enchantment)
						ingredientsList.add(e);
					}
				}

				// now check if the player has sufficient items in the inventory to cover the ingredients' expences
				for (Ingredient e : ingredientsList)
				{
					if (e.getItemCount() * _amount > Integer.MAX_VALUE)
					{
						player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
						return;
					}
					if (e.getItemId() < 0)
					{
						if (!MultiSell.checkSpecialIngredient(e.getItemId(), e.getItemCount() * _amount, player))
							return;
					}
					else
					{
						// if this is not a list that maintains enchantment, check the count of all items that have the given id.
						// otherwise, check only the count of items with exactly the needed enchantment level
						final long required = ((Config.ALT_BLACKSMITH_USE_RECIPES || !e.getMaintainIngredient()) ? (e.getItemCount() * _amount) : e.getItemCount());
						if (inv.getInventoryItemCount(e.getItemId(), list.getMaintainEnchantment() ? e.getEnchantLevel() : -1, false) < required)
						{
							SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_UNIT_OF_THE_ITEM_S1_REQUIRED);
							sm.addItemName(e.getTemplate());
							sm.addNumber((int)required);
							player.sendPacket(sm);
							return;
						}
					}
				}

				FastList<L2Augmentation> augmentation = FastList.newInstance();
				Elementals[] elemental = null;
				/** All ok, remove items and add final product */

				try
				{
					for (Ingredient e : entry.getIngredients())
					{
						if (e.getItemId() < 0)
						{
							if (!MultiSell.getSpecialIngredient(e.getItemId(), e.getItemCount() * _amount, player))
								return;
						}
						else
						{
							L2ItemInstance itemToTake = inv.getItemByItemId(e.getItemId()); // initialize and initial guess for the item to take.
							if (itemToTake == null)
							{ //this is a cheat, transaction will be aborted and if any items already taken will not be returned back to inventory!
								_log.severe("Character: " + player.getName() + " is trying to cheat in multisell, id:" + _listId + ":" + _entryId);
								player.setMultiSell(null);
								return;
							}

							/*if (itemToTake.isEquipped())
							{ //this is a cheat, transaction will be aborted and if any items already taken will not be returned back to inventory!
								_log.severe("Character: " + player.getName() + " is trying to cheat in multisell, exchanging equipped item, merchatnt id:" + merchant.getNpcId());
								player.setMultiSell(null);
								return;
							}*/

							if (Config.ALT_BLACKSMITH_USE_RECIPES || !e.getMaintainIngredient())
							{
								// if it's a stackable item, just reduce the amount from the first (only) instance that is found in the inventory
								if (itemToTake.isStackable())
								{
									if (!player.destroyItem("Multisell", itemToTake.getObjectId(), (e.getItemCount() * _amount), player.getTarget(), true))
									{
										player.setMultiSell(null);
										return;
									}
								}
								else
								{
									// for non-stackable items, one of two scenaria are possible:
									// a) list maintains enchantment: get the instances that exactly match the requested enchantment level
									// b) list does not maintain enchantment: get the instances with the LOWEST enchantment level

									// a) if enchantment is maintained, then get a list of items that exactly match this enchantment
									if (list.getMaintainEnchantment())
									{
										// loop through this list and remove (one by one) each item until the required amount is taken.
										L2ItemInstance[] inventoryContents = inv.getAllItemsByItemId(e.getItemId(), e.getEnchantLevel(), false);
										for (int i = 0; i < (e.getItemCount() * _amount); i++)
										{
											if (inventoryContents[i].isAugmented())
												augmentation.add(inventoryContents[i].getAugmentation());
											if(inventoryContents[i].getElementals() != null)
												elemental = inventoryContents[i].getElementals();
											if (!player.destroyItem("Multisell", inventoryContents[i].getObjectId(), 1, player.getTarget(), true))
											{
												player.setMultiSell(null);
												return;
											}
										}
									}
									else
										// b) enchantment is not maintained.  Get the instances with the LOWEST enchantment level
									{
										/* NOTE: There are 2 ways to achieve the above goal.
										 * 1) Get all items that have the correct itemId, loop through them until the lowest enchantment
										 * 		level is found.  Repeat all this for the next item until proper count of items is reached.
										 * 2) Get all items that have the correct itemId, sort them once based on enchantment level,
										 * 		and get the range of items that is necessary.
										 * Method 1 is faster for a small number of items to be exchanged.
										 * Method 2 is faster for large amounts.
										 *
										 * EXPLANATION:
										 *   Worst case scenario for algorithm 1 will make it run in a number of cycles given by:
										 * m*(2n-m+1)/2 where m is the number of items to be exchanged and n is the total
										 * number of inventory items that have a matching id.
										 *   With algorithm 2 (sort), sorting takes n*log(n) time and the choice is done in a single cycle
										 * for case b (just grab the m first items) or in linear time for case a (find the beginning of items
										 * with correct enchantment, index x, and take all items from x to x+m).
										 * Basically, whenever m > log(n) we have: m*(2n-m+1)/2 = (2nm-m*m+m)/2 >
										 * (2nlogn-logn*logn+logn)/2 = nlog(n) - log(n*n) + log(n) = nlog(n) + log(n/n*n) =
										 * nlog(n) + log(1/n) = nlog(n) - log(n) = (n-1)log(n)
										 * So for m < log(n) then m*(2n-m+1)/2 > (n-1)log(n) and m*(2n-m+1)/2 > nlog(n)
										 *
										 * IDEALLY:
										 * In order to best optimize the performance, choose which algorithm to run, based on whether 2^m > n
										 * if ( (2<<(e.getItemCount() * _amount)) < inventoryContents.length )
										 *   // do Algorithm 1, no sorting
										 * else
										 *   // do Algorithm 2, sorting
										 *
										 * CURRENT IMPLEMENTATION:
										 * In general, it is going to be very rare for a person to do a massive exchange of non-stackable items
										 * For this reason, we assume that algorithm 1 will always suffice and we keep things simple.
										 * If, in the future, it becomes necessary that we optimize, the above discussion should make it clear
										 * what optimization exactly is necessary (based on the comments under "IDEALLY").
										 */

										// choice 1.  Small number of items exchanged.  No sorting.
										for (int i = 1; i <= (e.getItemCount() * _amount); i++)
										{
											L2ItemInstance[] inventoryContents = inv.getAllItemsByItemId(e.getItemId(), false);

											itemToTake = inventoryContents[0];
											// get item with the LOWEST enchantment level  from the inventory...
											// +0 is lowest by default...
											if (itemToTake.getEnchantLevel() > 0)
											{
												for (L2ItemInstance item : inventoryContents)
												{
													if (item.getEnchantLevel() < itemToTake.getEnchantLevel())
													{
														itemToTake = item;
														// nothing will have enchantment less than 0. If a zero-enchanted
														// item is found, just take it
														if (itemToTake.getEnchantLevel() == 0)
															break;
													}
												}
											}
											if (!player.destroyItem("Multisell", itemToTake.getObjectId(), 1, player.getTarget(), true))
											{
												player.setMultiSell(null);
												return;
											}
										}
									}
								}
							}
						}
					}

					// Generate the appropriate items
					for (Ingredient e : entry.getProducts())
					{
						if (e.getItemId() < 0)
						{
							MultiSell.addSpecialProduct(e.getItemId(), e.getItemCount() * _amount, player);
						}
						else
						{
							if (e.isStackable())
								inv.addItem("Multisell", e.getItemId(), e.getItemCount() * _amount, player, player.getTarget());
							else
							{
								L2ItemInstance product = null;
								for (int i = 0; i < (e.getItemCount() * _amount); i++)
								{
									product = inv.addItem("Multisell", e.getItemId(), 1, player, player.getTarget());
									if (list.getMaintainEnchantment())
									{
										if (i < augmentation.size())
											product.setAugmentation(new L2Augmentation(augmentation.get(i).getAugmentationId(), augmentation.get(i).getSkill()));
										if (elemental != null)
											for (Elementals elm : elemental)
												product.setElementAttr(elm.getElement(), elm.getValue());
										product.setEnchantLevel(e.getEnchantLevel());
										product.updateDatabase();
									}
								}
							}
							// msg part
							SystemMessage sm;

							if (e.getItemCount() * _amount > 1)
							{
								sm = SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S);
								sm.addItemName(e.getItemId());
								sm.addItemNumber(e.getItemCount() * _amount);
								player.sendPacket(sm);
								sm = null;
							}
							else
							{
								if (list.getMaintainEnchantment() && e.getEnchantLevel() > 0)
								{
									sm = SystemMessage.getSystemMessage(SystemMessageId.ACQUIRED_S1_S2);
									sm.addItemNumber(e.getEnchantLevel());
									sm.addItemName(e.getItemId());
								}
								else
								{
									sm = SystemMessage.getSystemMessage(SystemMessageId.EARNED_ITEM_S1);
									sm.addItemName(e.getItemId());
								}
								player.sendPacket(sm);
								sm = null;
							}
						}
					}
					player.sendPacket(new ItemList(player, false));

					StatusUpdate su = new StatusUpdate(player);
					su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
					player.sendPacket(su);
					su = null;
				}
				finally
				{
					FastList.recycle(augmentation);
				}

				// finally, give the tax to the castle...
				if (entry.getTaxAmount() > 0)
					target.getCastle().addToTreasury(entry.getTaxAmount() * _amount);

				break;
			}
		}
	}

Replace Generic With Diamond ArrayList<Ingredient> with ArrayList<> in method public runImpl() : void from class com.l2jserver.gameserver.network.clientpackets.MultiSellChoose


	/**
	 * @see com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
	 */
	@Override
	protected void runImpl()
	{
		L2Character activeChar = getClient().getActiveChar();
		if (activeChar == null)
			return;

		//send a ExCursedWeaponList :p
		List<Integer> list = new FastList<>();
		for (int id : CursedWeaponsManager.getInstance().getCursedWeaponsIds())
			list.add(id);

		activeChar.sendPacket(new ExCursedWeaponList(list));
	}

	/**
	 * @see com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
	 */
	@Override
	protected void runImpl()
	{
		L2Character activeChar = getClient().getActiveChar();
		if (activeChar == null)
			return;

		//send a ExCursedWeaponList :p
		List<Integer> list = new FastList<Integer>();
		for (int id : CursedWeaponsManager.getInstance().getCursedWeaponsIds())
			list.add(id);

		activeChar.sendPacket(new ExCursedWeaponList(list));
	}

Replace Generic With Diamond FastList<Integer> with FastList<> in method protected runImpl() : void from class com.l2jserver.gameserver.network.clientpackets.RequestCursedWeaponList


	/**
	 * @see com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
	 */
	@Override
	protected void runImpl()
	{
		L2Character activeChar = getClient().getActiveChar();
		if (activeChar == null)
			return;

		List<CursedWeaponInfo> list = new FastList<>();
		for (CursedWeapon cw : CursedWeaponsManager.getInstance().getCursedWeapons())
		{
			if (!cw.isActive())
				continue;

			Point3D pos = cw.getWorldPosition();
			if (pos != null)
				list.add(new CursedWeaponInfo(pos, cw.getItemId(), cw.isActivated() ? 1 : 0));
		}

		//send the ExCursedWeaponLocation
		if (!list.isEmpty())
			activeChar.sendPacket(new ExCursedWeaponLocation(list));
	}

	/**
	 * @see com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket#runImpl()
	 */
	@Override
	protected void runImpl()
	{
		L2Character activeChar = getClient().getActiveChar();
		if (activeChar == null)
			return;

		List<CursedWeaponInfo> list = new FastList<CursedWeaponInfo>();
		for (CursedWeapon cw : CursedWeaponsManager.getInstance().getCursedWeapons())
		{
			if (!cw.isActive())
				continue;

			Point3D pos = cw.getWorldPosition();
			if (pos != null)
				list.add(new CursedWeaponInfo(pos, cw.getItemId(), cw.isActivated() ? 1 : 0));
		}

		//send the ExCursedWeaponLocation
		if (!list.isEmpty())
			activeChar.sendPacket(new ExCursedWeaponLocation(list));
	}

Replace Generic With Diamond FastList<CursedWeaponInfo> with FastList<> in method protected runImpl() : void from class com.l2jserver.gameserver.network.clientpackets.RequestCursedWeaponLocation


	@Override
	protected void runImpl()
	{
		final L2PcInstance activeChar = getClient().getActiveChar();
		if (activeChar == null || !activeChar.inObserverMode())
			return;

		List<OlympiadGameTask> games = new ArrayList<>();
		OlympiadGameTask task;
		for (int i = 0; i < OlympiadGameManager.getInstance().getNumberOfStadiums(); i++)
		{
			task = OlympiadGameManager.getInstance().getOlympiadTask(i);
			if (task != null)
			{
				if (!task.isBattleFinished())
					games.add(task);
			}
		}
		activeChar.sendPacket(new ExOlympiadMatchList(games));
	}

	@Override
	protected void runImpl()
	{
		final L2PcInstance activeChar = getClient().getActiveChar();
		if (activeChar == null || !activeChar.inObserverMode())
			return;

		List<OlympiadGameTask> games = new ArrayList<OlympiadGameTask>();
		OlympiadGameTask task;
		for (int i = 0; i < OlympiadGameManager.getInstance().getNumberOfStadiums(); i++)
		{
			task = OlympiadGameManager.getInstance().getOlympiadTask(i);
			if (task != null)
			{
				if (!task.isBattleFinished())
					games.add(task);
			}
		}
		activeChar.sendPacket(new ExOlympiadMatchList(games));
	}

Replace Generic With Diamond ArrayList<OlympiadGameTask> with ArrayList<> in method protected runImpl() : void from class com.l2jserver.gameserver.network.clientpackets.RequestExOlympiadMatchListRefresh


	@Override
	protected void runImpl()
	{
		L2PcInstance player = getClient().getActiveChar();
		if (player == null)
			return;
		FastList<String> manorsName = new FastList<>();
		manorsName.add("gludio");
		manorsName.add("dion");
		manorsName.add("giran");
		manorsName.add("oren");
		manorsName.add("aden");
		manorsName.add("innadril");
		manorsName.add("goddard");
		manorsName.add("rune");
		manorsName.add("schuttgart");
		ExSendManorList manorlist = new ExSendManorList(manorsName);
		player.sendPacket(manorlist);

	}

	@Override
	protected void runImpl()
	{
		L2PcInstance player = getClient().getActiveChar();
		if (player == null)
			return;
		FastList<String> manorsName = new FastList<String>();
		manorsName.add("gludio");
		manorsName.add("dion");
		manorsName.add("giran");
		manorsName.add("oren");
		manorsName.add("aden");
		manorsName.add("innadril");
		manorsName.add("goddard");
		manorsName.add("rune");
		manorsName.add("schuttgart");
		ExSendManorList manorlist = new ExSendManorList(manorsName);
		player.sendPacket(manorlist);

	}

Replace Generic With Diamond FastList<String> with FastList<> in method protected runImpl() : void from class com.l2jserver.gameserver.network.clientpackets.RequestManorList


	@Override
	protected void readImpl()
	{
		_storePlayerId = readD();
		int count = readD();
		if (count <= 0 || count > Config.MAX_ITEM_IN_PACKET || count * BATCH_LENGTH != _buf.remaining())
		{
			return;
		}
		_items = new FastSet<>();

		for (int i = 0; i < count; i++)
		{
			int objectId = readD();
			long cnt = readQ();
			long price = readQ();

			if (objectId < 1 || cnt < 1 || price < 0)
			{
				_items = null;
				return;
			}

			_items.add(new ItemRequest(objectId, cnt, price));
		}
	}

	@Override
	protected void readImpl()
	{
		_storePlayerId = readD();
		int count = readD();
		if (count <= 0 || count > Config.MAX_ITEM_IN_PACKET || count * BATCH_LENGTH != _buf.remaining())
		{
			return;
		}
		_items = new FastSet<ItemRequest>();

		for (int i = 0; i < count; i++)
		{
			int objectId = readD();
			long cnt = readQ();
			long price = readQ();

			if (objectId < 1 || cnt < 1 || price < 0)
			{
				_items = null;
				return;
			}

			_items.add(new ItemRequest(objectId, cnt, price));
		}
	}

Replace Generic With Diamond FastSet<ItemRequest> with FastSet<> in method protected readImpl() : void from class com.l2jserver.gameserver.network.clientpackets.RequestPrivateStoreBuy


	@Override
	protected void readImpl()
	{
		int sz = readD();
		sz = Math.min(sz, LIMIT);
		_order = new ArrayList<>(sz);
		for (int i = 0; i < sz; i++)
		{
			int objectId = readD();
			int order = readD();
			_order.add(new InventoryOrder(objectId, order));
		}
	}

	@Override
	protected void readImpl()
	{
		int sz = readD();
		sz = Math.min(sz, LIMIT);
		_order = new ArrayList<InventoryOrder>(sz);
		for (int i = 0; i < sz; i++)
		{
			int objectId = readD();
			int order = readD();
			_order.add(new InventoryOrder(objectId, order));
		}
	}

Replace Generic With Diamond ArrayList<InventoryOrder> with ArrayList<> in method protected readImpl() : void from class com.l2jserver.gameserver.network.clientpackets.RequestSaveInventoryOrder


	public void insertCategory(int cat, int cmd)
	{
		if (_catMap.containsKey(cat))
			_catMap.get(cat).add(cmd);
		else
		{
			List<Integer> tmp = new FastList<>();
			tmp.add(cmd);
			_catMap.put(cat, tmp);
		}
	}

	public void insertCategory(int cat, int cmd)
	{
		if (_catMap.containsKey(cat))
			_catMap.get(cat).add(cmd);
		else
		{
			List<Integer> tmp = new FastList<Integer>();
			tmp.add(cmd);
			_catMap.put(cat, tmp);
		}
	}

Replace Generic With Diamond FastList<Integer> with FastList<> in method public insertCategory(cat int, cmd int) : void from class com.l2jserver.gameserver.network.clientpackets.RequestSaveKeyMapping


	public void insertKey(int cat, int cmdId, int key, int tgKey1, int tgKey2, int show)
	{
		ActionKey tmk = new ActionKey(cat, cmdId, key, tgKey1, tgKey2, show);
		if (_keyMap.containsKey(cat))
			_keyMap.get(cat).add(tmk);
		else
		{
			List<ActionKey> tmp = new FastList<>();
			tmp.add(tmk);
			_keyMap.put(cat, tmp);
		}
	}

	public void insertKey(int cat, int cmdId, int key, int tgKey1, int tgKey2, int show)
	{
		ActionKey tmk = new ActionKey(cat, cmdId, key, tgKey1, tgKey2, show);
		if (_keyMap.containsKey(cat))
			_keyMap.get(cat).add(tmk);
		else
		{
			List<ActionKey> tmp = new FastList<ActionKey>();
			tmp.add(tmk);
			_keyMap.put(cat, tmp);
		}
	}

Replace Generic With Diamond FastList<ActionKey> with FastList<> in method public insertKey(cat int, cmdId int, key int, tgKey1 int, tgKey2 int, show int) : void from class com.l2jserver.gameserver.network.clientpackets.RequestSaveKeyMapping


	@Override
	protected void runImpl()
	{
		if (_items == null)
			return;

		L2PcInstance player = getClient().getActiveChar();
		// check player privileges
		if (player == null
				|| player.getClan() == null
				|| (player.getClanPrivileges() & L2Clan.CP_CS_MANOR_ADMIN) == 0)
			return;

		// check castle owner
		Castle currentCastle = CastleManager.getInstance().getCastleById(_manorId);
		if (currentCastle.getOwnerId() != player.getClanId())
			return;

		L2Object manager = player.getTarget();

		if (!(manager instanceof L2CastleChamberlainInstance))
			manager = player.getLastFolkNPC();

		if (!(manager instanceof L2CastleChamberlainInstance))
			return;

		if (((L2CastleChamberlainInstance)manager).getCastle() != currentCastle)
			return;

		if (!player.isInsideRadius(manager, INTERACTION_DISTANCE, true, false))
			return;

		List<CropProcure> crops = new ArrayList<>(_items.length);
		for (Crop i : _items)
		{
			CropProcure s = i.getCrop();
			if (s == null)
			{
				Util.handleIllegalPlayerAction(player, "Warning!! Character "
						+ player.getName() + " of account "
						+ player.getAccountName()
						+ " tried to overflow while setting manor.",
						Config.DEFAULT_PUNISH);
				return;
			}
			crops.add(s);
		}

		currentCastle.setCropProcure(crops, CastleManorManager.PERIOD_NEXT);
		if (Config.ALT_MANOR_SAVE_ALL_ACTIONS)
			currentCastle.saveCropData(CastleManorManager.PERIOD_NEXT);
	}

	@Override
	protected void runImpl()
	{
		if (_items == null)
			return;

		L2PcInstance player = getClient().getActiveChar();
		// check player privileges
		if (player == null
				|| player.getClan() == null
				|| (player.getClanPrivileges() & L2Clan.CP_CS_MANOR_ADMIN) == 0)
			return;

		// check castle owner
		Castle currentCastle = CastleManager.getInstance().getCastleById(_manorId);
		if (currentCastle.getOwnerId() != player.getClanId())
			return;

		L2Object manager = player.getTarget();

		if (!(manager instanceof L2CastleChamberlainInstance))
			manager = player.getLastFolkNPC();

		if (!(manager instanceof L2CastleChamberlainInstance))
			return;

		if (((L2CastleChamberlainInstance)manager).getCastle() != currentCastle)
			return;

		if (!player.isInsideRadius(manager, INTERACTION_DISTANCE, true, false))
			return;

		List<CropProcure> crops = new ArrayList<CropProcure>(_items.length);
		for (Crop i : _items)
		{
			CropProcure s = i.getCrop();
			if (s == null)
			{
				Util.handleIllegalPlayerAction(player, "Warning!! Character "
						+ player.getName() + " of account "
						+ player.getAccountName()
						+ " tried to overflow while setting manor.",
						Config.DEFAULT_PUNISH);
				return;
			}
			crops.add(s);
		}

		currentCastle.setCropProcure(crops, CastleManorManager.PERIOD_NEXT);
		if (Config.ALT_MANOR_SAVE_ALL_ACTIONS)
			currentCastle.saveCropData(CastleManorManager.PERIOD_NEXT);
	}

Replace Generic With Diamond ArrayList<CropProcure> with ArrayList<> in method protected runImpl() : void from class com.l2jserver.gameserver.network.clientpackets.RequestSetCrop


	@Override
	protected void runImpl()
	{
		if (_items == null)
			return;

		L2PcInstance player = getClient().getActiveChar();
		// check player privileges
		if (player == null
				|| player.getClan() == null
				|| (player.getClanPrivileges() & L2Clan.CP_CS_MANOR_ADMIN) == 0)
			return;

		// check castle owner
		Castle currentCastle = CastleManager.getInstance().getCastleById(_manorId);
		if (currentCastle.getOwnerId() != player.getClanId())
			return;

		L2Object manager = player.getTarget();

		if (!(manager instanceof L2CastleChamberlainInstance))
			manager = player.getLastFolkNPC();

		if (!(manager instanceof L2CastleChamberlainInstance))
			return;

		if (((L2CastleChamberlainInstance)manager).getCastle() != currentCastle)
			return;

		if (!player.isInsideRadius(manager, INTERACTION_DISTANCE, true, false))
			return;

		List<SeedProduction> seeds = new ArrayList<>(_items.length);
		for (Seed i : _items)
		{
			SeedProduction s = i.getSeed();
			if (s == null)
			{
				Util.handleIllegalPlayerAction(player, "Warning!! Character "
						+ player.getName() + " of account "
						+ player.getAccountName()
						+ " tried to overflow while setting manor.",
						Config.DEFAULT_PUNISH);
				return;
			}
			seeds.add(s);
		}

		currentCastle.setSeedProduction(seeds, CastleManorManager.PERIOD_NEXT);
		if (Config.ALT_MANOR_SAVE_ALL_ACTIONS)
			currentCastle.saveSeedData(CastleManorManager.PERIOD_NEXT);
	}

	@Override
	protected void runImpl()
	{
		if (_items == null)
			return;

		L2PcInstance player = getClient().getActiveChar();
		// check player privileges
		if (player == null
				|| player.getClan() == null
				|| (player.getClanPrivileges() & L2Clan.CP_CS_MANOR_ADMIN) == 0)
			return;

		// check castle owner
		Castle currentCastle = CastleManager.getInstance().getCastleById(_manorId);
		if (currentCastle.getOwnerId() != player.getClanId())
			return;

		L2Object manager = player.getTarget();

		if (!(manager instanceof L2CastleChamberlainInstance))
			manager = player.getLastFolkNPC();

		if (!(manager instanceof L2CastleChamberlainInstance))
			return;

		if (((L2CastleChamberlainInstance)manager).getCastle() != currentCastle)
			return;

		if (!player.isInsideRadius(manager, INTERACTION_DISTANCE, true, false))
			return;

		List<SeedProduction> seeds = new ArrayList<SeedProduction>(_items.length);
		for (Seed i : _items)
		{
			SeedProduction s = i.getSeed();
			if (s == null)
			{
				Util.handleIllegalPlayerAction(player, "Warning!! Character "
						+ player.getName() + " of account "
						+ player.getAccountName()
						+ " tried to overflow while setting manor.",
						Config.DEFAULT_PUNISH);
				return;
			}
			seeds.add(s);
		}

		currentCastle.setSeedProduction(seeds, CastleManorManager.PERIOD_NEXT);
		if (Config.ALT_MANOR_SAVE_ALL_ACTIONS)
			currentCastle.saveSeedData(CastleManorManager.PERIOD_NEXT);
	}

Replace Generic With Diamond ArrayList<SeedProduction> with ArrayList<> in method protected runImpl() : void from class com.l2jserver.gameserver.network.clientpackets.RequestSetSeed


	public ServerStatus()
	{
		_attributes = new ArrayList<>();
	}

	public ServerStatus()
	{
		_attributes = new ArrayList<Attribute>();
	}

Replace Generic With Diamond ArrayList<Attribute> with ArrayList<> in method public ServerStatus() from class com.l2jserver.gameserver.network.gameserverpackets.ServerStatus


	public AbnormalStatusUpdate()
	{
		_effects = new FastList<>();
	}

	public AbnormalStatusUpdate()
	{
		_effects = new FastList<Effect>();
	}

Replace Generic With Diamond FastList<Effect> with FastList<> in method public AbnormalStatusUpdate() from class com.l2jserver.gameserver.network.serverpackets.AbnormalStatusUpdate


	public BuyListSeed(long currentMoney, int castleId, List<SeedProduction> seeds)
	{
		_money = currentMoney;
		_manorId = castleId;

		if (seeds != null && seeds.size() > 0)
		{
			_list = new FastList<>();
			for (SeedProduction s : seeds)
			{
				if (s.getCanProduce() > 0 && s.getPrice() > 0)
					_list.add(new Seed(s.getId(), s.getCanProduce(), s.getPrice()));
			}
		}
	}

	public BuyListSeed(long currentMoney, int castleId, List<SeedProduction> seeds)
	{
		_money = currentMoney;
		_manorId = castleId;

		if (seeds != null && seeds.size() > 0)
		{
			_list = new FastList<Seed>();
			for (SeedProduction s : seeds)
			{
				if (s.getCanProduce() > 0 && s.getPrice() > 0)
					_list.add(new Seed(s.getId(), s.getCanProduce(), s.getPrice()));
			}
		}
	}

Replace Generic With Diamond FastList<Seed> with FastList<> in method public BuyListSeed(currentMoney long, castleId int, seeds List<SeedProduction>) from class com.l2jserver.gameserver.network.serverpackets.BuyListSeed


	private static CharSelectInfoPackage[] loadCharacterSelectInfo(String loginName)
	{
		CharSelectInfoPackage charInfopackage;
		List<CharSelectInfoPackage> characterList = new FastList<>();

		Connection con = null;
		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT account_name, charId, char_name, level, maxHp, curHp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, accesslevel, online, char_slot, lastAccess, base_class, transform_id, language, vitality_points FROM characters WHERE account_name=?");
			statement.setString(1, loginName);
			ResultSet charList = statement.executeQuery();

			while (charList.next())// fills the package
			{
				charInfopackage = restoreChar(charList);
				if ( charInfopackage != null )
					characterList.add(charInfopackage);
			}

			charList.close();
			statement.close();

			return characterList.toArray(new CharSelectInfoPackage[characterList.size()]);
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "Could not restore char info: " + e.getMessage(), e);
		}
		finally
		{
			L2DatabaseFactory.close(con);
		}
		return new CharSelectInfoPackage[0];
	}

	private static CharSelectInfoPackage[] loadCharacterSelectInfo(String loginName)
	{
		CharSelectInfoPackage charInfopackage;
		List<CharSelectInfoPackage> characterList = new FastList<CharSelectInfoPackage>();

		Connection con = null;
		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT account_name, charId, char_name, level, maxHp, curHp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, sp, karma, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, accesslevel, online, char_slot, lastAccess, base_class, transform_id, language, vitality_points FROM characters WHERE account_name=?");
			statement.setString(1, loginName);
			ResultSet charList = statement.executeQuery();

			while (charList.next())// fills the package
			{
				charInfopackage = restoreChar(charList);
				if ( charInfopackage != null )
					characterList.add(charInfopackage);
			}

			charList.close();
			statement.close();

			return characterList.toArray(new CharSelectInfoPackage[characterList.size()]);
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "Could not restore char info: " + e.getMessage(), e);
		}
		finally
		{
			L2DatabaseFactory.close(con);
		}
		return new CharSelectInfoPackage[0];
	}

Replace Generic With Diamond FastList<CharSelectInfoPackage> with FastList<> in method private loadCharacterSelectInfo(loginName String) : CharSelectInfoPackage[] from class com.l2jserver.gameserver.network.serverpackets.CharSelectionInfo


	/**
	 * String parameter for argument S1,S2,.. in npcstring-e.dat
	 * @param text
	 */
	public void addStringParameter(String text)
	{
		if (_parameters == null)
			_parameters = new ArrayList<>();
		_parameters.add(text);
	}

	/**
	 * String parameter for argument S1,S2,.. in npcstring-e.dat
	 * @param text
	 */
	public void addStringParameter(String text)
	{
		if (_parameters == null)
			_parameters = new ArrayList<String>();
		_parameters.add(text);
	}

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public addStringParameter(text String) : void from class com.l2jserver.gameserver.network.serverpackets.CreatureSay


	public ExEnchantSkillList(EnchantSkillType type)
	{
		_type = type;
		_skills = new FastList<>();
	}

	public ExEnchantSkillList(EnchantSkillType type)
	{
		_type = type;
		_skills = new FastList<Skill>();
	}

Replace Generic With Diamond FastList<Skill> with FastList<> in method public ExEnchantSkillList(type EnchantSkillType) from class com.l2jserver.gameserver.network.serverpackets.ExEnchantSkillList


	public ExListPartyMatchingWaitingRoom(L2PcInstance player, int page, int minlvl, int maxlvl, int mode)
	{
		_activeChar = player;
		_page = page;
		_minlvl = minlvl;
		_maxlvl = maxlvl;
		_mode = mode;
		_members = new ArrayList<>();
	}

	public ExListPartyMatchingWaitingRoom(L2PcInstance player, int page, int minlvl, int maxlvl, int mode)
	{
		_activeChar = player;
		_page = page;
		_minlvl = minlvl;
		_maxlvl = maxlvl;
		_mode = mode;
		_members = new FastList<L2PcInstance>();
	}

Replace Generic With Diamond FastList<L2PcInstance> with ArrayList<> in method public ExListPartyMatchingWaitingRoom(player L2PcInstance, page int, minlvl int, maxlvl int, mode int) from class com.l2jserver.gameserver.network.serverpackets.ExListPartyMatchingWaitingRoom


	public ExOlympiadSpelledInfo(L2PcInstance player)
	{
		_effects = new FastList<>();
		_playerID = player.getObjectId();
	}

	public ExOlympiadSpelledInfo(L2PcInstance player)
	{
		_effects = new FastList<Effect>();
		_playerID = player.getObjectId();
	}

Replace Generic With Diamond FastList<Effect> with FastList<> in method public ExOlympiadSpelledInfo(player L2PcInstance) from class com.l2jserver.gameserver.network.serverpackets.ExOlympiadSpelledInfo


	public ExShowContactList(L2PcInstance player)
	{
		_contacts = new FastList<>();
		_contacts.addAll(player.getContactList().getAllContacts());
	}

	public ExShowContactList(L2PcInstance player)
	{
		_contacts = new FastList<String>();
		_contacts.addAll(player.getContactList().getAllContacts());
	}

Replace Generic With Diamond FastList<String> with FastList<> in method public ExShowContactList(player L2PcInstance) from class com.l2jserver.gameserver.network.serverpackets.ExShowContactList


	public ExShowProcureCropDetail(int cropId)
	{
		_cropId = cropId;
		_castleCrops = new FastMap<>();

		for (Castle c : CastleManager.getInstance().getCastles())
		{
			CropProcure cropItem = c.getCrop(_cropId,
					CastleManorManager.PERIOD_CURRENT);
			if (cropItem != null && cropItem.getAmount() > 0)
			{
				_castleCrops.put(c.getCastleId(), cropItem);
			}
		}
	}

	public ExShowProcureCropDetail(int cropId)
	{
		_cropId = cropId;
		_castleCrops = new FastMap<Integer, CropProcure>();

		for (Castle c : CastleManager.getInstance().getCastles())
		{
			CropProcure cropItem = c.getCrop(_cropId,
					CastleManorManager.PERIOD_CURRENT);
			if (cropItem != null && cropItem.getAmount() > 0)
			{
				_castleCrops.put(c.getCastleId(), cropItem);
			}
		}
	}

Replace Generic With Diamond FastMap<Integer,CropProcure> with FastMap<> in method public ExShowProcureCropDetail(cropId int) from class com.l2jserver.gameserver.network.serverpackets.ExShowProcureCropDetail


	public FriendList(L2PcInstance player)
	{
		_info = new FastList<>(player.getFriendList().size());
		for (int objId : player.getFriendList())
		{
			String name = CharNameTable.getInstance().getNameById(objId);
			L2PcInstance player1 = L2World.getInstance().getPlayer(objId);
			boolean online = false;
			if (player1 != null && player1.isOnline())
				online = true;
			_info.add(new FriendInfo(objId, name, online));
		}
	}

	public FriendList(L2PcInstance player)
	{
		_info = new FastList<FriendInfo>(player.getFriendList().size());
		for (int objId : player.getFriendList())
		{
			String name = CharNameTable.getInstance().getNameById(objId);
			L2PcInstance player1 = L2World.getInstance().getPlayer(objId);
			boolean online = false;
			if (player1 != null && player1.isOnline())
				online = true;
			_info.add(new FriendInfo(objId, name, online));
		}
	}

Replace Generic With Diamond FastList<FriendInfo> with FastList<> in method public FriendList(player L2PcInstance) from class com.l2jserver.gameserver.network.serverpackets.FriendList


	public FriendListExtended(L2PcInstance player)
	{
		_info = new FastList<>(player.getFriendList().size());
		for (int objId : player.getFriendList())
		{
			String name = CharNameTable.getInstance().getNameById(objId);
			L2PcInstance player1 = L2World.getInstance().getPlayer(objId);

			boolean online = false;
			int classid = 0;
			int level = 0;

			if (player1 == null)
			{
				Connection con = null;
				try
				{
					con = L2DatabaseFactory.getInstance().getConnection();
					PreparedStatement statement = con.prepareStatement("SELECT char_name, online, classid, level FROM characters WHERE charId = ?");
					statement.setInt(1, objId);
					ResultSet rset = statement.executeQuery();
					if (rset.next())
					{
						_info.add(new FriendInfo(objId, rset.getString(1), rset.getInt(2) == 1, rset.getInt(3), rset.getInt(4)));
					}
					else
						continue;
				}
				catch (Exception e)
				{
					// Who cares?
				}
				finally
				{
					L2DatabaseFactory.close(con);
				}

				continue;
			}

			if (player1.isOnline())
				online = true;

			classid = player1.getClassId().getId();
			level = player1.getLevel();

			_info.add(new FriendInfo(objId, name, online, classid, level));
		}
	}

	public FriendListExtended(L2PcInstance player)
	{
		_info = new FastList<FriendInfo>(player.getFriendList().size());
		for (int objId : player.getFriendList())
		{
			String name = CharNameTable.getInstance().getNameById(objId);
			L2PcInstance player1 = L2World.getInstance().getPlayer(objId);

			boolean online = false;
			int classid = 0;
			int level = 0;

			if (player1 == null)
			{
				Connection con = null;
				try
				{
					con = L2DatabaseFactory.getInstance().getConnection();
					PreparedStatement statement = con.prepareStatement("SELECT char_name, online, classid, level FROM characters WHERE charId = ?");
					statement.setInt(1, objId);
					ResultSet rset = statement.executeQuery();
					if (rset.next())
					{
						_info.add(new FriendInfo(objId, rset.getString(1), rset.getInt(2) == 1, rset.getInt(3), rset.getInt(4)));
					}
					else
						continue;
				}
				catch (Exception e)
				{
					// Who cares?
				}
				finally
				{
					L2DatabaseFactory.close(con);
				}

				continue;
			}

			if (player1.isOnline())
				online = true;

			classid = player1.getClassId().getId();
			level = player1.getLevel();

			_info.add(new FriendInfo(objId, name, online, classid, level));
		}
	}

Replace Generic With Diamond FastList<FriendInfo> with FastList<> in method public FriendListExtended(player L2PcInstance) from class com.l2jserver.gameserver.network.serverpackets.FriendListExtended


	public InventoryUpdate()
	{
		_items = new FastList<>();
		if (Config.DEBUG)
		{
			showDebug();
		}
	}

	public InventoryUpdate()
	{
		_items = new FastList<ItemInfo>();
		if (Config.DEBUG)
		{
			showDebug();
		}
	}

Replace Generic With Diamond FastList<ItemInfo> with FastList<> in method public InventoryUpdate() from class com.l2jserver.gameserver.network.serverpackets.InventoryUpdate


	public ListPartyWating(L2PcInstance player, int auto, int location, int limit)
	{
		_cha = player;
		_loc = location;
		_lim = limit;
		_rooms = new FastList<>();
	}

	public ListPartyWating(L2PcInstance player, int auto, int location, int limit)
	{
		_cha = player;
		_loc = location;
		_lim = limit;
		_rooms = new FastList<PartyMatchRoom>();
	}

Replace Generic With Diamond FastList<PartyMatchRoom> with FastList<> in method public ListPartyWating(player L2PcInstance, auto int, location int, limit int) from class com.l2jserver.gameserver.network.serverpackets.ListPartyWating


	/**
	 * @param text - parameter for argument S1,S2 etc of an npcstring
	 * @return this NpcSay packet object
	 */
	public NpcSay addStringParameter(String text)
	{
		if (_parameters == null)
			_parameters = new ArrayList<>();
		_parameters.add(text);
		return this;
	}

	/**
	 * @param text - parameter for argument S1,S2 etc of an npcstring
	 * @return this NpcSay packet object
	 */
	public NpcSay addStringParameter(String text)
	{
		if (_parameters == null)
			_parameters = new ArrayList<String>();
		_parameters.add(text);
		return this;
	}

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method public addStringParameter(text String) : NpcSay from class com.l2jserver.gameserver.network.serverpackets.NpcSay


	public PartySpelled(L2Character cha)
	{
		_effects = new FastList<>();
		_activeChar = cha;
	}

	public PartySpelled(L2Character cha)
	{
		_effects = new FastList<Effect>();
		_activeChar = cha;
	}

Replace Generic With Diamond FastList<Effect> with FastList<> in method public PartySpelled(cha L2Character) from class com.l2jserver.gameserver.network.serverpackets.PartySpelled


	public SkillList()
	{
		_skills = new FastList<>();
	}

	public SkillList()
	{
		_skills = new FastList<Skill>();
	}

Replace Generic With Diamond FastList<Skill> with FastList<> in method public SkillList() from class com.l2jserver.gameserver.network.serverpackets.SkillList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Weapon

	 *
Arrow

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createWeaponList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isWeapon() || item.getItem().getType2() == L2Item.TYPE2_WEAPON || (item.isEtcItem() && item.getItemType() == L2EtcItemType.ARROW) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Weapon

	 *
Arrow

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createWeaponList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isWeapon() || item.getItem().getType2() == L2Item.TYPE2_WEAPON || (item.isEtcItem() && item.getItemType() == L2EtcItemType.ARROW) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createWeaponList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Armor

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createArmorList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isArmor() || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Armor

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createArmorList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isArmor() || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createArmorList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Everything which is no Weapon/Armor

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createEtcItemList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Everything which is no Weapon/Armor

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createEtcItemList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createEtcItemList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Materials

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createMatList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.MATERIAL || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Materials

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createMatList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.MATERIAL || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createMatList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Recipes

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createRecipeList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.RECIPE || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Recipes

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createRecipeList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.RECIPE || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createRecipeList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList