More final and static cleanups.

This commit is contained in:
MobiusDevelopment
2019-08-01 09:43:44 +00:00
parent 406caf063a
commit 565933653d
454 changed files with 757 additions and 757 deletions

View File

@@ -273,7 +273,7 @@ public class Alarm extends AbstractNpcAI
* @param questId the quest ID * @param questId the quest ID
* @param memoState the memo state * @param memoState the memo state
*/ */
private static void setMemoState(PlayerInstance player, int questId, int memoState) private void setMemoState(PlayerInstance player, int questId, int memoState)
{ {
QuestState qs = null; QuestState qs = null;
switch (questId) switch (questId)
@@ -328,7 +328,7 @@ public class Alarm extends AbstractNpcAI
* @param slot the slot * @param slot the slot
* @param memoStateEx the memo state ex * @param memoStateEx the memo state ex
*/ */
private static void setMemoStateEx(PlayerInstance player, int questId, int slot, int memoStateEx) private void setMemoStateEx(PlayerInstance player, int questId, int slot, int memoStateEx)
{ {
QuestState qs = null; QuestState qs = null;
switch (questId) switch (questId)

View File

@@ -139,7 +139,7 @@ public class QuarryRebel extends AbstractNpcAI
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
} }
private static void spawnNextMob(int npcId, Creature killer, Location loc) private void spawnNextMob(int npcId, Creature killer, Location loc)
{ {
final Npc npc = addSpawn(npcId, loc.getX(), loc.getY(), loc.getZ(), killer.getHeading() + 32500, false, 300000); final Npc npc = addSpawn(npcId, loc.getX(), loc.getY(), loc.getZ(), killer.getHeading() + 32500, false, 300000);
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, 1000); npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, 1000);

View File

@@ -246,7 +246,7 @@ public class StakatoNest extends AbstractNpcAI
return null; return null;
} }
private static void giveCocoon(PlayerInstance player, Npc npc) private void giveCocoon(PlayerInstance player, Npc npc)
{ {
player.addItem("StakatoCocoon", ((getRandom(100) > 80) ? LARGE_COCOON : SMALL_COCOON), 1, npc, true); player.addItem("StakatoCocoon", ((getRandom(100) > 80) ? LARGE_COCOON : SMALL_COCOON), 1, npc, true);
} }

View File

