HellboundLoader.java 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /*
  2. * Copyright (C) 2004-2014 L2J DataPack
  3. *
  4. * This file is part of L2J DataPack.
  5. *
  6. * L2J DataPack is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J DataPack is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package hellbound;
  20. import java.util.logging.Logger;
  21. import quests.Q00130_PathToHellbound.Q00130_PathToHellbound;
  22. import quests.Q00133_ThatsBloodyHot.Q00133_ThatsBloodyHot;
  23. import com.l2jserver.Config;
  24. import com.l2jserver.gameserver.handler.AdminCommandHandler;
  25. import com.l2jserver.gameserver.handler.IAdminCommandHandler;
  26. import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
  27. import com.l2jserver.gameserver.handler.VoicedCommandHandler;
  28. import handlers.admincommandhandlers.AdminHellbound;
  29. import handlers.voicedcommandhandlers.Hellbound;
  30. import hellbound.AI.Amaskari;
  31. import hellbound.AI.Chimeras;
  32. import hellbound.AI.DemonPrince;
  33. import hellbound.AI.HellboundCore;
  34. import hellbound.AI.Keltas;
  35. import hellbound.AI.NaiaLock;
  36. import hellbound.AI.OutpostCaptain;
  37. import hellbound.AI.Ranku;
  38. import hellbound.AI.Slaves;
  39. import hellbound.AI.Typhoon;
  40. import hellbound.AI.NPC.Bernarde.Bernarde;
  41. import hellbound.AI.NPC.Budenka.Budenka;
  42. import hellbound.AI.NPC.Buron.Buron;
  43. import hellbound.AI.NPC.Deltuva.Deltuva;
  44. import hellbound.AI.NPC.Falk.Falk;
  45. import hellbound.AI.NPC.Hude.Hude;
  46. import hellbound.AI.NPC.Jude.Jude;
  47. import hellbound.AI.NPC.Kanaf.Kanaf;
  48. import hellbound.AI.NPC.Kief.Kief;
  49. import hellbound.AI.NPC.Natives.Natives;
  50. import hellbound.AI.NPC.Quarry.Quarry;
  51. import hellbound.AI.NPC.Shadai.Shadai;
  52. import hellbound.AI.NPC.Solomon.Solomon;
  53. import hellbound.AI.NPC.Warpgate.Warpgate;
  54. import hellbound.AI.Zones.AnomicFoundry.AnomicFoundry;
  55. import hellbound.AI.Zones.BaseTower.BaseTower;
  56. import hellbound.AI.Zones.TowerOfInfinitum.TowerOfInfinitum;
  57. import hellbound.AI.Zones.TowerOfNaia.TowerOfNaia;
  58. import hellbound.AI.Zones.TullyWorkshop.TullyWorkshop;
  59. import hellbound.Instances.DemonPrinceFloor.DemonPrinceFloor;
  60. import hellbound.Instances.RankuFloor.RankuFloor;
  61. import hellbound.Instances.UrbanArea.UrbanArea;
  62. /**
  63. * Hellbound class-loader.
  64. * @author Zoey76
  65. */
  66. public final class HellboundLoader
  67. {
  68. private static final Logger _log = Logger.getLogger(HellboundLoader.class.getName());
  69. private static final Class<?>[] SCRIPTS =
  70. {
  71. // Commands
  72. AdminHellbound.class,
  73. Hellbound.class,
  74. // AIs
  75. Amaskari.class,
  76. Chimeras.class,
  77. DemonPrince.class,
  78. HellboundCore.class,
  79. Keltas.class,
  80. NaiaLock.class,
  81. OutpostCaptain.class,
  82. Ranku.class,
  83. Slaves.class,
  84. Typhoon.class,
  85. // NPCs
  86. Bernarde.class,
  87. Budenka.class,
  88. Buron.class,
  89. Deltuva.class,
  90. Falk.class,
  91. Hude.class,
  92. Jude.class,
  93. Kanaf.class,
  94. Kief.class,
  95. Natives.class,
  96. Quarry.class,
  97. Shadai.class,
  98. Solomon.class,
  99. Warpgate.class,
  100. // Zones
  101. AnomicFoundry.class,
  102. BaseTower.class,
  103. TowerOfInfinitum.class,
  104. TowerOfNaia.class,
  105. TullyWorkshop.class,
  106. // Instances
  107. DemonPrinceFloor.class,
  108. UrbanArea.class,
  109. RankuFloor.class,
  110. // Quests
  111. Q00130_PathToHellbound.class,
  112. Q00133_ThatsBloodyHot.class,
  113. };
  114. public static void main(String[] args)
  115. {
  116. _log.info(HellboundLoader.class.getSimpleName() + ": Loading Hellbound related scripts:");
  117. // Data
  118. HellboundPointData.getInstance();
  119. HellboundSpawns.getInstance();
  120. // Engine
  121. HellboundEngine.getInstance();
  122. for (Class<?> script : SCRIPTS)
  123. {
  124. try
  125. {
  126. final Object instance = script.newInstance();
  127. if (instance instanceof IAdminCommandHandler)
  128. {
  129. AdminCommandHandler.getInstance().registerHandler((IAdminCommandHandler) instance);
  130. }
  131. else if (Config.L2JMOD_HELLBOUND_STATUS && (instance instanceof IVoicedCommandHandler))
  132. {
  133. VoicedCommandHandler.getInstance().registerHandler((IVoicedCommandHandler) instance);
  134. }
  135. }
  136. catch (Exception e)
  137. {
  138. _log.severe(HellboundLoader.class.getSimpleName() + ": Failed loading " + script.getSimpleName() + ":" + e.getMessage());
  139. }
  140. }
  141. }
  142. }