@@ -223,7 +223,7 @@ public class Elpies extends Event
} }
} }
private static void dropItem(Npc mob, PlayerInstance player, int[][] droplist) private void dropItem(Npc mob, PlayerInstance player, int[][] droplist)
{ {
final int chance = getRandom(100); final int chance = getRandom(100);

View File

@@ -240,7 +240,7 @@ public class Rabbits extends Event
return super.onAttack(npc, attacker, damage, isSummon); return super.onAttack(npc, attacker, damage, isSummon);
} }
private static void dropItem(Npc npc, PlayerInstance player, int[][] droplist) private void dropItem(Npc npc, PlayerInstance player, int[][] droplist)
{ {
final int chance = getRandom(100); final int chance = getRandom(100);
for (int[] drop : droplist) for (int[] drop : droplist)
@@ -253,7 +253,7 @@ public class Rabbits extends Event
} }
} }
private static void recordSpawn(List<Npc> npcs, int npcId, int x, int y, int z, int heading, boolean randomOffSet, long despawnDelay) private void recordSpawn(List<Npc> npcs, int npcId, int x, int y, int z, int heading, boolean randomOffSet, long despawnDelay)
{ {
final Npc npc = addSpawn(npcId, x, y, z, heading, randomOffSet, despawnDelay); final Npc npc = addSpawn(npcId, x, y, z, heading, randomOffSet, despawnDelay);
if (npc.getId() == CHEST) if (npc.getId() == CHEST)

View File

@@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler
* @param gmchar the player to switch the Game Master skills. * @param gmchar the player to switch the Game Master skills.
* @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}.
*/ */
private static void switchSkills(PlayerInstance gmchar, boolean toAuraSkills) private void switchSkills(PlayerInstance gmchar, boolean toAuraSkills)
{ {
final Collection<Skill> skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); final Collection<Skill> skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree();
for (Skill skill : skills) for (Skill skill : skills)
@@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler
return ADMIN_COMMANDS; return ADMIN_COMMANDS;
} }
private static void showBuffs(PlayerInstance activeChar, Creature target, int page, boolean passive) private void showBuffs(PlayerInstance activeChar, Creature target, int page, boolean passive)
{ {
final List<BuffInfo> effects = new ArrayList<>(); final List<BuffInfo> effects = new ArrayList<>();
if (!passive) if (!passive)
@@ -353,7 +353,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void removeBuff(PlayerInstance activeChar, int objId, int skillId) private void removeBuff(PlayerInstance activeChar, int objId, int skillId)
{ {
Creature target = null; Creature target = null;
try try
@@ -380,7 +380,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void removeAllBuffs(PlayerInstance activeChar, int objId) private void removeAllBuffs(PlayerInstance activeChar, int objId)
{ {
Creature target = null; Creature target = null;
try try
@@ -403,7 +403,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void viewBlockedEffects(PlayerInstance activeChar, int objId) private void viewBlockedEffects(PlayerInstance activeChar, int objId)
{ {
Creature target = null; Creature target = null;
try try

View File

@@ -113,7 +113,7 @@ public class AdminChangeAccessLevel implements IAdminCommandHandler
* @param player the online target * @param player the online target
* @param lvl the access level * @param lvl the access level
*/ */
private static void onlineChange(PlayerInstance activeChar, PlayerInstance player, int lvl) private void onlineChange(PlayerInstance activeChar, PlayerInstance player, int lvl)
{ {
if (lvl >= 0) if (lvl >= 0)
{ {

View File

@@ -174,7 +174,7 @@ public class AdminFence implements IAdminCommandHandler
return ADMIN_COMMANDS; return ADMIN_COMMANDS;
} }
private static void sendHtml(PlayerInstance activeChar, int page) private void sendHtml(PlayerInstance activeChar, int page)
{ {
final PageResult result = PageBuilder.newBuilder(FenceData.getInstance().getFences().values(), 10, "bypass -h admin_listfence").currentPage(page).style(ButtonsStyle.INSTANCE).bodyHandler((pages, fence, sb) -> final PageResult result = PageBuilder.newBuilder(FenceData.getInstance().getFences().values(), 10, "bypass -h admin_listfence").currentPage(page).style(ButtonsStyle.INSTANCE).bodyHandler((pages, fence, sb) ->
{ {

View File

@@ -153,7 +153,7 @@ public class AdminShowQuests implements IAdminCommandHandler
return true; return true;
} }
private static void showFirstQuestMenu(PlayerInstance target, PlayerInstance actor) private void showFirstQuestMenu(PlayerInstance target, PlayerInstance actor)
{ {
final StringBuilder replyMSG = new StringBuilder("<html><body><table width=270><tr><td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center>Player: " + target.getName() + "</center></td><td width=45><button value=\"Back\" action=\"bypass -h admin_admin6\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>"); final StringBuilder replyMSG = new StringBuilder("<html><body><table width=270><tr><td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center>Player: " + target.getName() + "</center></td><td width=45><button value=\"Back\" action=\"bypass -h admin_admin6\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>");
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
@@ -171,7 +171,7 @@ public class AdminShowQuests implements IAdminCommandHandler
actor.sendPacket(adminReply); actor.sendPacket(adminReply);
} }
private static void showQuestMenu(PlayerInstance target, PlayerInstance actor, String[] val) private void showQuestMenu(PlayerInstance target, PlayerInstance actor, String[] val)
{ {
try (Connection con = DatabaseFactory.getConnection()) try (Connection con = DatabaseFactory.getConnection())
{ {
@@ -317,7 +317,7 @@ public class AdminShowQuests implements IAdminCommandHandler
} }
} }
private static void setQuestVar(PlayerInstance target, PlayerInstance actor, String[] val) private void setQuestVar(PlayerInstance target, PlayerInstance actor, String[] val)
{ {
QuestState qs = target.getQuestState(val[0]); QuestState qs = target.getQuestState(val[0]);
final String[] outval = new String[3]; final String[] outval = new String[3];

View File

@@ -111,7 +111,7 @@ public class AdminZone implements IAdminCommandHandler
return true; return true;
} }
private static void showHtml(PlayerInstance activeChar) private void showHtml(PlayerInstance activeChar)
{ {
final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/zone.htm"); final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/zone.htm");
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
@@ -163,7 +163,7 @@ public class AdminZone implements IAdminCommandHandler
activeChar.sendPacket(adminReply); activeChar.sendPacket(adminReply);
} }
private static void getGeoRegionXY(PlayerInstance activeChar) private void getGeoRegionXY(PlayerInstance activeChar)
{ {
final int worldX = activeChar.getX(); final int worldX = activeChar.getX();
final int worldY = activeChar.getY(); final int worldY = activeChar.getY();

View File

@@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler
player.sendPacket(html); player.sendPacket(html);
} }
private static void sendNpcSkillView(PlayerInstance player, Npc npc) private void sendNpcSkillView(PlayerInstance player, Npc npc)
{ {
final NpcHtmlMessage html = new NpcHtmlMessage(); final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(player, "data/html/mods/NpcView/Skills.htm"); html.setFile(player, "data/html/mods/NpcView/Skills.htm");
@@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler
player.sendPacket(html); player.sendPacket(html);
} }
private static void sendAggroListView(PlayerInstance player, Npc npc) private void sendAggroListView(PlayerInstance player, Npc npc)
{ {
final NpcHtmlMessage html = new NpcHtmlMessage(); final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(player, "data/html/mods/NpcView/AggroList.htm"); html.setFile(player, "data/html/mods/NpcView/AggroList.htm");
@@ -358,7 +358,7 @@ public class NpcViewMod implements IBypassHandler
return sb.toString(); return sb.toString();
} }
private static void sendNpcDropList(PlayerInstance player, Npc npc, DropType dropType, int page) private void sendNpcDropList(PlayerInstance player, Npc npc, DropType dropType, int page)
{ {
final List<DropHolder> dropList = npc.getTemplate().getDropList(dropType); final List<DropHolder> dropList = npc.getTemplate().getDropList(dropType);
if (dropList == null) if (dropList == null)

View File

@@ -154,7 +154,7 @@ public class Observation implements IBypassHandler
return false; return false;
} }
private static void doObserve(PlayerInstance player, Npc npc, Location pos, long cost) private void doObserve(PlayerInstance player, Npc npc, Location pos, long cost)
{ {
if (player.reduceAdena("Broadcast", cost, npc, true)) if (player.reduceAdena("Broadcast", cost, npc, true))
{ {

View File

@@ -78,7 +78,7 @@ public class PrivateWarehouse implements IBypassHandler
return false; return false;
} }
private static void showWithdrawWindow(PlayerInstance player) private void showWithdrawWindow(PlayerInstance player)
{ {
player.sendPacket(ActionFailed.STATIC_PACKET); player.sendPacket(ActionFailed.STATIC_PACKET);
player.setActiveWarehouse(player.getWarehouse()); player.setActiveWarehouse(player.getWarehouse());

View File

@@ -84,7 +84,7 @@ public class QuestLink implements IBypassHandler
* @param npc The table containing quests of the NpcInstance * @param npc The table containing quests of the NpcInstance
* @param quests * @param quests
*/ */
private static void showQuestChooseWindow(PlayerInstance player, Npc npc, Collection<Quest> quests) private void showQuestChooseWindow(PlayerInstance player, Npc npc, Collection<Quest> quests)
{ {
final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbStarted = new StringBuilder(128);
final StringBuilder sbCanStart = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128);
@@ -241,7 +241,7 @@ public class QuestLink implements IBypassHandler
* @param npc the NpcInstance that chats with the {@code player} * @param npc the NpcInstance that chats with the {@code player}
* @param questId the Id of the quest to display the message * @param questId the Id of the quest to display the message
*/ */
private static void showQuestWindow(PlayerInstance player, Npc npc, String questId) private void showQuestWindow(PlayerInstance player, Npc npc, String questId)
{ {
String content = null; String content = null;
@@ -296,7 +296,7 @@ public class QuestLink implements IBypassHandler
* @param player the PlayerInstance that talk with the {@code npc}. * @param player the PlayerInstance that talk with the {@code npc}.
* @param npc the NpcInstance that chats with the {@code player}. * @param npc the NpcInstance that chats with the {@code player}.
*/ */
private static void showQuestWindow(PlayerInstance player, Npc npc) private void showQuestWindow(PlayerInstance player, Npc npc)
{ {
//@formatter:off //@formatter:off
final Set<Quest> quests = npc.getListeners(EventType.ON_NPC_TALK).stream() final Set<Quest> quests = npc.getListeners(EventType.ON_NPC_TALK).stream()

View File

@@ -68,7 +68,7 @@ public class Wear implements IBypassHandler
return false; return false;
} }
private static void showWearWindow(PlayerInstance player, int val) private void showWearWindow(PlayerInstance player, int val)
{ {
final ProductList buyList = BuyListData.getInstance().getBuyList(val); final ProductList buyList = BuyListData.getInstance().getBuyList(val);
if (buyList == null) if (buyList == null)

View File

@@ -89,7 +89,7 @@ public class BanHandler implements IPunishmentHandler
* Applies all punishment effects from the player. * Applies all punishment effects from the player.
* @param player * @param player
*/ */
private static void applyToPlayer(PlayerInstance player) private void applyToPlayer(PlayerInstance player)
{ {
Disconnection.of(player).defaultSequence(false); Disconnection.of(player).defaultSequence(false);
} }

View File

@@ -124,7 +124,7 @@ public class ChatBanHandler implements IPunishmentHandler
* @param task * @param task
* @param player * @param player
*/ */
private static void applyToPlayer(PunishmentTask task, PlayerInstance player) private void applyToPlayer(PunishmentTask task, PlayerInstance player)
{ {
final long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000); final long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000);
if (delay > 0) if (delay > 0)
@@ -142,7 +142,7 @@ public class ChatBanHandler implements IPunishmentHandler
* Removes any punishment effects from the player. * Removes any punishment effects from the player.
* @param player * @param player
*/ */
private static void removeFromPlayer(PlayerInstance player) private void removeFromPlayer(PlayerInstance player)
{ {
player.sendMessage("Your Chat ban has been lifted"); player.sendMessage("Your Chat ban has been lifted");
player.sendPacket(new EtcStatusUpdate(player)); player.sendPacket(new EtcStatusUpdate(player));

View File

@@ -153,7 +153,7 @@ public class JailHandler implements IPunishmentHandler
* @param task * @param task
* @param player * @param player
*/ */
private static void applyToPlayer(PunishmentTask task, PlayerInstance player) private void applyToPlayer(PunishmentTask task, PlayerInstance player)
{ {
player.setInstance(null); player.setInstance(null);
@@ -196,7 +196,7 @@ public class JailHandler implements IPunishmentHandler
* Removes any punishment effects from the player. * Removes any punishment effects from the player.
* @param player * @param player
*/ */
private static void removeFromPlayer(PlayerInstance player) private void removeFromPlayer(PlayerInstance player)
{ {
ThreadPool.schedule(new TeleportTask(player, JailZone.getLocationOut()), 2000); ThreadPool.schedule(new TeleportTask(player, JailZone.getLocationOut()), 2000);

View File

@@ -487,7 +487,7 @@ public class Kamaloka extends AbstractInstance
* Removing all buffs from player and pet except BUFFS_WHITELIST * Removing all buffs from player and pet except BUFFS_WHITELIST
* @param ch player * @param ch player
*/ */
private static final void removeBuffs(Creature ch) private void removeBuffs(Creature ch)
{ {
// Stop all buffs. // Stop all buffs.
ch.getEffectList().stopEffects(info -> (info != null) && !info.getSkill().isStayAfterDeath() && (Arrays.binarySearch(BUFFS_WHITELIST, info.getSkill().getId()) < 0), true, true); ch.getEffectList().stopEffects(info -> (info != null) && !info.getSkill().isStayAfterDeath() && (Arrays.binarySearch(BUFFS_WHITELIST, info.getSkill().getId()) < 0), true, true);

View File

@@ -444,7 +444,7 @@ public class Q00270_TheOneWhoEndsSilence extends Quest
* @param chance the reward chance * @param chance the reward chance
* @param atLeastOne if {@code true} it will reward two items if the chance is meet and one if the chance is not meet, if {@code false} if the chance is not meet doesn't reward, otherwise reward one item * @param atLeastOne if {@code true} it will reward two items if the chance is meet and one if the chance is not meet, if {@code false} if the chance is not meet doesn't reward, otherwise reward one item
*/ */
private static void giveItem(PlayerInstance player, Npc npc, int chance, boolean atLeastOne) private void giveItem(PlayerInstance player, Npc npc, int chance, boolean atLeastOne)
{ {
if ((player != null) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false)) if ((player != null) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false))
{ {

View File

@@ -504,7 +504,7 @@ public class Q00350_EnhanceYourWeapon extends Quest
/** /**
* TODO: Implement using DocumentParser. * TODO: Implement using DocumentParser.
*/ */
private static void load() private void load()
{ {
try try
{ {

View File

@@ -843,7 +843,7 @@ public class Q00420_LittleWing extends Quest
* Gives the reward to the player. * Gives the reward to the player.
* @param player the player * @param player the player
*/ */
private static void giveReward(PlayerInstance player) private void giveReward(PlayerInstance player)
{ {
final int random = getRandom(100); final int random = getRandom(100);
for (int i : EGGS) for (int i : EGGS)

View File

@@ -363,7 +363,7 @@ public class Q00453_NotStrongEnoughAlone extends Quest
return htmltext; return htmltext;
} }
private static void checkProgress(QuestState qs, int count, int... mobs) private void checkProgress(QuestState qs, int count, int... mobs)
{ {
for (int mob : mobs) for (int mob : mobs)
{ {

View File

@@ -782,7 +782,7 @@ public class Q00454_CompletelyLost extends Quest
* @param player the player * @param player the player
* @param stringId the NPC String * @param stringId the NPC String
*/ */
private static void whisper(Npc npc, PlayerInstance player, NpcStringId stringId) private void whisper(Npc npc, PlayerInstance player, NpcStringId stringId)
{ {
player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), stringId)); player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), stringId));
} }

View File

@@ -193,7 +193,7 @@ public class Q00455_WingsOfSand extends Quest
* Reward the player. * Reward the player.
* @param qs the quest state of the player to reward * @param qs the quest state of the player to reward
*/ */
private static void giveItems(QuestState qs) private void giveItems(QuestState qs)
{ {
final PlayerInstance player = qs.getPlayer(); final PlayerInstance player = qs.getPlayer();
int chance; int chance;

View File

@@ -319,7 +319,7 @@ public class Q00456_DontKnowDontCare extends Quest
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
} }
private static void rewardPlayer(PlayerInstance player, Npc npc) private void rewardPlayer(PlayerInstance player, Npc npc)
{ {
final int chance = getRandom(10000); final int chance = getRandom(10000);
final int reward; final int reward;

View File

@@ -201,7 +201,7 @@ public class Q00901_HowLavasaurusesAreMade extends Quest
return htmltext; return htmltext;
} }
private static void giveQuestItems(QuestState qs, int itemId) private void giveQuestItems(QuestState qs, int itemId)
{ {
final PlayerInstance player = qs.getPlayer(); final PlayerInstance player = qs.getPlayer();
if (getQuestItemsCount(player, itemId) < 10) if (getQuestItemsCount(player, itemId) < 10)

View File

@@ -324,7 +324,7 @@ public class Q10289_FadeToBlack extends Quest
return htmltext; return htmltext;
} }
private static void rewardPlayer(QuestState qs, boolean isLucky) private void rewardPlayer(QuestState qs, boolean isLucky)
{ {
if ((qs != null) && qs.isCond(1)) if ((qs != null) && qs.isCond(1))
{ {

View File

@@ -489,7 +489,7 @@ public class GameServer
INSTANCE = new GameServer(); INSTANCE = new GameServer();
} }
private static void printSection(String s) private void printSection(String s)
{ {
s = "=[ " + s + " ]"; s = "=[ " + s + " ]";
while (s.length() < 61) while (s.length() < 61)

View File

@@ -395,7 +395,7 @@ public class ClanEntryManager
return _clanLocked.get(playerId) == null ? 0 : _clanLocked.get(playerId).getDelay(TimeUnit.MINUTES); return _clanLocked.get(playerId) == null ? 0 : _clanLocked.get(playerId).getDelay(TimeUnit.MINUTES);
} }
private static void lockPlayer(int playerId) private void lockPlayer(int playerId)
{ {
_playerLocked.put(playerId, ThreadPool.schedule(() -> _playerLocked.put(playerId, ThreadPool.schedule(() ->
{ {
@@ -403,7 +403,7 @@ public class ClanEntryManager
}, LOCK_TIME)); }, LOCK_TIME));
} }
private static void lockClan(int clanId) private void lockClan(int clanId)
{ {
_clanLocked.put(clanId, ThreadPool.schedule(() -> _clanLocked.put(clanId, ThreadPool.schedule(() ->
{ {

View File

@@ -296,7 +296,7 @@ public class VillageMasterInstance extends NpcInstance
} }
} }
private static void dissolveClan(PlayerInstance player, int clanId) private void dissolveClan(PlayerInstance player, int clanId)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@@ -357,7 +357,7 @@ public class VillageMasterInstance extends NpcInstance
ClanTable.getInstance().scheduleRemoveClan(clan.getId()); ClanTable.getInstance().scheduleRemoveClan(clan.getId());
} }
private static void recoverClan(PlayerInstance player, int clanId) private void recoverClan(PlayerInstance player, int clanId)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@@ -370,7 +370,7 @@ public class VillageMasterInstance extends NpcInstance
clan.updateClanInDB(); clan.updateClanInDB();
} }
private static void createSubPledge(PlayerInstance player, String clanName, String leaderName, int pledgeType, int minClanLvl) private void createSubPledge(PlayerInstance player, String clanName, String leaderName, int pledgeType, int minClanLvl)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@@ -480,7 +480,7 @@ public class VillageMasterInstance extends NpcInstance
} }
} }
private static void renameSubPledge(PlayerInstance player, int pledgeType, String pledgeName) private void renameSubPledge(PlayerInstance player, int pledgeType, String pledgeName)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@@ -513,7 +513,7 @@ public class VillageMasterInstance extends NpcInstance
player.sendMessage("Pledge name changed."); player.sendMessage("Pledge name changed.");
} }
private static void assignSubPledgeLeader(PlayerInstance player, String clanName, String leaderName) private void assignSubPledgeLeader(PlayerInstance player, String clanName, String leaderName)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {

View File

@@ -2628,7 +2628,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
* @param player * @param player
* @param holder * @param holder
*/ */
protected static void giveItems(PlayerInstance player, ItemHolder holder) protected void giveItems(PlayerInstance player, ItemHolder holder)
{ {
giveItems(player, holder.getId(), holder.getCount()); giveItems(player, holder.getId(), holder.getCount());
} }

View File

@@ -192,7 +192,7 @@ public abstract class AbstractOlympiadGame
return true; return true;
} }
protected static void removals(PlayerInstance player, boolean removeParty) protected void removals(PlayerInstance player, boolean removeParty)
{ {
try try
{ {
@@ -291,7 +291,7 @@ public abstract class AbstractOlympiadGame
} }
} }
protected static void cleanEffects(PlayerInstance player) protected void cleanEffects(PlayerInstance player)
{ {
try try
{ {
@@ -344,7 +344,7 @@ public abstract class AbstractOlympiadGame
} }
} }
protected static void playerStatusBack(PlayerInstance player) protected void playerStatusBack(PlayerInstance player)
{ {
try try
{ {
@@ -391,7 +391,7 @@ public abstract class AbstractOlympiadGame
} }
} }
protected static void portPlayerBack(PlayerInstance player) protected void portPlayerBack(PlayerInstance player)
{ {
if (player == null) if (player == null)
{ {

View File

@@ -741,7 +741,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
_damageP2 = 0; _damageP2 = 0;
} }
protected static void saveResults(Participant one, Participant two, int winner, long startTime, long fightTime, CompetitionType type) protected void saveResults(Participant one, Participant two, int winner, long startTime, long fightTime, CompetitionType type)
{ {
try (Connection con = DatabaseFactory.getConnection(); try (Connection con = DatabaseFactory.getConnection();
PreparedStatement statement = con.prepareStatement("INSERT INTO olympiad_fights (charOneId, charTwoId, charOneClass, charTwoClass, winner, start, time, classed) values(?,?,?,?,?,?,?,?)")) PreparedStatement statement = con.prepareStatement("INSERT INTO olympiad_fights (charOneId, charTwoId, charOneClass, charTwoClass, winner, start, time, classed) values(?,?,?,?,?,?,?,?)"))

View File

@@ -182,7 +182,7 @@ public abstract class VoteSystem implements Runnable
} }
} }
private static void announce(String msg) private void announce(String msg)
{ {
CreatureSay cs = new CreatureSay(0, ChatType.CRITICAL_ANNOUNCE, "", msg); CreatureSay cs = new CreatureSay(0, ChatType.CRITICAL_ANNOUNCE, "", msg);
Broadcast.toAllOnlinePlayers(cs); Broadcast.toAllOnlinePlayers(cs);

View File

@@ -316,7 +316,7 @@ public class RequestBypassToServer implements IClientIncomingPacket
/** /**
* @param player * @param player
*/ */
private static void comeHere(PlayerInstance player) private void comeHere(PlayerInstance player)
{ {
final WorldObject obj = player.getTarget(); final WorldObject obj = player.getTarget();
if (obj == null) if (obj == null)

View File

@@ -273,7 +273,7 @@ public class Alarm extends AbstractNpcAI
* @param questId the quest ID * @param questId the quest ID
* @param memoState the memo state * @param memoState the memo state
*/ */
private static void setMemoState(PlayerInstance player, int questId, int memoState) private void setMemoState(PlayerInstance player, int questId, int memoState)
{ {
QuestState qs = null; QuestState qs = null;
switch (questId) switch (questId)
@@ -328,7 +328,7 @@ public class Alarm extends AbstractNpcAI
* @param slot the slot * @param slot the slot
* @param memoStateEx the memo state ex * @param memoStateEx the memo state ex
*/ */
private static void setMemoStateEx(PlayerInstance player, int questId, int slot, int memoStateEx) private void setMemoStateEx(PlayerInstance player, int questId, int slot, int memoStateEx)
{ {
QuestState qs = null; QuestState qs = null;
switch (questId) switch (questId)

View File

@@ -139,7 +139,7 @@ public class QuarryRebel extends AbstractNpcAI
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
} }
private static void spawnNextMob(int npcId, Creature killer, Location loc) private void spawnNextMob(int npcId, Creature killer, Location loc)
{ {
final Npc npc = addSpawn(npcId, loc.getX(), loc.getY(), loc.getZ(), killer.getHeading() + 32500, false, 300000); final Npc npc = addSpawn(npcId, loc.getX(), loc.getY(), loc.getZ(), killer.getHeading() + 32500, false, 300000);
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, 1000); npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, 1000);

View File

@@ -246,7 +246,7 @@ public class StakatoNest extends AbstractNpcAI
return null; return null;
} }
private static void giveCocoon(PlayerInstance player, Npc npc) private void giveCocoon(PlayerInstance player, Npc npc)
{ {
player.addItem("StakatoCocoon", ((getRandom(100) > 80) ? LARGE_COCOON : SMALL_COCOON), 1, npc, true); player.addItem("StakatoCocoon", ((getRandom(100) > 80) ? LARGE_COCOON : SMALL_COCOON), 1, npc, true);
} }

View File

@@ -223,7 +223,7 @@ public class Elpies extends Event
} }
} }
private static void dropItem(Npc mob, PlayerInstance player, int[][] droplist) private void dropItem(Npc mob, PlayerInstance player, int[][] droplist)
{ {
final int chance = getRandom(100); final int chance = getRandom(100);

View File

@@ -240,7 +240,7 @@ public class Rabbits extends Event
return super.onAttack(npc, attacker, damage, isSummon); return super.onAttack(npc, attacker, damage, isSummon);
} }
private static void dropItem(Npc npc, PlayerInstance player, int[][] droplist) private void dropItem(Npc npc, PlayerInstance player, int[][] droplist)
{ {
final int chance = getRandom(100); final int chance = getRandom(100);
for (int[] drop : droplist) for (int[] drop : droplist)
@@ -253,7 +253,7 @@ public class Rabbits extends Event
} }
} }
private static void recordSpawn(List<Npc> npcs, int npcId, int x, int y, int z, int heading, boolean randomOffSet, long despawnDelay) private void recordSpawn(List<Npc> npcs, int npcId, int x, int y, int z, int heading, boolean randomOffSet, long despawnDelay)
{ {
final Npc npc = addSpawn(npcId, x, y, z, heading, randomOffSet, despawnDelay); final Npc npc = addSpawn(npcId, x, y, z, heading, randomOffSet, despawnDelay);
if (npc.getId() == CHEST) if (npc.getId() == CHEST)

View File

@@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler
* @param gmchar the player to switch the Game Master skills. * @param gmchar the player to switch the Game Master skills.
* @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}.
*/ */
private static void switchSkills(PlayerInstance gmchar, boolean toAuraSkills) private void switchSkills(PlayerInstance gmchar, boolean toAuraSkills)
{ {
final Collection<Skill> skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); final Collection<Skill> skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree();
for (Skill skill : skills) for (Skill skill : skills)
@@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler
return ADMIN_COMMANDS; return ADMIN_COMMANDS;
} }
private static void showBuffs(PlayerInstance activeChar, Creature target, int page, boolean passive) private void showBuffs(PlayerInstance activeChar, Creature target, int page, boolean passive)
{ {
final List<BuffInfo> effects = new ArrayList<>(); final List<BuffInfo> effects = new ArrayList<>();
if (!passive) if (!passive)
@@ -353,7 +353,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void removeBuff(PlayerInstance activeChar, int objId, int skillId) private void removeBuff(PlayerInstance activeChar, int objId, int skillId)
{ {
Creature target = null; Creature target = null;
try try
@@ -380,7 +380,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void removeAllBuffs(PlayerInstance activeChar, int objId) private void removeAllBuffs(PlayerInstance activeChar, int objId)
{ {
Creature target = null; Creature target = null;
try try
@@ -403,7 +403,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void viewBlockedEffects(PlayerInstance activeChar, int objId) private void viewBlockedEffects(PlayerInstance activeChar, int objId)
{ {
Creature target = null; Creature target = null;
try try

View File

@@ -113,7 +113,7 @@ public class AdminChangeAccessLevel implements IAdminCommandHandler
* @param player the online target * @param player the online target
* @param lvl the access level * @param lvl the access level
*/ */
private static void onlineChange(PlayerInstance activeChar, PlayerInstance player, int lvl) private void onlineChange(PlayerInstance activeChar, PlayerInstance player, int lvl)
{ {
if (lvl >= 0) if (lvl >= 0)
{ {

View File

@@ -174,7 +174,7 @@ public class AdminFence implements IAdminCommandHandler
return ADMIN_COMMANDS; return ADMIN_COMMANDS;
} }
private static void sendHtml(PlayerInstance activeChar, int page) private void sendHtml(PlayerInstance activeChar, int page)
{ {
final PageResult result = PageBuilder.newBuilder(FenceData.getInstance().getFences().values(), 10, "bypass -h admin_listfence").currentPage(page).style(ButtonsStyle.INSTANCE).bodyHandler((pages, fence, sb) -> final PageResult result = PageBuilder.newBuilder(FenceData.getInstance().getFences().values(), 10, "bypass -h admin_listfence").currentPage(page).style(ButtonsStyle.INSTANCE).bodyHandler((pages, fence, sb) ->
{ {

View File

@@ -153,7 +153,7 @@ public class AdminShowQuests implements IAdminCommandHandler
return true; return true;
} }
private static void showFirstQuestMenu(PlayerInstance target, PlayerInstance actor) private void showFirstQuestMenu(PlayerInstance target, PlayerInstance actor)
{ {
final StringBuilder replyMSG = new StringBuilder("<html><body><table width=270><tr><td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center>Player: " + target.getName() + "</center></td><td width=45><button value=\"Back\" action=\"bypass -h admin_admin6\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>"); final StringBuilder replyMSG = new StringBuilder("<html><body><table width=270><tr><td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center>Player: " + target.getName() + "</center></td><td width=45><button value=\"Back\" action=\"bypass -h admin_admin6\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>");
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
@@ -171,7 +171,7 @@ public class AdminShowQuests implements IAdminCommandHandler
actor.sendPacket(adminReply); actor.sendPacket(adminReply);
} }
private static void showQuestMenu(PlayerInstance target, PlayerInstance actor, String[] val) private void showQuestMenu(PlayerInstance target, PlayerInstance actor, String[] val)
{ {
try (Connection con = DatabaseFactory.getConnection()) try (Connection con = DatabaseFactory.getConnection())
{ {
@@ -317,7 +317,7 @@ public class AdminShowQuests implements IAdminCommandHandler
} }
} }
private static void setQuestVar(PlayerInstance target, PlayerInstance actor, String[] val) private void setQuestVar(PlayerInstance target, PlayerInstance actor, String[] val)
{ {
QuestState qs = target.getQuestState(val[0]); QuestState qs = target.getQuestState(val[0]);
final String[] outval = new String[3]; final String[] outval = new String[3];

View File

@@ -111,7 +111,7 @@ public class AdminZone implements IAdminCommandHandler
return true; return true;
} }
private static void showHtml(PlayerInstance activeChar) private void showHtml(PlayerInstance activeChar)
{ {
final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/zone.htm"); final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/zone.htm");
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
@@ -163,7 +163,7 @@ public class AdminZone implements IAdminCommandHandler
activeChar.sendPacket(adminReply); activeChar.sendPacket(adminReply);
} }
private static void getGeoRegionXY(PlayerInstance activeChar) private void getGeoRegionXY(PlayerInstance activeChar)
{ {
final int worldX = activeChar.getX(); final int worldX = activeChar.getX();
final int worldY = activeChar.getY(); final int worldY = activeChar.getY();

View File

@@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler
player.sendPacket(html); player.sendPacket(html);
} }
private static void sendNpcSkillView(PlayerInstance player, Npc npc) private void sendNpcSkillView(PlayerInstance player, Npc npc)
{ {
final NpcHtmlMessage html = new NpcHtmlMessage(); final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(player, "data/html/mods/NpcView/Skills.htm"); html.setFile(player, "data/html/mods/NpcView/Skills.htm");
@@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler
player.sendPacket(html); player.sendPacket(html);
} }
private static void sendAggroListView(PlayerInstance player, Npc npc) private void sendAggroListView(PlayerInstance player, Npc npc)
{ {
final NpcHtmlMessage html = new NpcHtmlMessage(); final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(player, "data/html/mods/NpcView/AggroList.htm"); html.setFile(player, "data/html/mods/NpcView/AggroList.htm");
@@ -358,7 +358,7 @@ public class NpcViewMod implements IBypassHandler
return sb.toString(); return sb.toString();
} }
private static void sendNpcDropList(PlayerInstance player, Npc npc, DropType dropType, int page) private void sendNpcDropList(PlayerInstance player, Npc npc, DropType dropType, int page)
{ {
final List<DropHolder> dropList = npc.getTemplate().getDropList(dropType); final List<DropHolder> dropList = npc.getTemplate().getDropList(dropType);
if (dropList == null) if (dropList == null)

View File

@@ -154,7 +154,7 @@ public class Observation implements IBypassHandler
return false; return false;
} }
private static void doObserve(PlayerInstance player, Npc npc, Location pos, long cost) private void doObserve(PlayerInstance player, Npc npc, Location pos, long cost)
{ {
if (player.reduceAdena("Broadcast", cost, npc, true)) if (player.reduceAdena("Broadcast", cost, npc, true))
{ {

View File

@@ -78,7 +78,7 @@ public class PrivateWarehouse implements IBypassHandler
return false; return false;
} }
private static void showWithdrawWindow(PlayerInstance player) private void showWithdrawWindow(PlayerInstance player)
{ {
player.sendPacket(ActionFailed.STATIC_PACKET); player.sendPacket(ActionFailed.STATIC_PACKET);
player.setActiveWarehouse(player.getWarehouse()); player.setActiveWarehouse(player.getWarehouse());

View File

@@ -84,7 +84,7 @@ public class QuestLink implements IBypassHandler
* @param npc The table containing quests of the NpcInstance * @param npc The table containing quests of the NpcInstance
* @param quests * @param quests
*/ */
private static void showQuestChooseWindow(PlayerInstance player, Npc npc, Collection<Quest> quests) private void showQuestChooseWindow(PlayerInstance player, Npc npc, Collection<Quest> quests)
{ {
final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbStarted = new StringBuilder(128);
final StringBuilder sbCanStart = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128);
@@ -241,7 +241,7 @@ public class QuestLink implements IBypassHandler
* @param npc the NpcInstance that chats with the {@code player} * @param npc the NpcInstance that chats with the {@code player}
* @param questId the Id of the quest to display the message * @param questId the Id of the quest to display the message
*/ */
private static void showQuestWindow(PlayerInstance player, Npc npc, String questId) private void showQuestWindow(PlayerInstance player, Npc npc, String questId)
{ {
String content = null; String content = null;
@@ -296,7 +296,7 @@ public class QuestLink implements IBypassHandler
* @param player the PlayerInstance that talk with the {@code npc}. * @param player the PlayerInstance that talk with the {@code npc}.
* @param npc the NpcInstance that chats with the {@code player}. * @param npc the NpcInstance that chats with the {@code player}.
*/ */
private static void showQuestWindow(PlayerInstance player, Npc npc) private void showQuestWindow(PlayerInstance player, Npc npc)
{ {
//@formatter:off //@formatter:off
final Set<Quest> quests = npc.getListeners(EventType.ON_NPC_TALK).stream() final Set<Quest> quests = npc.getListeners(EventType.ON_NPC_TALK).stream()

View File

@@ -68,7 +68,7 @@ public class Wear implements IBypassHandler
return false; return false;
} }
private static void showWearWindow(PlayerInstance player, int val) private void showWearWindow(PlayerInstance player, int val)
{ {
final ProductList buyList = BuyListData.getInstance().getBuyList(val); final ProductList buyList = BuyListData.getInstance().getBuyList(val);
if (buyList == null) if (buyList == null)

View File

@@ -89,7 +89,7 @@ public class BanHandler implements IPunishmentHandler
* Applies all punishment effects from the player. * Applies all punishment effects from the player.
* @param player * @param player
*/ */
private static void applyToPlayer(PlayerInstance player) private void applyToPlayer(PlayerInstance player)
{ {
Disconnection.of(player).defaultSequence(false); Disconnection.of(player).defaultSequence(false);
} }

View File

@@ -124,7 +124,7 @@ public class ChatBanHandler implements IPunishmentHandler
* @param task * @param task
* @param player * @param player
*/ */
private static void applyToPlayer(PunishmentTask task, PlayerInstance player) private void applyToPlayer(PunishmentTask task, PlayerInstance player)
{ {
final long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000); final long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000);
if (delay > 0) if (delay > 0)
@@ -142,7 +142,7 @@ public class ChatBanHandler implements IPunishmentHandler
* Removes any punishment effects from the player. * Removes any punishment effects from the player.
* @param player * @param player
*/ */
private static void removeFromPlayer(PlayerInstance player) private void removeFromPlayer(PlayerInstance player)
{ {
player.sendMessage("Your Chat ban has been lifted"); player.sendMessage("Your Chat ban has been lifted");
player.sendPacket(new EtcStatusUpdate(player)); player.sendPacket(new EtcStatusUpdate(player));

View File

@@ -153,7 +153,7 @@ public class JailHandler implements IPunishmentHandler
* @param task * @param task
* @param player * @param player
*/ */
private static void applyToPlayer(PunishmentTask task, PlayerInstance player) private void applyToPlayer(PunishmentTask task, PlayerInstance player)
{ {
player.setInstance(null); player.setInstance(null);
@@ -196,7 +196,7 @@ public class JailHandler implements IPunishmentHandler
* Removes any punishment effects from the player. * Removes any punishment effects from the player.
* @param player * @param player
*/ */
private static void removeFromPlayer(PlayerInstance player) private void removeFromPlayer(PlayerInstance player)
{ {
ThreadPool.schedule(new TeleportTask(player, JailZone.getLocationOut()), 2000); ThreadPool.schedule(new TeleportTask(player, JailZone.getLocationOut()), 2000);

View File

@@ -487,7 +487,7 @@ public class Kamaloka extends AbstractInstance
* Removing all buffs from player and pet except BUFFS_WHITELIST * Removing all buffs from player and pet except BUFFS_WHITELIST
* @param ch player * @param ch player
*/ */
private static final void removeBuffs(Creature ch) private void removeBuffs(Creature ch)
{ {
// Stop all buffs. // Stop all buffs.
ch.getEffectList().stopEffects(info -> (info != null) && !info.getSkill().isStayAfterDeath() && (Arrays.binarySearch(BUFFS_WHITELIST, info.getSkill().getId()) < 0), true, true); ch.getEffectList().stopEffects(info -> (info != null) && !info.getSkill().isStayAfterDeath() && (Arrays.binarySearch(BUFFS_WHITELIST, info.getSkill().getId()) < 0), true, true);

View File

@@ -444,7 +444,7 @@ public class Q00270_TheOneWhoEndsSilence extends Quest
* @param chance the reward chance * @param chance the reward chance
* @param atLeastOne if {@code true} it will reward two items if the chance is meet and one if the chance is not meet, if {@code false} if the chance is not meet doesn't reward, otherwise reward one item * @param atLeastOne if {@code true} it will reward two items if the chance is meet and one if the chance is not meet, if {@code false} if the chance is not meet doesn't reward, otherwise reward one item
*/ */
private static void giveItem(PlayerInstance player, Npc npc, int chance, boolean atLeastOne) private void giveItem(PlayerInstance player, Npc npc, int chance, boolean atLeastOne)
{ {
if ((player != null) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false)) if ((player != null) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false))
{ {

View File

@@ -840,7 +840,7 @@ public class Q00420_LittleWing extends Quest
* Gives the reward to the player. * Gives the reward to the player.
* @param player the player * @param player the player
*/ */
private static void giveReward(PlayerInstance player) private void giveReward(PlayerInstance player)
{ {
final int random = getRandom(100); final int random = getRandom(100);
for (int i : EGGS) for (int i : EGGS)

View File

@@ -363,7 +363,7 @@ public class Q00453_NotStrongEnoughAlone extends Quest
return htmltext; return htmltext;
} }
private static void checkProgress(QuestState qs, int count, int... mobs) private void checkProgress(QuestState qs, int count, int... mobs)
{ {
for (int mob : mobs) for (int mob : mobs)
{ {

View File

@@ -782,7 +782,7 @@ public class Q00454_CompletelyLost extends Quest
* @param player the player * @param player the player
* @param stringId the NPC String * @param stringId the NPC String
*/ */
private static void whisper(Npc npc, PlayerInstance player, NpcStringId stringId) private void whisper(Npc npc, PlayerInstance player, NpcStringId stringId)
{ {
player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), stringId)); player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), stringId));
} }

View File

@@ -193,7 +193,7 @@ public class Q00455_WingsOfSand extends Quest
* Reward the player. * Reward the player.
* @param qs the quest state of the player to reward * @param qs the quest state of the player to reward
*/ */
private static void giveItems(QuestState qs) private void giveItems(QuestState qs)
{ {
final PlayerInstance player = qs.getPlayer(); final PlayerInstance player = qs.getPlayer();
int chance; int chance;

View File

@@ -319,7 +319,7 @@ public class Q00456_DontKnowDontCare extends Quest
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
} }
private static void rewardPlayer(PlayerInstance player, Npc npc) private void rewardPlayer(PlayerInstance player, Npc npc)
{ {
final int chance = getRandom(10000); final int chance = getRandom(10000);
final int reward; final int reward;

View File

@@ -201,7 +201,7 @@ public class Q00901_HowLavasaurusesAreMade extends Quest
return htmltext; return htmltext;
} }
private static void giveQuestItems(QuestState qs, int itemId) private void giveQuestItems(QuestState qs, int itemId)
{ {
final PlayerInstance player = qs.getPlayer(); final PlayerInstance player = qs.getPlayer();
if (getQuestItemsCount(player, itemId) < 10) if (getQuestItemsCount(player, itemId) < 10)

View File

@@ -324,7 +324,7 @@ public class Q10289_FadeToBlack extends Quest
return htmltext; return htmltext;
} }
private static void rewardPlayer(QuestState qs, boolean isLucky) private void rewardPlayer(QuestState qs, boolean isLucky)
{ {
if ((qs != null) && qs.isCond(1)) if ((qs != null) && qs.isCond(1))
{ {

View File

@@ -497,7 +497,7 @@ public class GameServer
INSTANCE = new GameServer(); INSTANCE = new GameServer();
} }
private static void printSection(String s) private void printSection(String s)
{ {
s = "=[ " + s + " ]"; s = "=[ " + s + " ]";
while (s.length() < 61) while (s.length() < 61)

View File

@@ -395,7 +395,7 @@ public class ClanEntryManager
return _clanLocked.get(playerId) == null ? 0 : _clanLocked.get(playerId).getDelay(TimeUnit.MINUTES); return _clanLocked.get(playerId) == null ? 0 : _clanLocked.get(playerId).getDelay(TimeUnit.MINUTES);
} }
private static void lockPlayer(int playerId) private void lockPlayer(int playerId)
{ {
_playerLocked.put(playerId, ThreadPool.schedule(() -> _playerLocked.put(playerId, ThreadPool.schedule(() ->
{ {
@@ -403,7 +403,7 @@ public class ClanEntryManager
}, LOCK_TIME)); }, LOCK_TIME));
} }
private static void lockClan(int clanId) private void lockClan(int clanId)
{ {
_clanLocked.put(clanId, ThreadPool.schedule(() -> _clanLocked.put(clanId, ThreadPool.schedule(() ->
{ {

View File

@@ -296,7 +296,7 @@ public class VillageMasterInstance extends NpcInstance
} }
} }
private static void dissolveClan(PlayerInstance player, int clanId) private void dissolveClan(PlayerInstance player, int clanId)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@@ -357,7 +357,7 @@ public class VillageMasterInstance extends NpcInstance
ClanTable.getInstance().scheduleRemoveClan(clan.getId()); ClanTable.getInstance().scheduleRemoveClan(clan.getId());
} }
private static void recoverClan(PlayerInstance player, int clanId) private void recoverClan(PlayerInstance player, int clanId)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@@ -370,7 +370,7 @@ public class VillageMasterInstance extends NpcInstance
clan.updateClanInDB(); clan.updateClanInDB();
} }
private static void createSubPledge(PlayerInstance player, String clanName, String leaderName, int pledgeType, int minClanLvl) private void createSubPledge(PlayerInstance player, String clanName, String leaderName, int pledgeType, int minClanLvl)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@@ -480,7 +480,7 @@ public class VillageMasterInstance extends NpcInstance
} }
} }
private static void renameSubPledge(PlayerInstance player, int pledgeType, String pledgeName) private void renameSubPledge(PlayerInstance player, int pledgeType, String pledgeName)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {
@@ -513,7 +513,7 @@ public class VillageMasterInstance extends NpcInstance
player.sendMessage("Pledge name changed."); player.sendMessage("Pledge name changed.");
} }
private static void assignSubPledgeLeader(PlayerInstance player, String clanName, String leaderName) private void assignSubPledgeLeader(PlayerInstance player, String clanName, String leaderName)
{ {
if (!player.isClanLeader()) if (!player.isClanLeader())
{ {

View File

@@ -2628,7 +2628,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
* @param player * @param player
* @param holder * @param holder
*/ */
protected static void giveItems(PlayerInstance player, ItemHolder holder) protected void giveItems(PlayerInstance player, ItemHolder holder)
{ {
giveItems(player, holder.getId(), holder.getCount()); giveItems(player, holder.getId(), holder.getCount());
} }

View File

@@ -192,7 +192,7 @@ public abstract class AbstractOlympiadGame
return true; return true;
} }
protected static void removals(PlayerInstance player, boolean removeParty) protected void removals(PlayerInstance player, boolean removeParty)
{ {
try try
{ {
@@ -291,7 +291,7 @@ public abstract class AbstractOlympiadGame
} }
} }
protected static void cleanEffects(PlayerInstance player) protected void cleanEffects(PlayerInstance player)
{ {
try try
{ {
@@ -344,7 +344,7 @@ public abstract class AbstractOlympiadGame
} }
} }
protected static void playerStatusBack(PlayerInstance player) protected void playerStatusBack(PlayerInstance player)
{ {
try try
{ {
@@ -391,7 +391,7 @@ public abstract class AbstractOlympiadGame
} }
} }
protected static void portPlayerBack(PlayerInstance player) protected void portPlayerBack(PlayerInstance player)
{ {
if (player == null) if (player == null)
{ {

View File

@@ -741,7 +741,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
_damageP2 = 0; _damageP2 = 0;
} }
protected static void saveResults(Participant one, Participant two, int winner, long startTime, long fightTime, CompetitionType type) protected void saveResults(Participant one, Participant two, int winner, long startTime, long fightTime, CompetitionType type)
{ {
try (Connection con = DatabaseFactory.getConnection(); try (Connection con = DatabaseFactory.getConnection();
PreparedStatement statement = con.prepareStatement("INSERT INTO olympiad_fights (charOneId, charTwoId, charOneClass, charTwoClass, winner, start, time, classed) values(?,?,?,?,?,?,?,?)")) PreparedStatement statement = con.prepareStatement("INSERT INTO olympiad_fights (charOneId, charTwoId, charOneClass, charTwoClass, winner, start, time, classed) values(?,?,?,?,?,?,?,?)"))

View File

@@ -182,7 +182,7 @@ public abstract class VoteSystem implements Runnable
} }
} }
private static void announce(String msg) private void announce(String msg)
{ {
CreatureSay cs = new CreatureSay(0, ChatType.CRITICAL_ANNOUNCE, "", msg); CreatureSay cs = new CreatureSay(0, ChatType.CRITICAL_ANNOUNCE, "", msg);
Broadcast.toAllOnlinePlayers(cs); Broadcast.toAllOnlinePlayers(cs);

View File

@@ -316,7 +316,7 @@ public class RequestBypassToServer implements IClientIncomingPacket
/** /**
* @param player * @param player
*/ */
private static void comeHere(PlayerInstance player) private void comeHere(PlayerInstance player)
{ {
final WorldObject obj = player.getTarget(); final WorldObject obj = player.getTarget();
if (obj == null) if (obj == null)

View File

@@ -273,7 +273,7 @@ public class Alarm extends AbstractNpcAI
* @param questId the quest ID * @param questId the quest ID
* @param memoState the memo state * @param memoState the memo state
*/ */
private static void setMemoState(PlayerInstance player, int questId, int memoState) private void setMemoState(PlayerInstance player, int questId, int memoState)
{ {
QuestState qs = null; QuestState qs = null;
switch (questId) switch (questId)
@@ -328,7 +328,7 @@ public class Alarm extends AbstractNpcAI
* @param slot the slot * @param slot the slot
* @param memoStateEx the memo state ex * @param memoStateEx the memo state ex
*/ */
private static void setMemoStateEx(PlayerInstance player, int questId, int slot, int memoStateEx) private void setMemoStateEx(PlayerInstance player, int questId, int slot, int memoStateEx)
{ {
QuestState qs = null; QuestState qs = null;
switch (questId) switch (questId)

View File

@@ -139,7 +139,7 @@ public class QuarryRebel extends AbstractNpcAI
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
} }
private static void spawnNextMob(int npcId, Creature killer, Location loc) private void spawnNextMob(int npcId, Creature killer, Location loc)
{ {
final Npc npc = addSpawn(npcId, loc.getX(), loc.getY(), loc.getZ(), killer.getHeading() + 32500, false, 300000); final Npc npc = addSpawn(npcId, loc.getX(), loc.getY(), loc.getZ(), killer.getHeading() + 32500, false, 300000);
npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, 1000); npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, 1000);

View File

@@ -246,7 +246,7 @@ public class StakatoNest extends AbstractNpcAI
return null; return null;
} }
private static void giveCocoon(PlayerInstance player, Npc npc) private void giveCocoon(PlayerInstance player, Npc npc)
{ {
player.addItem("StakatoCocoon", ((getRandom(100) > 80) ? LARGE_COCOON : SMALL_COCOON), 1, npc, true); player.addItem("StakatoCocoon", ((getRandom(100) > 80) ? LARGE_COCOON : SMALL_COCOON), 1, npc, true);
} }

View File

@@ -223,7 +223,7 @@ public class Elpies extends Event
} }
} }
private static void dropItem(Npc mob, PlayerInstance player, int[][] droplist) private void dropItem(Npc mob, PlayerInstance player, int[][] droplist)
{ {
final int chance = getRandom(100); final int chance = getRandom(100);

View File

@@ -240,7 +240,7 @@ public class Rabbits extends Event
return super.onAttack(npc, attacker, damage, isSummon); return super.onAttack(npc, attacker, damage, isSummon);
} }
private static void dropItem(Npc npc, PlayerInstance player, int[][] droplist) private void dropItem(Npc npc, PlayerInstance player, int[][] droplist)
{ {
final int chance = getRandom(100); final int chance = getRandom(100);
for (int[] drop : droplist) for (int[] drop : droplist)
@@ -253,7 +253,7 @@ public class Rabbits extends Event
} }
} }
private static void recordSpawn(List<Npc> npcs, int npcId, int x, int y, int z, int heading, boolean randomOffSet, long despawnDelay) private void recordSpawn(List<Npc> npcs, int npcId, int x, int y, int z, int heading, boolean randomOffSet, long despawnDelay)
{ {
final Npc npc = addSpawn(npcId, x, y, z, heading, randomOffSet, despawnDelay); final Npc npc = addSpawn(npcId, x, y, z, heading, randomOffSet, despawnDelay);
if (npc.getId() == CHEST) if (npc.getId() == CHEST)

View File

@@ -276,7 +276,7 @@ public class AdminBuffs implements IAdminCommandHandler
* @param gmchar the player to switch the Game Master skills. * @param gmchar the player to switch the Game Master skills.
* @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}. * @param toAuraSkills if {@code true} it will remove "GM Aura" skills and add "GM regular" skills, vice versa if {@code false}.
*/ */
private static void switchSkills(PlayerInstance gmchar, boolean toAuraSkills) private void switchSkills(PlayerInstance gmchar, boolean toAuraSkills)
{ {
final Collection<Skill> skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree(); final Collection<Skill> skills = toAuraSkills ? SkillTreesData.getInstance().getGMSkillTree() : SkillTreesData.getInstance().getGMAuraSkillTree();
for (Skill skill : skills) for (Skill skill : skills)
@@ -292,7 +292,7 @@ public class AdminBuffs implements IAdminCommandHandler
return ADMIN_COMMANDS; return ADMIN_COMMANDS;
} }
private static void showBuffs(PlayerInstance activeChar, Creature target, int page, boolean passive) private void showBuffs(PlayerInstance activeChar, Creature target, int page, boolean passive)
{ {
final List<BuffInfo> effects = new ArrayList<>(); final List<BuffInfo> effects = new ArrayList<>();
if (!passive) if (!passive)
@@ -353,7 +353,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void removeBuff(PlayerInstance activeChar, int objId, int skillId) private void removeBuff(PlayerInstance activeChar, int objId, int skillId)
{ {
Creature target = null; Creature target = null;
try try
@@ -380,7 +380,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void removeAllBuffs(PlayerInstance activeChar, int objId) private void removeAllBuffs(PlayerInstance activeChar, int objId)
{ {
Creature target = null; Creature target = null;
try try
@@ -403,7 +403,7 @@ public class AdminBuffs implements IAdminCommandHandler
} }
} }
private static void viewBlockedEffects(PlayerInstance activeChar, int objId) private void viewBlockedEffects(PlayerInstance activeChar, int objId)
{ {
Creature target = null; Creature target = null;
try try

View File

@@ -113,7 +113,7 @@ public class AdminChangeAccessLevel implements IAdminCommandHandler
* @param player the online target * @param player the online target
* @param lvl the access level * @param lvl the access level
*/ */
private static void onlineChange(PlayerInstance activeChar, PlayerInstance player, int lvl) private void onlineChange(PlayerInstance activeChar, PlayerInstance player, int lvl)
{ {
if (lvl >= 0) if (lvl >= 0)
{ {

View File

@@ -174,7 +174,7 @@ public class AdminFence implements IAdminCommandHandler
return ADMIN_COMMANDS; return ADMIN_COMMANDS;
} }
private static void sendHtml(PlayerInstance activeChar, int page) private void sendHtml(PlayerInstance activeChar, int page)
{ {
final PageResult result = PageBuilder.newBuilder(FenceData.getInstance().getFences().values(), 10, "bypass -h admin_listfence").currentPage(page).style(ButtonsStyle.INSTANCE).bodyHandler((pages, fence, sb) -> final PageResult result = PageBuilder.newBuilder(FenceData.getInstance().getFences().values(), 10, "bypass -h admin_listfence").currentPage(page).style(ButtonsStyle.INSTANCE).bodyHandler((pages, fence, sb) ->
{ {

View File

@@ -153,7 +153,7 @@ public class AdminShowQuests implements IAdminCommandHandler
return true; return true;
} }
private static void showFirstQuestMenu(PlayerInstance target, PlayerInstance actor) private void showFirstQuestMenu(PlayerInstance target, PlayerInstance actor)
{ {
final StringBuilder replyMSG = new StringBuilder("<html><body><table width=270><tr><td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center>Player: " + target.getName() + "</center></td><td width=45><button value=\"Back\" action=\"bypass -h admin_admin6\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>"); final StringBuilder replyMSG = new StringBuilder("<html><body><table width=270><tr><td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center>Player: " + target.getName() + "</center></td><td width=45><button value=\"Back\" action=\"bypass -h admin_admin6\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table>");
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
@@ -171,7 +171,7 @@ public class AdminShowQuests implements IAdminCommandHandler
actor.sendPacket(adminReply); actor.sendPacket(adminReply);
} }
private static void showQuestMenu(PlayerInstance target, PlayerInstance actor, String[] val) private void showQuestMenu(PlayerInstance target, PlayerInstance actor, String[] val)
{ {
try (Connection con = DatabaseFactory.getConnection()) try (Connection con = DatabaseFactory.getConnection())
{ {
@@ -317,7 +317,7 @@ public class AdminShowQuests implements IAdminCommandHandler
} }
} }
private static void setQuestVar(PlayerInstance target, PlayerInstance actor, String[] val) private void setQuestVar(PlayerInstance target, PlayerInstance actor, String[] val)
{ {
QuestState qs = target.getQuestState(val[0]); QuestState qs = target.getQuestState(val[0]);
final String[] outval = new String[3]; final String[] outval = new String[3];

View File

@@ -111,7 +111,7 @@ public class AdminZone implements IAdminCommandHandler
return true; return true;
} }
private static void showHtml(PlayerInstance activeChar) private void showHtml(PlayerInstance activeChar)
{ {
final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/zone.htm"); final String htmContent = HtmCache.getInstance().getHtm(activeChar, "data/html/admin/zone.htm");
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
@@ -163,7 +163,7 @@ public class AdminZone implements IAdminCommandHandler
activeChar.sendPacket(adminReply); activeChar.sendPacket(adminReply);
} }
private static void getGeoRegionXY(PlayerInstance activeChar) private void getGeoRegionXY(PlayerInstance activeChar)
{ {
final int worldX = activeChar.getX(); final int worldX = activeChar.getX();
final int worldY = activeChar.getY(); final int worldY = activeChar.getY();

View File

@@ -271,7 +271,7 @@ public class NpcViewMod implements IBypassHandler
player.sendPacket(html); player.sendPacket(html);
} }
private static void sendNpcSkillView(PlayerInstance player, Npc npc) private void sendNpcSkillView(PlayerInstance player, Npc npc)
{ {
final NpcHtmlMessage html = new NpcHtmlMessage(); final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(player, "data/html/mods/NpcView/Skills.htm"); html.setFile(player, "data/html/mods/NpcView/Skills.htm");
@@ -303,7 +303,7 @@ public class NpcViewMod implements IBypassHandler
player.sendPacket(html); player.sendPacket(html);
} }
private static void sendAggroListView(PlayerInstance player, Npc npc) private void sendAggroListView(PlayerInstance player, Npc npc)
{ {
final NpcHtmlMessage html = new NpcHtmlMessage(); final NpcHtmlMessage html = new NpcHtmlMessage();
html.setFile(player, "data/html/mods/NpcView/AggroList.htm"); html.setFile(player, "data/html/mods/NpcView/AggroList.htm");
@@ -358,7 +358,7 @@ public class NpcViewMod implements IBypassHandler
return sb.toString(); return sb.toString();
} }
private static void sendNpcDropList(PlayerInstance player, Npc npc, DropType dropType, int page) private void sendNpcDropList(PlayerInstance player, Npc npc, DropType dropType, int page)
{ {
final List<DropHolder> dropList = npc.getTemplate().getDropList(dropType); final List<DropHolder> dropList = npc.getTemplate().getDropList(dropType);
if (dropList == null) if (dropList == null)

View File

@@ -154,7 +154,7 @@ public class Observation implements IBypassHandler
return false; return false;
} }
private static void doObserve(PlayerInstance player, Npc npc, Location pos, long cost) private void doObserve(PlayerInstance player, Npc npc, Location pos, long cost)
{ {
if (player.reduceAdena("Broadcast", cost, npc, true)) if (player.reduceAdena("Broadcast", cost, npc, true))
{ {

View File

@@ -78,7 +78,7 @@ public class PrivateWarehouse implements IBypassHandler
return false; return false;
} }
private static void showWithdrawWindow(PlayerInstance player) private void showWithdrawWindow(PlayerInstance player)
{ {
player.sendPacket(ActionFailed.STATIC_PACKET); player.sendPacket(ActionFailed.STATIC_PACKET);
player.setActiveWarehouse(player.getWarehouse()); player.setActiveWarehouse(player.getWarehouse());

View File

@@ -84,7 +84,7 @@ public class QuestLink implements IBypassHandler
* @param npc The table containing quests of the NpcInstance * @param npc The table containing quests of the NpcInstance
* @param quests * @param quests
*/ */
private static void showQuestChooseWindow(PlayerInstance player, Npc npc, Collection<Quest> quests) private void showQuestChooseWindow(PlayerInstance player, Npc npc, Collection<Quest> quests)
{ {
final StringBuilder sbStarted = new StringBuilder(128); final StringBuilder sbStarted = new StringBuilder(128);
final StringBuilder sbCanStart = new StringBuilder(128); final StringBuilder sbCanStart = new StringBuilder(128);
@@ -241,7 +241,7 @@ public class QuestLink implements IBypassHandler
* @param npc the NpcInstance that chats with the {@code player} * @param npc the NpcInstance that chats with the {@code player}
* @param questId the Id of the quest to display the message * @param questId the Id of the quest to display the message
*/ */
private static void showQuestWindow(PlayerInstance player, Npc npc, String questId) private void showQuestWindow(PlayerInstance player, Npc npc, String questId)
{ {
String content = null; String content = null;
@@ -296,7 +296,7 @@ public class QuestLink implements IBypassHandler
* @param player the PlayerInstance that talk with the {@code npc}. * @param player the PlayerInstance that talk with the {@code npc}.
* @param npc the NpcInstance that chats with the {@code player}. * @param npc the NpcInstance that chats with the {@code player}.
*/ */
private static void showQuestWindow(PlayerInstance player, Npc npc) private void showQuestWindow(PlayerInstance player, Npc npc)
{ {
//@formatter:off //@formatter:off
final Set<Quest> quests = npc.getListeners(EventType.ON_NPC_TALK).stream() final Set<Quest> quests = npc.getListeners(EventType.ON_NPC_TALK).stream()

View File

@@ -68,7 +68,7 @@ public class Wear implements IBypassHandler
return false; return false;
} }
private static void showWearWindow(PlayerInstance player, int val) private void showWearWindow(PlayerInstance player, int val)
{ {
final ProductList buyList = BuyListData.getInstance().getBuyList(val); final ProductList buyList = BuyListData.getInstance().getBuyList(val);
if (buyList == null) if (buyList == null)

View File

@@ -89,7 +89,7 @@ public class BanHandler implements IPunishmentHandler
* Applies all punishment effects from the player. * Applies all punishment effects from the player.
* @param player * @param player
*/ */
private static void applyToPlayer(PlayerInstance player) private void applyToPlayer(PlayerInstance player)
{ {
Disconnection.of(player).defaultSequence(false); Disconnection.of(player).defaultSequence(false);
} }

View File

@@ -124,7 +124,7 @@ public class ChatBanHandler implements IPunishmentHandler
* @param task * @param task
* @param player * @param player
*/ */
private static void applyToPlayer(PunishmentTask task, PlayerInstance player) private void applyToPlayer(PunishmentTask task, PlayerInstance player)
{ {
final long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000); final long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000);
if (delay > 0) if (delay > 0)
@@ -142,7 +142,7 @@ public class ChatBanHandler implements IPunishmentHandler
* Removes any punishment effects from the player. * Removes any punishment effects from the player.
* @param player * @param player
*/ */
private static void removeFromPlayer(PlayerInstance player) private void removeFromPlayer(PlayerInstance player)
{ {
player.sendMessage("Your Chat ban has been lifted"); player.sendMessage("Your Chat ban has been lifted");
player.sendPacket(new EtcStatusUpdate(player)); player.sendPacket(new EtcStatusUpdate(player));

View File

@@ -153,7 +153,7 @@ public class JailHandler implements IPunishmentHandler
* @param task * @param task
* @param player * @param player
*/ */
private static void applyToPlayer(PunishmentTask task, PlayerInstance player) private void applyToPlayer(PunishmentTask task, PlayerInstance player)
{ {
player.setInstance(null); player.setInstance(null);
@@ -196,7 +196,7 @@ public class JailHandler implements IPunishmentHandler
* Removes any punishment effects from the player. * Removes any punishment effects from the player.
* @param player * @param player
*/ */
private static void removeFromPlayer(PlayerInstance player) private void removeFromPlayer(PlayerInstance player)
{ {
ThreadPool.schedule(new TeleportTask(player, JailZone.getLocationOut()), 2000); ThreadPool.schedule(new TeleportTask(player, JailZone.getLocationOut()), 2000);

View File

@@ -487,7 +487,7 @@ public class Kamaloka extends AbstractInstance
* Removing all buffs from player and pet except BUFFS_WHITELIST * Removing all buffs from player and pet except BUFFS_WHITELIST
* @param ch player * @param ch player
*/ */
private static final void removeBuffs(Creature ch) private void removeBuffs(Creature ch)
{ {
// Stop all buffs. // Stop all buffs.
ch.getEffectList().stopEffects(info -> (info != null) && !info.getSkill().isStayAfterDeath() && (Arrays.binarySearch(BUFFS_WHITELIST, info.getSkill().getId()) < 0), true, true); ch.getEffectList().stopEffects(info -> (info != null) && !info.getSkill().isStayAfterDeath() && (Arrays.binarySearch(BUFFS_WHITELIST, info.getSkill().getId()) < 0), true, true);

View File

@@ -444,7 +444,7 @@ public class Q00270_TheOneWhoEndsSilence extends Quest
* @param chance the reward chance * @param chance the reward chance
* @param atLeastOne if {@code true} it will reward two items if the chance is meet and one if the chance is not meet, if {@code false} if the chance is not meet doesn't reward, otherwise reward one item * @param atLeastOne if {@code true} it will reward two items if the chance is meet and one if the chance is not meet, if {@code false} if the chance is not meet doesn't reward, otherwise reward one item
*/ */
private static void giveItem(PlayerInstance player, Npc npc, int chance, boolean atLeastOne) private void giveItem(PlayerInstance player, Npc npc, int chance, boolean atLeastOne)
{ {
if ((player != null) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false)) if ((player != null) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, player, false))
{ {

View File

@@ -840,7 +840,7 @@ public class Q00420_LittleWing extends Quest
* Gives the reward to the player. * Gives the reward to the player.
* @param player the player * @param player the player
*/ */
private static void giveReward(PlayerInstance player) private void giveReward(PlayerInstance player)
{ {
final int random = getRandom(100); final int random = getRandom(100);
for (int i : EGGS) for (int i : EGGS)

View File

@@ -363,7 +363,7 @@ public class Q00453_NotStrongEnoughAlone extends Quest
return htmltext; return htmltext;
} }
private static void checkProgress(QuestState qs, int count, int... mobs) private void checkProgress(QuestState qs, int count, int... mobs)
{ {
for (int mob : mobs) for (int mob : mobs)
{ {

View File

@@ -782,7 +782,7 @@ public class Q00454_CompletelyLost extends Quest
* @param player the player * @param player the player
* @param stringId the NPC String * @param stringId the NPC String
*/ */
private static void whisper(Npc npc, PlayerInstance player, NpcStringId stringId) private void whisper(Npc npc, PlayerInstance player, NpcStringId stringId)
{ {
player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), stringId)); player.sendPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), stringId));
} }

View File

@@ -193,7 +193,7 @@ public class Q00455_WingsOfSand extends Quest
* Reward the player. * Reward the player.
* @param qs the quest state of the player to reward * @param qs the quest state of the player to reward
*/ */
private static void giveItems(QuestState qs) private void giveItems(QuestState qs)
{ {
final PlayerInstance player = qs.getPlayer(); final PlayerInstance player = qs.getPlayer();
int chance; int chance;

View File

@@ -319,7 +319,7 @@ public class Q00456_DontKnowDontCare extends Quest
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
} }
private static void rewardPlayer(PlayerInstance player, Npc npc) private void rewardPlayer(PlayerInstance player, Npc npc)
{ {
final int chance = getRandom(10000); final int chance = getRandom(10000);
final int reward; final int reward;

View File

@@ -201,7 +201,7 @@ public class Q00901_HowLavasaurusesAreMade extends Quest
return htmltext; return htmltext;
} }
private static void giveQuestItems(QuestState qs, int itemId) private void giveQuestItems(QuestState qs, int itemId)
{ {
final PlayerInstance player = qs.getPlayer(); final PlayerInstance player = qs.getPlayer();
if (getQuestItemsCount(player, itemId) < 10) if (getQuestItemsCount(player, itemId) < 10)

View File

@@ -324,7 +324,7 @@ public class Q10289_FadeToBlack extends Quest
return htmltext; return htmltext;
} }
private static void rewardPlayer(QuestState qs, boolean isLucky) private void rewardPlayer(QuestState qs, boolean isLucky)
{ {
if ((qs != null) && qs.isCond(1)) if ((qs != null) && qs.isCond(1))
{ {

View File

@@ -497,7 +497,7 @@ public class GameServer
INSTANCE = new GameServer(); INSTANCE = new GameServer();
} }
private static void printSection(String s) private void printSection(String s)
{ {
s = "=[ " + s + " ]"; s = "=[ " + s + " ]";
while (s.length() < 61) while (s.length() < 61)

View File

@@ -395,7 +395,7 @@ public class ClanEntryManager
return _clanLocked.get(playerId) == null ? 0 : _clanLocked.get(playerId).getDelay(TimeUnit.MINUTES); return _clanLocked.get(playerId) == null ? 0 : _clanLocked.get(playerId).getDelay(TimeUnit.MINUTES);
} }
private static void lockPlayer(int playerId) private void lockPlayer(int playerId)
{ {
_playerLocked.put(playerId, ThreadPool.schedule(() -> _playerLocked.put(playerId, ThreadPool.schedule(() ->
{ {
@@ -403,7 +403,7 @@ public class ClanEntryManager
}, LOCK_TIME)); }, LOCK_TIME));
} }
private static void lockClan(int clanId) private void lockClan(int clanId)
{ {
_clanLocked.put(clanId, ThreadPool.schedule(() -> _clanLocked.put(clanId, ThreadPool.schedule(() ->
{ {

Some files were not shown because too many files have changed in this diff Show More