Sfoglia il codice sorgente

Removed Login Server

Refactored several classes.
Using Java 11 features.
Moved common code to own library.
Complete refactor of Connection Pools.
Added Apache DBCP and Vibur DBCP.
Removed Gradle support.
Replaced several logs with SLF4J.
Formatted serveral classes.
Removed several useless comments.
Refactored all DAOs.
Zoey76 6 anni fa
parent
commit
a3ad152adc
100 ha cambiato i file con 5983 aggiunte e 11503 eliminazioni
  1. 0 2
      .gitattributes
  2. 2 11
      .gitignore
  3. 0 10
      .settings/org.eclipse.buildship.core.prefs
  4. 4 0
      .settings/org.eclipse.core.resources.prefs
  5. 0 2
      .settings/org.eclipse.core.runtime.prefs
  6. 1 437
      .settings/org.eclipse.jdt.core.prefs
  7. 0 73
      .settings/org.eclipse.jdt.ui.prefs
  8. 0 3
      .settings/org.eclipse.wst.sse.core.prefs
  9. 0 12
      .settings/org.eclipse.wst.validation.prefs
  10. 0 2
      .settings/org.testng.eclipse.maven.prefs
  11. 636 0
      LICENSE.md
  12. 29 4
      README.md
  13. 2 2
      bitbucket-pipelines.yml
  14. 0 105
      build.gradle
  15. 0 502
      dist/doc/3rdPartyLicenses/c3p0.txt
  16. 0 173
      dist/doc/3rdPartyLicenses/mail.txt
  17. 0 43
      dist/doc/3rdPartyLicenses/mysql-connector-java.txt
  18. 0 502
      dist/doc/3rdPartyLicenses/weupnp.txt
  19. 0 674
      dist/doc/L2J_Server_LICENSE.txt
  20. 0 297
      dist/doc/L2J_Server_README.txt
  21. 0 7
      dist/game/console.cfg
  22. BIN
      dist/libs/mmocore.jar
  23. 0 11
      dist/login/LoginServer_loop.sh
  24. 0 7
      dist/login/banned_ip.cfg
  25. 0 65
      dist/login/config/Email.properties
  26. 0 141
      dist/login/config/LoginServer.properties
  27. 0 24
      dist/login/config/MMO.properties
  28. 0 28
      dist/login/config/Telnet.properties
  29. 0 7
      dist/login/console.cfg
  30. 0 4
      dist/login/data/mail/MailList.xml
  31. 0 16
      dist/login/data/mail/MailList.xsd
  32. 0 15
      dist/login/data/mail/html/SecAuthTempBan.htm
  33. 0 130
      dist/login/data/servername.xml
  34. 0 22
      dist/login/data/servername.xsd
  35. 0 162
      dist/login/log.cfg
  36. 0 29
      dist/login/startLoginServer.bat
  37. 0 3
      dist/login/startLoginServer.sh
  38. BIN
      gradle/wrapper/gradle-wrapper.jar
  39. 0 5
      gradle/wrapper/gradle-wrapper.properties
  40. 0 172
      gradlew
  41. 0 84
      gradlew.bat
  42. 72 0
      pom.xml
  43. 0 4078
      src/main/java/com/l2jserver/Config.java
  44. 0 32
      src/main/java/com/l2jserver/Server.java
  45. 0 149
      src/main/java/com/l2jserver/UPnPService.java
  46. 0 69
      src/main/java/com/l2jserver/commons/database/pool/IConnectionFactory.java
  47. 0 73
      src/main/java/com/l2jserver/commons/database/pool/impl/BoneCPConnectionFactory.java
  48. 0 129
      src/main/java/com/l2jserver/commons/database/pool/impl/C3P0ConnectionFactory.java
  49. 0 73
      src/main/java/com/l2jserver/commons/database/pool/impl/ConnectionFactory.java
  50. 0 67
      src/main/java/com/l2jserver/commons/database/pool/impl/HikariCPConnectionFactory.java
  51. 1 1
      src/main/java/com/l2jserver/gameserver/FortUpdater.java
  52. 45 66
      src/main/java/com/l2jserver/gameserver/GameServer.java
  53. 1 1
      src/main/java/com/l2jserver/gameserver/GeoData.java
  54. 1 1
      src/main/java/com/l2jserver/gameserver/ItemsAutoDestroy.java
  55. 106 237
      src/main/java/com/l2jserver/gameserver/LoginServerThread.java
  56. 1 1
      src/main/java/com/l2jserver/gameserver/RecipeController.java
  57. 154 327
      src/main/java/com/l2jserver/gameserver/SevenSigns.java
  58. 158 324
      src/main/java/com/l2jserver/gameserver/SevenSignsFestival.java
  59. 77 163
      src/main/java/com/l2jserver/gameserver/Shutdown.java
  60. 1 1
      src/main/java/com/l2jserver/gameserver/ThreadPoolManager.java
  61. 1 1
      src/main/java/com/l2jserver/gameserver/ai/L2AttackableAI.java
  62. 1 1
      src/main/java/com/l2jserver/gameserver/ai/L2CharacterAI.java
  63. 1 1
      src/main/java/com/l2jserver/gameserver/ai/L2SummonAI.java
  64. 1 1
      src/main/java/com/l2jserver/gameserver/cache/HtmCache.java
  65. 1 1
      src/main/java/com/l2jserver/gameserver/cache/WarehouseCacheManager.java
  66. 37 88
      src/main/java/com/l2jserver/gameserver/communitybbs/BB/Forum.java
  67. 25 56
      src/main/java/com/l2jserver/gameserver/communitybbs/BB/Post.java
  68. 22 65
      src/main/java/com/l2jserver/gameserver/communitybbs/BB/Topic.java
  69. 23 41
      src/main/java/com/l2jserver/gameserver/communitybbs/Manager/ForumsBBSManager.java
  70. 23 53
      src/main/java/com/l2jserver/gameserver/communitybbs/Manager/PostBBSManager.java
  71. 42 94
      src/main/java/com/l2jserver/gameserver/communitybbs/Manager/TopicBBSManager.java
  72. 3712 0
      src/main/java/com/l2jserver/gameserver/config/Config.java
  73. 1 1
      src/main/java/com/l2jserver/gameserver/dao/factory/impl/DAOFactory.java
  74. 3 5
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ClanDAOMySQLImpl.java
  75. 9 17
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/FriendDAOMySQLImpl.java
  76. 26 47
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/HennaDAOMySQLImpl.java
  77. 8 17
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ItemDAOMySQLImpl.java
  78. 28 53
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ItemReuseDAOMySQLImpl.java
  79. 26 53
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PetDAOMySQLImpl.java
  80. 29 49
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PetSkillSaveDAOMySQL.java
  81. 46 87
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PlayerDAOMySQLImpl.java
  82. 35 65
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PlayerSkillSaveDAOMySQLImpl.java
  83. 17 35
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PremiumItemDAOMySQLImpl.java
  84. 23 50
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/RecipeBookDAOMySQLImpl.java
  85. 21 39
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/RecipeShopListDAOMySQLImpl.java
  86. 14 30
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/RecommendationBonusDAOMySQLImpl.java
  87. 29 52
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ServitorSkillSaveDAOMySQLImpl.java
  88. 7 14
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ShortcutDAOMySQLImpl.java
  89. 41 72
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/SkillDAOMySQLImpl.java
  90. 26 47
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/SubclassDAOMySQLImpl.java
  91. 24 43
      src/main/java/com/l2jserver/gameserver/dao/impl/mysql/TeleportBookmarkDAOMySQLImpl.java
  92. 1 1
      src/main/java/com/l2jserver/gameserver/data/json/ExperienceData.java
  93. 30 52
      src/main/java/com/l2jserver/gameserver/data/sql/impl/AnnouncementsTable.java
  94. 54 106
      src/main/java/com/l2jserver/gameserver/data/sql/impl/CharNameTable.java
  95. 51 89
      src/main/java/com/l2jserver/gameserver/data/sql/impl/CharSummonTable.java
  96. 90 183
      src/main/java/com/l2jserver/gameserver/data/sql/impl/ClanTable.java
  97. 61 123
      src/main/java/com/l2jserver/gameserver/data/sql/impl/CrestTable.java
  98. 37 74
      src/main/java/com/l2jserver/gameserver/data/sql/impl/NpcBufferTable.java
  99. 53 94
      src/main/java/com/l2jserver/gameserver/data/sql/impl/OfflineTradersTable.java
  100. 13 25
      src/main/java/com/l2jserver/gameserver/data/sql/impl/PetNameTable.java

+ 0 - 2
.gitattributes

@@ -1,2 +0,0 @@
-# SH files must always use LF.
-*.sh eol=lf

+ 2 - 11
.gitignore

@@ -1,13 +1,4 @@
-/bin/
-/build/
-/.gradle/
-.DS_Store
-*.log
 .project
 .classpath
-/test-output/
-
-# Ignoring debug files
-/dist/game/log/
-/dist/game/config/hexid.txt
-/dist/login/log/
+.settings/
+target/

+ 0 - 10
.settings/org.eclipse.buildship.core.prefs

@@ -1,10 +0,0 @@
-build.commands=org.eclipse.jdt.core.javabuilder
-connection.arguments=
-connection.java.home=null
-connection.jvm.arguments=
-connection.project.dir=../L2J_DataPack
-containers=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/
-derived.resources=.gradle,build
-eclipse.preferences.version=1
-natures=org.eclipse.jdt.core.javanature
-project.path=\:L2J_Server

+ 4 - 0
.settings/org.eclipse.core.resources.prefs

@@ -1,2 +1,6 @@
 eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8
 encoding/<project>=UTF-8

+ 0 - 2
.settings/org.eclipse.core.runtime.prefs

@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\r\n

+ 1 - 437
.settings/org.eclipse.jdt.core.prefs

@@ -1,442 +1,6 @@
 eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
 org.eclipse.jdt.core.compiler.compliance=11
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
 org.eclipse.jdt.core.compiler.release=disabled
 org.eclipse.jdt.core.compiler.source=11
-org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
-org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
-org.eclipse.jdt.core.formatter.align_with_spaces=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=48
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_assignment=4
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
-org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=49
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=85
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=48
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
-org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
-org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
-org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=300
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=1
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true
-org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
-org.eclipse.jdt.core.formatter.lineSplit=300
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
-org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=true
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
-org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter

File diff suppressed because it is too large
+ 0 - 73
.settings/org.eclipse.jdt.ui.prefs


+ 0 - 3
.settings/org.eclipse.wst.sse.core.prefs

@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-task-tags/enabled=true
-task-tags/use-project-settings=true

+ 0 - 12
.settings/org.eclipse.wst.validation.prefs

@@ -1,12 +0,0 @@
-DELEGATES_PREFERENCE=delegateValidatorList
-USER_BUILD_PREFERENCE=enabledBuildValidatorList
-USER_MANUAL_PREFERENCE=enabledManualValidatorList
-USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.400.v201204260100
-eclipse.preferences.version=1
-override=true
-suspend=false
-vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
-vals/org.eclipse.wst.html.core.HTMLValidator/global=FF01
-vals/org.eclipse.wst.html.ui.HTMLValidator/global=TF01
-vals/org.eclipse.wst.xml.core.xml/groups=0107include05111contentType128org.eclipse.core.runtime.xmlT111contentType134org.eclipse.wst.xml.core.xmlsourceT111contentType134org.eclipse.wst.xml.core.xslsourceT111contentType134org.eclipse.jst.jsp.core.tldsourceT07fileext03xmlF0107exclude08113projectNature134org.eclipse.jst.j2ee.ejb.EJBNature113projectNature130org.eclipse.jst.j2ee.EARNature04file08.projectT0104file110.classpathT0104file110.settings/T0204file03binF0204file05buildF0204file09build.xmlF01
-vf.version=3

+ 0 - 2
.settings/org.testng.eclipse.maven.prefs

@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-userprojectsettings=false

+ 636 - 0
LICENSE.md

@@ -0,0 +1,636 @@
+# GNU GENERAL PUBLIC LICENSE
+Version 3, 29 June 2007
+
+Copyright (C) 2007 [Free Software Foundation, Inc.](http://fsf.org/)
+
+Everyone is permitted to copy and distribute verbatim copies of this license
+document, but changing it is not allowed.
+
+## Preamble
+
+The GNU General Public License is a free, copyleft license for software and
+other kinds of works.
+
+The licenses for most software and other practical works are designed to take
+away your freedom to share and change the works. By contrast, the GNU General
+Public License is intended to guarantee your freedom to share and change all
+versions of a program--to make sure it remains free software for all its users.
+We, the Free Software Foundation, use the GNU General Public License for most
+of our software; it applies also to any other work released this way by its
+authors. You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our
+General Public Licenses are designed to make sure that you have the freedom to
+distribute copies of free software (and charge for them if you wish), that you
+receive source code or can get it if you want it, that you can change the
+software or use pieces of it in new free programs, and that you know you can do
+these things.
+
+To protect your rights, we need to prevent others from denying you these rights
+or asking you to surrender the rights. Therefore, you have certain
+responsibilities if you distribute copies of the software, or if you modify it:
+responsibilities to respect the freedom of others.
+
+For example, if you distribute copies of such a program, whether gratis or for
+a fee, you must pass on to the recipients the same freedoms that you received.
+You must make sure that they, too, receive or can get the source code. And you
+must show them these terms so they know their rights.
+
+Developers that use the GNU GPL protect your rights with two steps:
+
+  1. assert copyright on the software, and
+  2. offer you this License giving you legal permission to copy, distribute
+     and/or modify it.
+
+For the developers' and authors' protection, the GPL clearly explains that
+there is no warranty for this free software. For both users' and authors' sake,
+the GPL requires that modified versions be marked as changed, so that their
+problems will not be attributed erroneously to authors of previous versions.
+
+Some devices are designed to deny users access to install or run modified
+versions of the software inside them, although the manufacturer can do so. This
+is fundamentally incompatible with the aim of protecting users' freedom to
+change the software. The systematic pattern of such abuse occurs in the area of
+products for individuals to use, which is precisely where it is most
+unacceptable. Therefore, we have designed this version of the GPL to prohibit
+the practice for those products. If such problems arise substantially in other
+domains, we stand ready to extend this provision to those domains in future
+versions of the GPL, as needed to protect the freedom of users.
+
+Finally, every program is threatened constantly by software patents. States
+should not allow patents to restrict development and use of software on
+general-purpose computers, but in those that do, we wish to avoid the special
+danger that patents applied to a free program could make it effectively
+proprietary. To prevent this, the GPL assures that patents cannot be used to
+render the program non-free.
+
+The precise terms and conditions for copying, distribution and modification
+follow.
+
+## TERMS AND CONDITIONS
+
+### 0. Definitions.
+
+*This License* refers to version 3 of the GNU General Public License.
+
+*Copyright* also means copyright-like laws that apply to other kinds of works,
+such as semiconductor masks.
+
+*The Program* refers to any copyrightable work licensed under this License.
+Each licensee is addressed as *you*. *Licensees* and *recipients* may be
+individuals or organizations.
+
+To *modify* a work means to copy from or adapt all or part of the work in a
+fashion requiring copyright permission, other than the making of an exact copy.
+The resulting work is called a *modified version* of the earlier work or a work
+*based on* the earlier work.
+
+A *covered work* means either the unmodified Program or a work based on the
+Program.
+
+To *propagate* a work means to do anything with it that, without permission,
+would make you directly or secondarily liable for infringement under applicable
+copyright law, except executing it on a computer or modifying a private copy.
+Propagation includes copying, distribution (with or without modification),
+making available to the public, and in some countries other activities as well.
+
+To *convey* a work means any kind of propagation that enables other parties to
+make or receive copies. Mere interaction with a user through a computer
+network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays *Appropriate Legal Notices* to the
+extent that it includes a convenient and prominently visible feature that
+
+  1. displays an appropriate copyright notice, and
+  2. tells the user that there is no warranty for the work (except to the
+     extent that warranties are provided), that licensees may convey the work
+     under this License, and how to view a copy of this License.
+
+If the interface presents a list of user commands or options, such as a menu, a
+prominent item in the list meets this criterion.
+
+### 1. Source Code.
+
+The *source code* for a work means the preferred form of the work for making
+modifications to it. *Object code* means any non-source form of a work.
+
+A *Standard Interface* means an interface that either is an official standard
+defined by a recognized standards body, or, in the case of interfaces specified
+for a particular programming language, one that is widely used among developers
+working in that language.
+
+The *System Libraries* of an executable work include anything, other than the
+work as a whole, that (a) is included in the normal form of packaging a Major
+Component, but which is not part of that Major Component, and (b) serves only
+to enable use of the work with that Major Component, or to implement a Standard
+Interface for which an implementation is available to the public in source code
+form. A *Major Component*, in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system (if any) on
+which the executable work runs, or a compiler used to produce the work, or an
+object code interpreter used to run it.
+
+The *Corresponding Source* for a work in object code form means all the source
+code needed to generate, install, and (for an executable work) run the object
+code and to modify the work, including scripts to control those activities.
+However, it does not include the work's System Libraries, or general-purpose
+tools or generally available free programs which are used unmodified in
+performing those activities but which are not part of the work. For example,
+Corresponding Source includes interface definition files associated with source
+files for the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require, such as
+by intimate data communication or control flow between those subprograms and
+other parts of the work.
+
+The Corresponding Source need not include anything that users can regenerate
+automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same work.
+
+### 2. Basic Permissions.
+
+All rights granted under this License are granted for the term of copyright on
+the Program, and are irrevocable provided the stated conditions are met. This
+License explicitly affirms your unlimited permission to run the unmodified
+Program. The output from running a covered work is covered by this License only
+if the output, given its content, constitutes a covered work. This License
+acknowledges your rights of fair use or other equivalent, as provided by
+copyright law.
+
+You may make, run and propagate covered works that you do not convey, without
+conditions so long as your license otherwise remains in force. You may convey
+covered works to others for the sole purpose of having them make modifications
+exclusively for you, or provide you with facilities for running those works,
+provided that you comply with the terms of this License in conveying all
+material for which you do not control copyright. Those thus making or running
+the covered works for you must do so exclusively on your behalf, under your
+direction and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under the
+conditions stated below. Sublicensing is not allowed; section 10 makes it
+unnecessary.
+
+### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+No covered work shall be deemed part of an effective technological measure
+under any applicable law fulfilling obligations under article 11 of the WIPO
+copyright treaty adopted on 20 December 1996, or similar laws prohibiting or
+restricting circumvention of such measures.
+
+When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention is
+effected by exercising rights under this License with respect to the covered
+work, and you disclaim any intention to limit operation or modification of the
+work as a means of enforcing, against the work's users, your or third parties'
+legal rights to forbid circumvention of technological measures.
+
+### 4. Conveying Verbatim Copies.
+
+You may convey verbatim copies of the Program's source code as you receive it,
+in any medium, provided that you conspicuously and appropriately publish on
+each copy an appropriate copyright notice; keep intact all notices stating that
+this License and any non-permissive terms added in accord with section 7 apply
+to the code; keep intact all notices of the absence of any warranty; and give
+all recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey, and you may
+offer support or warranty protection for a fee.
+
+### 5. Conveying Modified Source Versions.
+
+You may convey a work based on the Program, or the modifications to produce it
+from the Program, in the form of source code under the terms of section 4,
+provided that you also meet all of these conditions:
+
+  - a) The work must carry prominent notices stating that you modified it, and
+    giving a relevant date.
+  - b) The work must carry prominent notices stating that it is released under
+    this License and any conditions added under section 7. This requirement
+    modifies the requirement in section 4 to *keep intact all notices*.
+  - c) You must license the entire work, as a whole, under this License to
+    anyone who comes into possession of a copy. This License will therefore
+    apply, along with any applicable section 7 additional terms, to the whole
+    of the work, and all its parts, regardless of how they are packaged. This
+    License gives no permission to license the work in any other way, but it
+    does not invalidate such permission if you have separately received it.
+  - d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your work need
+    not make them do so.
+
+A compilation of a covered work with other separate and independent works,
+which are not by their nature extensions of the covered work, and which are not
+combined with it such as to form a larger program, in or on a volume of a
+storage or distribution medium, is called an *aggregate* if the compilation and
+its resulting copyright are not used to limit the access or legal rights of the
+compilation's users beyond what the individual works permit. Inclusion of a
+covered work in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+### 6. Conveying Non-Source Forms.
+
+You may convey a covered work in object code form under the terms of sections 4
+and 5, provided that you also convey the machine-readable Corresponding Source
+under the terms of this License, in one of these ways:
+
+  - a) Convey the object code in, or embodied in, a physical product (including
+    a physical distribution medium), accompanied by the Corresponding Source
+    fixed on a durable physical medium customarily used for software
+    interchange.
+  - b) Convey the object code in, or embodied in, a physical product (including
+    a physical distribution medium), accompanied by a written offer, valid for
+    at least three years and valid for as long as you offer spare parts or
+    customer support for that product model, to give anyone who possesses the
+    object code either
+    1. a copy of the Corresponding Source for all the software in the product
+       that is covered by this License, on a durable physical medium
+       customarily used for software interchange, for a price no more than your
+       reasonable cost of physically performing this conveying of source, or
+    2. access to copy the Corresponding Source from a network server at no
+       charge.
+  - c) Convey individual copies of the object code with a copy of the written
+    offer to provide the Corresponding Source. This alternative is allowed only
+    occasionally and noncommercially, and only if you received the object code
+    with such an offer, in accord with subsection 6b.
+  - d) Convey the object code by offering access from a designated place
+    (gratis or for a charge), and offer equivalent access to the Corresponding
+    Source in the same way through the same place at no further charge. You
+    need not require recipients to copy the Corresponding Source along with the
+    object code. If the place to copy the object code is a network server, the
+    Corresponding Source may be on a different server operated by you or a
+    third party) that supports equivalent copying facilities, provided you
+    maintain clear directions next to the object code saying where to find the
+    Corresponding Source. Regardless of what server hosts the Corresponding
+    Source, you remain obligated to ensure that it is available for as long as
+    needed to satisfy these requirements.
+  - e) Convey the object code using peer-to-peer transmission, provided you
+    inform other peers where the object code and Corresponding Source of the
+    work are being offered to the general public at no charge under subsection
+    6d.
+
+A separable portion of the object code, whose source code is excluded from the
+Corresponding Source as a System Library, need not be included in conveying the
+object code work.
+
+A *User Product* is either
+
+  1. a *consumer product*, which means any tangible personal property which is
+     normally used for personal, family, or household purposes, or
+  2. anything designed or sold for incorporation into a dwelling.
+
+In determining whether a product is a consumer product, doubtful cases shall be
+resolved in favor of coverage. For a particular product received by a
+particular user, *normally used* refers to a typical or common use of that
+class of product, regardless of the status of the particular user or of the way
+in which the particular user actually uses, or expects or is expected to use,
+the product. A product is a consumer product regardless of whether the product
+has substantial commercial, industrial or non-consumer uses, unless such uses
+represent the only significant mode of use of the product.
+
+*Installation Information* for a User Product means any methods, procedures,
+authorization keys, or other information required to install and execute
+modified versions of a covered work in that User Product from a modified
+version of its Corresponding Source. The information must suffice to ensure
+that the continued functioning of the modified object code is in no case
+prevented or interfered with solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as part of a
+transaction in which the right of possession and use of the User Product is
+transferred to the recipient in perpetuity or for a fixed term (regardless of
+how the transaction is characterized), the Corresponding Source conveyed under
+this section must be accompanied by the Installation Information. But this
+requirement does not apply if neither you nor any third party retains the
+ability to install modified object code on the User Product (for example, the
+work has been installed in ROM).
+
+The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates for a
+work that has been modified or installed by the recipient, or for the User
+Product in which it has been modified or installed. Access to a network may be
+denied when the modification itself materially and adversely affects the
+operation of the network or violates the rules and protocols for communication
+across the network.
+
+Corresponding Source conveyed, and Installation Information provided, in accord
+with this section must be in a format that is publicly documented (and with an
+implementation available to the public in source code form), and must require
+no special password or key for unpacking, reading or copying.
+
+### 7. Additional Terms.
+
+*Additional permissions* are terms that supplement the terms of this License by
+making exceptions from one or more of its conditions. Additional permissions
+that are applicable to the entire Program shall be treated as though they were
+included in this License, to the extent that they are valid under applicable
+law. If additional permissions apply only to part of the Program, that part may
+be used separately under those permissions, but the entire Program remains
+governed by this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option remove any
+additional permissions from that copy, or from any part of it. (Additional
+permissions may be written to require their own removal in certain cases when
+you modify the work.) You may place additional permissions on material, added
+by you to a covered work, for which you have or can give appropriate copyright
+permission.
+
+Notwithstanding any other provision of this License, for material you add to a
+covered work, you may (if authorized by the copyright holders of that material)
+supplement the terms of this License with terms:
+
+  - a) Disclaiming warranty or limiting liability differently from the terms of
+    sections 15 and 16 of this License; or
+  - b) Requiring preservation of specified reasonable legal notices or author
+    attributions in that material or in the Appropriate Legal Notices displayed
+    by works containing it; or
+  - c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in reasonable
+    ways as different from the original version; or
+  - d) Limiting the use for publicity purposes of names of licensors or authors
+    of the material; or
+  - e) Declining to grant rights under trademark law for use of some trade
+    names, trademarks, or service marks; or
+  - f) Requiring indemnification of licensors and authors of that material by
+    anyone who conveys the material (or modified versions of it) with
+    contractual assumptions of liability to the recipient, for any liability
+    that these contractual assumptions directly impose on those licensors and
+    authors.
+
+All other non-permissive additional terms are considered *further restrictions*
+within the meaning of section 10. If the Program as you received it, or any
+part of it, contains a notice stating that it is governed by this License along
+with a term that is a further restriction, you may remove that term. If a
+license document contains a further restriction but permits relicensing or
+conveying under this License, you may add to a covered work material governed
+by the terms of that license document, provided that the further restriction
+does not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you must place,
+in the relevant source files, a statement of the additional terms that apply to
+those files, or a notice indicating where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the form of a
+separately written license, or stated as exceptions; the above requirements
+apply either way.
+
+### 8. Termination.
+
+You may not propagate or modify a covered work except as expressly provided
+under this License. Any attempt otherwise to propagate or modify it is void,
+and will automatically terminate your rights under this License (including any
+patent licenses granted under the third paragraph of section 11).
+
+However, if you cease all violation of this License, then your license from a
+particular copyright holder is reinstated
+
+  - a) provisionally, unless and until the copyright holder explicitly and
+    finally terminates your license, and
+  - b) permanently, if the copyright holder fails to notify you of the
+    violation by some reasonable means prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is reinstated
+permanently if the copyright holder notifies you of the violation by some
+reasonable means, this is the first time you have received notice of violation
+of this License (for any work) from that copyright holder, and you cure the
+violation prior to 30 days after your receipt of the notice.
+
+Termination of your rights under this section does not terminate the licenses
+of parties who have received copies or rights from you under this License. If
+your rights have been terminated and not permanently reinstated, you do not
+qualify to receive new licenses for the same material under section 10.
+
+### 9. Acceptance Not Required for Having Copies.
+
+You are not required to accept this License in order to receive or run a copy
+of the Program. Ancillary propagation of a covered work occurring solely as a
+consequence of using peer-to-peer transmission to receive a copy likewise does
+not require acceptance. However, nothing other than this License grants you
+permission to propagate or modify any covered work. These actions infringe
+copyright if you do not accept this License. Therefore, by modifying or
+propagating a covered work, you indicate your acceptance of this License to do
+so.
+
+### 10. Automatic Licensing of Downstream Recipients.
+
+Each time you convey a covered work, the recipient automatically receives a
+license from the original licensors, to run, modify and propagate that work,
+subject to this License. You are not responsible for enforcing compliance by
+third parties with this License.
+
+An *entity transaction* is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered work
+results from an entity transaction, each party to that transaction who receives
+a copy of the work also receives whatever licenses to the work the party's
+predecessor in interest had or could give under the previous paragraph, plus a
+right to possession of the Corresponding Source of the work from the
+predecessor in interest, if the predecessor has it or can get it with
+reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the rights
+granted or affirmed under this License. For example, you may not impose a
+license fee, royalty, or other charge for exercise of rights granted under this
+License, and you may not initiate litigation (including a cross-claim or
+counterclaim in a lawsuit) alleging that any patent claim is infringed by
+making, using, selling, offering for sale, or importing the Program or any
+portion of it.
+
+### 11. Patents.
+
+A *contributor* is a copyright holder who authorizes use under this License of
+the Program or a work on which the Program is based. The work thus licensed is
+called the contributor's *contributor version*.
+
+A contributor's *essential patent claims* are all patent claims owned or
+controlled by the contributor, whether already acquired or hereafter acquired,
+that would be infringed by some manner, permitted by this License, of making,
+using, or selling its contributor version, but do not include claims that would
+be infringed only as a consequence of further modification of the contributor
+version. For purposes of this definition, *control* includes the right to grant
+patent sublicenses in a manner consistent with the requirements of this
+License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free patent
+license under the contributor's essential patent claims, to make, use, sell,
+offer for sale, import and otherwise run, modify and propagate the contents of
+its contributor version.
+
+In the following three paragraphs, a *patent license* is any express agreement
+or commitment, however denominated, not to enforce a patent (such as an express
+permission to practice a patent or covenant not to sue for patent
+infringement). To *grant* such a patent license to a party means to make such
+an agreement or commitment not to enforce a patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license, and the
+Corresponding Source of the work is not available for anyone to copy, free of
+charge and under the terms of this License, through a publicly available
+network server or other readily accessible means, then you must either
+
+  1. cause the Corresponding Source to be so available, or
+  2. arrange to deprive yourself of the benefit of the patent license for this
+     particular work, or
+  3. arrange, in a manner consistent with the requirements of this License, to
+     extend the patent license to downstream recipients.
+
+*Knowingly relying* means you have actual knowledge that, but for the patent
+license, your conveying the covered work in a country, or your recipient's use
+of the covered work in a country, would infringe one or more identifiable
+patents in that country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or arrangement, you
+convey, or propagate by procuring conveyance of, a covered work, and grant a
+patent license to some of the parties receiving the covered work authorizing
+them to use, propagate, modify or convey a specific copy of the covered work,
+then the patent license you grant is automatically extended to all recipients
+of the covered work and works based on it.
+
+A patent license is *discriminatory* if it does not include within the scope of
+its coverage, prohibits the exercise of, or is conditioned on the non-exercise
+of one or more of the rights that are specifically granted under this License.
+You may not convey a covered work if you are a party to an arrangement with a
+third party that is in the business of distributing software, under which you
+make payment to the third party based on the extent of your activity of
+conveying the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory patent
+license
+
+  - a) in connection with copies of the covered work conveyed by you (or copies
+    made from those copies), or
+  - b) primarily for and in connection with specific products or compilations
+    that contain the covered work, unless you entered into that arrangement, or
+    that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting any implied
+license or other defenses to infringement that may otherwise be available to
+you under applicable patent law.
+
+### 12. No Surrender of Others' Freedom.
+
+If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not excuse
+you from the conditions of this License. If you cannot convey a covered work so
+as to satisfy simultaneously your obligations under this License and any other
+pertinent obligations, then as a consequence you may not convey it at all. For
+example, if you agree to terms that obligate you to collect a royalty for
+further conveying from those to whom you convey the Program, the only way you
+could satisfy both those terms and this License would be to refrain entirely
+from conveying the Program.
+
+### 13. Use with the GNU Affero General Public License.
+
+Notwithstanding any other provision of this License, you have permission to
+link or combine any covered work with a work licensed under version 3 of the
+GNU Affero General Public License into a single combined work, and to convey
+the resulting work. The terms of this License will continue to apply to the
+part which is the covered work, but the special requirements of the GNU Affero
+General Public License, section 13, concerning interaction through a network
+will apply to the combination as such.
+
+### 14. Revised Versions of this License.
+
+The Free Software Foundation may publish revised and/or new versions of the GNU
+General Public License from time to time. Such new versions will be similar in
+spirit to the present version, but may differ in detail to address new problems
+or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies
+that a certain numbered version of the GNU General Public License *or any later
+version* applies to it, you have the option of following the terms and
+conditions either of that numbered version or of any later version published by
+the Free Software Foundation. If the Program does not specify a version number
+of the GNU General Public License, you may choose any version ever published by
+the Free Software Foundation.
+
+If the Program specifies that a proxy can decide which future versions of the
+GNU General Public License can be used, that proxy's public statement of
+acceptance of a version permanently authorizes you to choose that version for
+the Program.
+
+Later license versions may give you additional or different permissions.
+However, no additional obligations are imposed on any author or copyright
+holder as a result of your choosing to follow a later version.
+
+### 15. Disclaimer of Warranty.
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
+LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+PARTIES PROVIDE THE PROGRAM *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
+QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
+CORRECTION.
+
+### 16. Limitation of Liability.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
+COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
+PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
+INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
+PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY
+HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+### 17. Interpretation of Sections 15 and 16.
+
+If the disclaimer of warranty and limitation of liability provided above cannot
+be given local legal effect according to their terms, reviewing courts shall
+apply local law that most closely approximates an absolute waiver of all civil
+liability in connection with the Program, unless a warranty or assumption of
+liability accompanies a copy of the Program in return for a fee.
+
+## END OF TERMS AND CONDITIONS ###
+
+### How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible
+use to the public, the best way to achieve this is to make it free software
+which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach
+them to the start of each source file to most effectively state the exclusion
+of warranty; and each file should have at least the *copyright* line and a
+pointer to where the full notice is found.
+
+	<one line to give the program's name and a brief idea of what it does.>
+	Copyright (C) <year>  <name of author>
+	
+	This program is free software: you can redistribute it and/or modify
+	it under the terms of the GNU General Public License as published by
+	the Free Software Foundation, either version 3 of the License, or
+	(at your option) any later version.
+	
+	This program is distributed in the hope that it will be useful,
+	but WITHOUT ANY WARRANTY; without even the implied warranty of
+	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+	GNU General Public License for more details.
+	
+	You should have received a copy of the GNU General Public License
+	along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program does terminal interaction, make it output a short notice like
+this when it starts in an interactive mode:
+
+	<program>  Copyright (C) <year>  <name of author>
+	This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+	This is free software, and you are welcome to redistribute it
+	under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w` and `show c` should show the appropriate
+parts of the General Public License. Of course, your program's commands might
+be different; for a GUI interface, you would use an *about box*.
+
+You should also get your employer (if you work as a programmer) or school, if
+any, to sign a *copyright disclaimer* for the program, if necessary. For more
+information on this, and how to apply and follow the GNU GPL, see
+[http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
+
+The GNU General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may consider
+it more useful to permit linking proprietary applications with the library. If
+this is what you want to do, use the GNU Lesser General Public License instead
+of this License. But first, please read
+[http://www.gnu.org/philosophy/why-not-lgpl.html](http://www.gnu.org/philosophy/why-not-lgpl.html).

+ 29 - 4
README.md

@@ -1,8 +1,8 @@
 L2J Server Project
-==============
+===
 
 L2J Server is an open-source server emulator fully written in Java for the famous Korean MMORPG.
---------------
+---
 
 This page only gives very basic information, for the detailed information about building and developing L2J Server, please visit the developers forums.
 
@@ -10,8 +10,33 @@ This page only gives very basic information, for the detailed information about
 
 - develop branch is the current High Five development
 
+Legal
+---
+
+L2J is distributed under the terms of GNU/GPL, we require you to:
+
+a) Preserve login notice. This gives us, L2J Developers, appropriate
+credit for our hard work done during our free time without any
+revenues.
+ 
+b) Do not distribute any extended data files with the server files in
+the same archive. NO world content should be incorporated in L2J
+distribution.
+Server and Datapack may not be not be bundled or packaged.
+
+Requeriments
+---
+
+Windows or Linux system with Java JDK 11+, Maven 3.5+, MySQL 8.0+.
+
+At least 4gb of RAM and 2 Cores.
+
+Open ports 2016 and 7777.
+
+High Five part 5 NA client fully updated.
+
 Links
---------------
+---
 
 - [Web Site](http://www.l2jserver.com)
 
@@ -23,4 +48,4 @@ Links
 
 - [Documentation](https://bitbucket.org/l2jserver/l2j_server/wiki)
 
-- [@l2jserver](https://twitter.com/l2jserver)
+- [@l2jserver](https://twitter.com/l2jserver)

+ 2 - 2
bitbucket-pipelines.yml

@@ -1,7 +1,7 @@
-image: openjdk:11-jre-slim
+image: maven:3.6.0-jdk-11-slim
 
 pipelines:
   default:
     - step:
         script:
-          - ./gradlew build
+          - mvn -version

+ 0 - 105
build.gradle

@@ -1,105 +0,0 @@
-apply plugin: 'java'
-apply plugin: 'distribution'
-apply plugin: 'eclipse'
-
-defaultTasks('clean', 'build')
-
-sourceCompatibility = JavaVersion.VERSION_11
-targetCompatibility = JavaVersion.VERSION_11
-
-repositories {
-    mavenCentral()
-}
-
-configurations.all {
-    transitive = false
-}
-
-dependencies {
-	compile 'com.mchange:c3p0:0.9.5.2'
-	compile 'com.mchange:mchange-commons-java:0.2.15'
-	compile 'com.jolbox:bonecp:0.8.0.RELEASE'
-	compile 'com.sun.mail:javax.mail:1.6.1'
-	compile 'com.zaxxer:HikariCP:3.3.0'
-	compile 'mysql:mysql-connector-java:8.0.14'
-	compile 'org.mariadb.jdbc:mariadb-java-client:2.3.0'
-	compile 'org.bitlet:weupnp:0.1.4'
-	compile 'com.google.code.gson:gson:2.8.5'
-	compile 'com.google.guava:guava:27.0.1-jre'
-	compile 'org.slf4j:slf4j-api:1.7.25'
-	compile 'org.slf4j:slf4j-jdk14:1.7.25'
-	compile 'org.mdkt.compiler:InMemoryJavaCompiler:1.3.0'
-	compile fileTree(dir: 'dist/libs', include: '*.jar')
-	testCompile 'org.testng:testng:6.14.3'
-	testCompile 'org.mockito:mockito-core:2.23.4'
-	testCompile 'com.beust:jcommander:1.72'
-	testCompile 'net.bytebuddy:byte-buddy:1.8.17'
-	testCompile 'org.objenesis:objenesis:2.6'
-}
-
-def generalManifest = manifest {
-	attributes('Built-By': System.getProperty('user.name'),
-			'Built-Date': new Date().format("yyyy-MM-dd HH:mm:ss"),
-			'Implementation-URL': 'http://www.l2jserver.com/',
-			'Class-Path': configurations.runtime.collect { '../libs/' + it.name }.join(' '))
-}
-
-jar {
-	archiveName = 'l2jserver.jar'
-	exclude('**/loginserver/**')
-	manifest {
-		from(generalManifest)
-		attributes('Main-Class': 'com.l2jserver.gameserver.GameServer')
-	}
-}
-
-task loginJar(type: Jar, dependsOn: classes) {
-	from(sourceSets.main.output)
-	archiveName = 'l2jlogin.jar'
-	manifest {
-		from(generalManifest)
-		attributes('Main-Class': 'com.l2jserver.loginserver.L2LoginServer')
-	}
-}
-
-artifacts {
-	archives loginJar
-}
-
-task zip(type: Zip, dependsOn: build) {
-	from('dist') {
-		exclude('libs')
-	}
-	into('libs') {
-		from(configurations.runtime)
-	}
-	into('game') {
-		from(jar)
-	}
-	into('login') {
-		from(loginJar)
-	}
-	
-	baseName = 'L2J_Server_' + new Date().format("yyyy-MM-dd")
-	println 'Build in build/distributions/' + baseName + '.zip'
-}
-
-build.finalizedBy(zip)
-
-eclipse {
-	project {
-		name = 'L2J_Server'
-		comment 'L2J Server Project'
-		natures 'org.eclipse.buildship.core.gradleprojectbuilde'
-	}
-	jdt {
-		file {
-			whenMerged {jdt ->
-				def propertiesField = org.gradle.plugins.ide.internal.generator.PropertiesPersistableConfigurationObject.getDeclaredField('properties')
-				propertiesField.accessible = true
-				Properties properties = propertiesField.get(jdt)
-				properties.setProperty 'org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch', 'ignore'
-			}
-		}
-	}
-}

+ 0 - 502
dist/doc/3rdPartyLicenses/c3p0.txt

@@ -1,502 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!

+ 0 - 173
dist/doc/3rdPartyLicenses/mail.txt

@@ -1,173 +0,0 @@
-      			README
-			    ======
-
-	    JavaMail(TM) API 1.5.0 release
-	    ------------------------------
-
-Welcome to the JavaMail API 1.5.0 release!  This release includes
-versions of the JavaMail API implementation, IMAP, SMTP, and POP3
-service providers, some examples, and documentation for the JavaMail
-API.
-
-Please see the FAQ at http://www.oracle.com/technetwork/java/javamail/faq/
-
-JDK Version notes
------------------
-
-The JavaMail API supports JDK 1.5 or higher.  Note that we have
-currently tested this implementation with JDK 1.5, 1.6, and 1.7.
-
-While JavaMail will work with JAF 1.0.2, we recommend the use of JAF 1.1
-or newer.  JAF 1.1.1 is currently the newest version.  Note that JAF 1.1
-is included in JDK 1.6 and JAF 1.1.1 is included in JDK 1.6.0_10 and
-later.
-
-
-Protocols supported
--------------------
-
-This release supports the following Internet standard mail protocols:
-
-    IMAP - a message Store protocol, for reading messages from a server
-    POP3 - a message Store protocol, for reading messages from a server
-    SMTP - a message Transport protocol, for sending messages to a server
-
-The following table lists the names of the supported protocols (as used
-in the JavaMail API) and their capabilities:
-
-	Protocol	Store or	Uses	Supports
-	Name		Transport?	SSL?	STARTTLS?
-	-------------------------------------------------
-	imap		Store		No	Yes
-	imaps		Store		Yes	N/A
-	gimap		Store		Yes	N/A
-	pop3		Store		No	Yes
-	pop3s		Store		Yes	N/A
-	smtp		Transport	No	Yes
-	smtps		Transport	Yes	N/A
-
-See our web page at http://www.oracle.com/technetwork/java/javamail/
-for the latest information on third party protocol providers.
-
-
-Download
---------
-
-See the JavaMail project page to download this release.
-
-	http://javamail.java.net
-
-
-Requirements
-------------
-
-Note that the JavaMail API requires the JavaBeans(TM) Activation
-Framework package to be installed as well if you're using JDK 1.5.
-Download the latest version of the JavaBeans Activation Framework from
-
-	http://www.oracle.com/technetwork/java/javase/index-jsp-136939.html
-
-and install it in a suitable location.
-
-
-Installation
-------------
-
-  UNIX/Linux
-  ----------
-
-  1. Download the javax.mail.jar file from the JavaMail project website.
-     http://java.net/projects/javamail/downloads/download/javax.mail.jar
-
-  2. Set your CLASSPATH to include the "javax.mail.jar" file obtained from
-     the download, as well as the current directory.
-
-     Assuming you have downloaded javax.mail.jar to the /u/me/download/
-     directory, the following would work:
-
-      export CLASSPATH=$CLASSPATH:/u/me/download/javax.mail.jar:.
-
-    (Don't forget the trailing "." for the current directory.)
-    Also, if you're using JDK 1.5, include the "activation.jar" file that you
-    obtained from downloading the JavaBeans Activation Framework.  For example:
-
-      export CLASSPATH=$CLASSPATH:/u/me/download/activation/activation.jar
-
-  3. Download the javamail-samples.zip file from the project website.
-     http://java.net/projects/javamail/downloads/download/javamail-samples.zip
-
-  4. Compile any sample program using your Java compiler. For example:
-
-      javac msgshow.java
-
-  5. Run the sample program.  The '-' option lists the required and optional
-     command-line options to successfully run any sample.  For example:
-
-      java msgshow -
-
-    lists the available options.  And
-
-      java msgshow -T imap -H <mailserver> -U <username> -P <passwd> -f INBOX 5
-
-    uses the IMAP protocol to display message number 5 from your INBOX.
-
-  (Additional instructions on how to run the simple mail reader sample
-  and servlet sample are provided in client/README.txt and servlet/README.txt,
-  respectively.)
-
-
-  Windows
-  -------
-
-  1. Download the javax.mail.jar file from the JavaMail project website.
-     http://java.net/projects/javamail/downloads/download/javax.mail.jar
-
-  2. Set your CLASSPATH to include the "javax.mail.jar" file obtained from
-     the download, as well as the current directory.
-
-     Assuming you have downloaded javax.mail.jar to the /u/me/download/
-     directory, the following would work:
-
-      set CLASSPATH=%CLASSPATH%;c:\download\javax.mail.jar;.
-
-    (Don't forget the trailing "." for the current directory.)
-    Also, if you're using JDK 1.5, include the "activation.jar" file that you
-    obtained from downloading the JavaBeans Activation Framework.  For example:
-
-      set CLASSPATH=%CLASSPATH%;c:\download\activation\activation.jar
-
-  3. Download the javamail-samples.zip file from the project website.
-     http://java.net/projects/javamail/downloads/download/javamail-samples.zip
-
-  4. Compile any sample program using your Java compiler. For example:
-
-      javac msgshow.java
-
-  5. Run the sample program.  The '-' option lists the required and optional
-     command-line options to successfully run any sample.  For example:
-
-      java msgshow -
-
-    lists the available options.  And
-
-      java msgshow -T imap -H <mailserver> -U <username> -P <passwd> -f INBOX 5
-
-    uses the IMAP protocol to display message number 5 from your INBOX.
-
-  (Additional instructions on how to run the simple mail reader sample
-  and servlet sample are provided in client/README.txt and servlet/README.txt,
-  respectively.)
-
-
-Problems?
----------
-
-The JavaMail FAQ at http://www.oracle.com/technetwork/java/javamail/faq/
-includes information on protocols supported, installation problems,
-debugging tips, etc.
-
-See the NOTES.txt file for information on how to report bugs.
-
-Enjoy!
-
-The JavaMail API Team

+ 0 - 43
dist/doc/3rdPartyLicenses/mysql-connector-java.txt

@@ -1,43 +0,0 @@
-MySQL Connector/J @MYSQL_CJ_VERSION@ (formerly MM.MySQL)
-Sun Microsystem's JDBC Driver for MySQL
-Copyright 2003-2008 MySQL AB, 2008 Sun Microsystems
-
-CONTENTS
-
-* License
-* Documentation Location
-
-
-LICENSE
-
-MySQL Connector/J is licensed under the GPL or a commercial license
-from Sun Microsystems. 
-
-If you have licensed this product under the GPL, please see the COPYING
-file for more information. 
-
-There are special exceptions to the terms and conditions of the GPL 
-as it is applied to this software. View the full text of the 
-exception in file EXCEPTIONS-CONNECTOR-J in the directory of this 
-software distribution.
-
-If you have licensed this product under a commercial license from
-MySQL AB, please see the file "LICENSE.mysql" that comes with this 
-distribution for the terms of the license.
-
-If you need non-GPL licenses for commercial distribution please contact 
-me <mark@mysql.com> or <sales@mysql.com>.
-
-
-DOCUMENTATION LOCATION
- 
-The documentation formerly contained in this file has moved into the 
-'doc' directory, where it is available in HTML, PDF and plaintext
-forms.
-
-You may also find the latest copy of the documentation on the MySQL
-website at http://dev.mysql.com/doc/refman/5.0/en/connector-j.html
-
---
-This software is OSI Certified Open Source Software.
-OSI Certified is a certification mark of the Open Source Initiative.

+ 0 - 502
dist/doc/3rdPartyLicenses/weupnp.txt

@@ -1,502 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!

+ 0 - 674
dist/doc/L2J_Server_LICENSE.txt

@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.

+ 0 - 297
dist/doc/L2J_Server_README.txt

@@ -1,297 +0,0 @@
-NOTE: This short guide is for a L2J Server. http://l2jserver.com
-
-If you received this file as a part of a packaged or bundled build:
- 
-L2J only supports L2J software obtained directly from L2J sources.
-
-What this means is, if you obtained L2J from a source other than our SVN or nightly distribution,
-you need to get support from where you got the files.
-We are unable to provide any technical assistance for unsupported software packages. 
-The software may have viruses, cause security problems, 
-or even send your personal information to remote servers without your express consent. 
-We cannot recommend the use of any of these packages on a server.
-
-WARNING: L2J Server is not a plug and play type of server. 
-To setup the server and to run it successfully you need to do a lot of reading.
-If reading and learning are not something you like to do,
-Stop now.
-
-====================
-L2J Server 
-====================
-
-TOC:
-I.    OVERVIEW
-II.   LEGAL 
-III.  REQUIREMENTS
-IV.   FIRST STARTUP
-V.    ADMIN/GM's GUIDE
-VI.   PLAYER's GUIDE
-VII.  UPDATING
-VIII. TROUBLESHOOTING
-IX.   CONTACT
-X.    CONTRIBUTING
-XI.   BUG REPORTING
-XII.  CREDITS
-
-  
-
-====================
-I. OVERVIEW
-====================
-
-L2J is an Alternative Lineage 2 Game Server written in pure Java for
-best compatibility. L2J gives you the possibility to legally host a game
-server for this popular Korean MMO created by NCSoft. It is still
-unfinished and many features are missing, but L2J Dev team is working
-hard on implementing them. L2J Server is distributed under the terms
-of GNU/GPL in a hope that open source model is the best for
-developing quality software giving everyone a possibility to
-participate on development by submitting the code.
-
-
-====================
-II. LEGAL
-====================
-
-Copyright (C) 2004-2015 L2J Server
-
-This file is part of L2J Server.
-
-L2J Server is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-L2J Server is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Full GNU/GPL License is included in L2J_Server_LICENSE.txt file.
-
-Whereas L2J is distributed under the terms of GNU/GPL, we require you to:
-a) Preserve login notice. This gives us, L2J Developers, appropriate
-credit for our hard work done during our free time without any
-revenues.
- 
-b) Do not distribute any extended data files with the server files in
-the same archive. NO world content should be incorporated in L2J
-distribution.
-Server and Datapack may not be not be bundled or packaged.
-
-====================
-III. REQUIREMENTS
-====================
-
-OS:
-Any OS having Java JDK 1.8 installed and properly configured!
-    We recommend using SUN JDK available at java.sun.com
-
-Hardware: 
-Decent CPU & RAM
-
-Software:
-Java JDK 1.8
-MySql
-Datapack
-
-We recommend:
-That you do not play and host the server from the same computer. 
-Have a good Internet connection - dial up just won't cut it.
-Many low cost hosting options are available.
-
-====================
-IV. FIRST STARTUP
-====================
-
-Before you can start up the server it is extremely important to read 
-and get to know the wiki sites.
-They contain all the info you need to setup and run a L2J Server.
-
-L2J Server wiki: Server Guides, How-to's, bugtracker:
-https://www.l2jserver.com/trac/wiki
-
-L2J-Datapack wiki: Datapack Guides, How-to's, bugtracker:
-http://www.l2jdp.com/trac/wiki
-
-This Server distribution does not contain any spawn/drop data or any world
-content. (Datapack)
-
-L2J Server has also a possibility to change exp/sp/drop rates relative
-to data in spawnlist/droplist files. To do that, just change the rates 
-you need in server.properties file found in config folder.
-
-You should also configure your IP address in server.properties. 
-
-Server uses ports 2106 (LoginServer) and 7777 (GameServer) by
-default. If your server runs behind NAT or firewall you will need to
-open and/or forward these ports. 
-
-
-====================
-V. ADMIN/GM's GUIDE
-====================
-
-To make someone an admin you need to edit the l2j database.
-
-For accounts take a look into the 'accounts' table(loginserver database).
-Change the value of the 'accessLevel' column to one of the following:
-- < 0: banned account
-- 0: user account
-- > 0: admin/gm account (bypass max player limit)
-
-For characters take a look into the 'characters' table(gameserver database).
-Change the value of the 'accessLevel' column to one of the access levels
-described in the 'game/config/accessLevels.xml' table.
-
-To adjust the allowed admin commands for an access level take a look into
-'game/config/adminCommands.xml'.  
- 
-More info can be found in the community wiki.
- 
-Admin commands implemented:
-(Please see https://l2jserver.com/trac/wiki/GmCommands for more complete list.)
-//admin = main GM interface
-//gmchat = will send a message to all online GMs
-//invul = makes your character untouchable
-
-====================
-VI. PLAYER's GUIDE
-====================
-
-CLIENT COMPATIBILITY
-Our server is dependent on the official release of the North American lineage2 live client.
-http://www.lineage2.com
-All help and support will only be for the official client. 
-Any clients obtained elsewhere, must obtain support from where it was obtained.
-
-====================
-VI. UPDATING
-====================
-It may arrive that you want to update your server to new version while
-keeping old accounts. There are few steps you HAVE TO do in order to
-keep the data accurate.
-
-- You should ALWAYS look at timelines before updating, sometimes a file
-  format may change, so you will need to edit data manually to fit with
-  new format.
-- You should ALWAYS Backup all MySql data.
-- You should ALWAYS Backup all Server and Datapack files.
-- back up all .properties files (don't forget to check if new server use same 
-  format for those files)
-- download & unzip new server code to the Server directory
-- download & unzip new datapack code to the Server directory
-- edit and run update in the tools folder
-- run newly installed server & enjoy ;)
-
-
-====================
-VIII. TROUBLESHOOTING
-====================
-
-PROBLEM
-- Client outputs bunch of messages about missing templates.
-SOLUTION
-- Check that the datapack has been properly installed.
-
-PROBLEM
-- Message similar to "java is not recognized as internal command",
-"java not found" or "unknown command: java" appears.
-SOLUTION
-- Install java, or, if java is already installed just add your java
-binary directory to system PATH setting. If you don't know how to do
-that, than DO NOT bother running your own server please.
-
-PROBLEM
-- I can log in but ping is 9999s and I can't get past Server Select.
-SOLUTION
-- Set up your IP's properly, forward/open good ports if accessing from
-outside. (or find server with admin that knows how to do it)
-
-PROBLEM
-- Skills/quests/whatever don't work.
-SOLUTION
-- Patience brings it's fruits :p
-
-PROBLEM
-- I found a bug.
-SOLUTION
-- Please refer to BUG REPORTING section of this read-me.
-
-Further help available at the wiki sites and the forums.
-
-
-====================
-IX. CONTACT
-====================
-
-Website: http://www.l2jserver.com
-Forum: http://www.l2jserver.com/forum
-IRC: #l2j @ Freenode (irc.freenode.net)
-
-Please note that L2J Devs can't help players with connecting issues or
-anything related to playing on private servers. If you can't connect,
-you should contact your server GM's. We can solve only L2J server
-~software~ related issues. We don't have any backdoors or anything
-that would enable us GM accounts on every server using L2J, so there's
-no point in coming to our channel if you need items/adena/whatever
-ingame.
-
-
-====================
-X. CONTRIBUTING
-====================
-
-Anyone who wants to contribute to the project is encouraged to do so. Java
-programming skills are not always required as L2J needs much more than
-java code.
-
-If you created any source code that may be helpful please use the User Contributions
-section on our forums. If you contributed good stuff that will be
-accepted, you might be invited to join L2J Dev Team.
-
-People willing to hang on chat and respond to user questions are also
-ALWAYS welcome ;)
-
-
-====================
-XI. BUG REPORTING
-====================
-
-Bugs can be reported on our wiki site.
-http://l2jserver.com/trac/newticket
-Basic rules for reporting are:
-    Please report only one bug/issue per ticket!!
-    You must include the revision (changeset) number when reporting a bug!
-    "The latest" does not mean anything when 5 more updates have been done since you set up the server.
-If you are not sure if it should be reported here, make a post about it in the L2J forum.
-
-Players should ALWAYS consult bugs with their Admin/GM's and have them report it
-on our wiki site. Some bugs may be caused by bad datapack, server
-installation or modifications server owner has made. We can't help you
-in that case.
-
-Please use the datapacks bugtracker for reporting datapack bugs.
-Please do NOT report bugs related to unofficial add-ons to L2J. L2J
-bugtracker is NOT a place to fix that. Contact the person who made
-modification instead.
-
-
-====================
-XII. CREDITS
-====================
-
-Dev team: 
-http://www.l2jserver.com/forum/memberlist.php?mode=leaders
-
-Have fun playing L2J ;)
-Dev Team
-
-    L2J Server, Copyright (C) 2004-2012 
-    L2J Server comes with ABSOLUTELY NO WARRANTY.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions.

+ 0 - 7
dist/game/console.cfg

@@ -1,7 +0,0 @@
-# Default global logging level.
-# This specifies which kinds of events are logged across
-# all loggers.  For any given facility this global level
-# can be overridden by a facility specific level
-# Note that the ConsoleHandler also has a separate level
-# setting to limit messages printed to the console.
-.level=OFF

BIN
dist/libs/mmocore.jar


+ 0 - 11
dist/login/LoginServer_loop.sh

@@ -1,11 +0,0 @@
-#!/bin/bash
-
-err=1
-until [ $err == 0 ]; 
-do
-	[ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"
-	[ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"
-	java -Xms128m -Xmx256m -jar l2jlogin.jar > log/stdout.log 2>&1
-	err=$?
-	sleep 10;
-done

+ 0 - 7
dist/login/banned_ip.cfg

@@ -1,7 +0,0 @@
-# Subnets can be defined like 123.45.0.0
-# Comments after # are ignored
-# Expiration timestamp can be added after IP for when to disable the ban
-# Example:
-# 192.168.0.0 1237618800000  # Bans all address starting with 192.168 and will expire on 21 Mar 2009 07:00:00 GMT
-10.255.255.255
-10.254.254.254

+ 0 - 65
dist/login/config/Email.properties

@@ -1,65 +0,0 @@
-# ---------------------------------------------------------------------------
-# Email Settings
-# ---------------------------------------------------------------------------
-# The defaults are set to be retail-like. If you modify any of these settings your server will deviate from being retail-like.
-# Warning: 
-# Please take extreme caution when changing anything. Also please understand what you are changing before you do so on a live server.
-# ---------------------------------------------------------------------------
-# Server Information
-# ---------------------------------------------------------------------------
-
-# Server Name
-# Default: Unconfigured L2J Server
-ServerInfoName = Unconfigured L2J Server
-
-# Contact Address
-# Default: info@unconfl2j.com
-ServerInfoAddress = info@myl2jserver.com
-
-# ---------------------------------------------------------------------------
-# E-mail System Settings
-# ---------------------------------------------------------------------------
-
-# Enable Email System
-# Default: False
-EmailSystemEnabled = False
-
-# Select Query for Email Addresses
-# Default: SELECT value FROM account_data WHERE account_name=? AND var='email_addr'
-EmailDBSelectQuery = SELECT value FROM account_data WHERE account_name=? AND var='email_addr'
-
-# Email Address Field
-# Default: value
-EmailDBField = value
-
-# Mail Server Host
-# Default: smtp.gmail.com
-SmtpServerHost = smtp.gmail.com
-
-# Mail Server Port
-# Default: 465
-SmtpServerPort = 465
-
-# Auth SMTP
-# Default: True
-SmtpAuthRequired = True
-
-# Mail Socket Factory
-# Default: javax.net.ssl.SSLSocketFactory
-SmtpFactory = javax.net.ssl.SSLSocketFactory
-
-# Mail Factory Callback
-# Default: False
-SmtpFactoryCallback = False
-
-# Mail Server Auth - Username
-# Default: exampleuser
-SmtpUsername = user@gmail.com
-
-# Mail Server Auth - Password
-# Default: examplepass
-SmtpPassword = password
-
-# Mail Address
-# Default: None
-EmailSystemAddress = noreply@myl2jserver.com

+ 0 - 141
dist/login/config/LoginServer.properties

@@ -1,141 +0,0 @@
-# ---------------------------------------------------------------------------
-# Login Server Settings
-# ---------------------------------------------------------------------------
-# This is the server configuration file. Here you can set up the connection information for your server.
-# This was written with the assumption that you are behind a router.
-# Dumbed Down Definitions...
-# LAN (LOCAL area network) - typically consists of computers connected to the same router as you.
-# WAN (WIDE area network) - typically consists of computers OUTSIDE of your router (ie. the internet).
-# x.x.x.x - Format of an IP address. Do not include the x'es into settings. Must be real numbers.
-# ---------------------------------------------------------------------------
-# Networking
-# ---------------------------------------------------------------------------
-
-# Enables automatic port mapping for login server.
-# If you have a router login server will request for port forwarding.
-# Default: True
-EnableUPnP = True
-
-# Bind ip of the LoginServer, use * to bind on all available IPs
-# WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u>
-# WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u>
-# Default: * (0.0.0.0)
-LoginserverHostname = *
-
-# Default: 2106
-LoginserverPort = 2106
-
-# The address on which login will listen for GameServers, use * to bind on all available IPs
-# WARNING: <u><b><font color="red">Please don't change default IPs here if you don't know what are you doing!</font></b></u>
-# WARNING: <u><b><font color="red">External/Internal IPs are now inside "ipconfig.xml" file.</font></b></u>
-# Default: 127.0.0.1
-LoginHostname = 127.0.0.1
-
-# The port on which login will listen for GameServers
-# Default: 9014
-LoginPort = 9014
-
-# ---------------------------------------------------------------------------
-# Security
-# ---------------------------------------------------------------------------
-
-# How many times you can provide an invalid account/pass before the IP gets banned.
-# Default: 5
-LoginTryBeforeBan = 5
-
-# Time you won't be able to login back again after LoginTryBeforeBan tries to login.
-# Default: 900 (15 minutes)
-LoginBlockAfterBan = 900
-
-# If set to True any GameServer can register on your login's free slots
-# Default: True
-AcceptNewGameServer = True
-
-# Flood Protection. All values are in milliseconds.
-# Default: True
-EnableFloodProtection = True
-
-# Default: 15
-FastConnectionLimit = 15
-
-# Default: 700
-NormalConnectionTime = 700
-
-# Default: 350
-FastConnectionTime = 350
-
-# Default: 50
-MaxConnectionPerIP = 50
-
-# ---------------------------------------------------------------------------
-# Database
-# ---------------------------------------------------------------------------
-
-# Specify the appropriate driver and url for the database you're using.
-# Examples:
-# Driver = com.mysql.jdbc.Driver
-# Driver = org.hsqldb.jdbcDriver
-# Driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
-# Driver = org.mariadb.jdbc.Driver
-# Default: com.mysql.jdbc.Driver
-Driver = com.mysql.jdbc.Driver
-# Database URL
-# URL = jdbc:mysql://localhost/l2jls?useSSL=false&serverTimezone=UTC
-# URL = jdbc:hsqldb:hsql://localhost/l2jls
-# URL = jdbc:sqlserver://localhost/database = l2jls/user = sa/password = 
-# URL = jdbc:mariadb://localhost/l2jls
-# Default: jdbc:mysql://localhost/l2jls?useSSL=false&serverTimezone=UTC
-URL = jdbc:mysql://localhost/l2jls?useSSL=false&serverTimezone=UTC
-# Database user info (default is "root" but it's not recommended)
-Login = root
-# Database connection password
-Password = toor
-
-# Database Connection Pool
-# Default: HikariCP
-# Available: BoneCP, C3P0, HikariCP
-ConnectionPool = HikariCP
-
-# Default: 10
-MaximumDbConnections = 10
-
-# Default: 0
-MaximumDbIdleTime = 0
-
-# Connection close time.
-# Default: 60000
-ConnectionCloseTime = 60000
-
-
-# ---------------------------------------------------------------------------
-# Misc.
-# ---------------------------------------------------------------------------
-
-# If False, the license (after the login) will not be shown.
-# Default: True
-ShowLicence = True
-
-# Default: True
-AutoCreateAccounts = True
-
-# Datapack root directory.
-# Defaults to current directory from which the server is started.
-DatapackRoot = .
-
-# ---------------------------------------------------------------------------
-# Developer Settings
-# ---------------------------------------------------------------------------
-
-# Default: False
-Debug = False
-
-# ---------------------------------------------------------------------------
-# Restart LS every 24 hours?
-# ---------------------------------------------------------------------------
-
-# Enable disable scheduled login restart.
-# Default: False
-LoginRestartSchedule = False
-# Time in hours.
-# Default: 24
-LoginRestartTime = 24

+ 0 - 24
dist/login/config/MMO.properties

@@ -1,24 +0,0 @@
-#---------------------------------------------------------------
-# MMO
-#---------------------------------------------------------------
-
-# Sleep time for all Selectors
-# After he finished his job the Selector waits the given time in milliseconds
-# Lower values will speed up the loop and the Ping is smaller
-SleepTime = 20
-
-# Every loop it send a maximum of the given packages to each connection
-# Lower values will speed up the loop and the Ping is smaller but cause less output
-MaxSendPerPass = 12
-
-# Every loop it read a maximum of the given packages from each connection
-# Lower values will speed up the loop and the Ping is smaller but cause less input
-MaxReadPerPass = 12
-
-# Each unfinished read/write need a TEMP storage Buffer
-# on large player amount we need more Buffers
-# if there are not enough buffers new ones are generated but not stored for future usage
-HelperBufferCount = 20
-
-# Setting this to True will lower your ping, at the cost of an increase in bandwidth consumption.
-TcpNoDelay = False

+ 0 - 28
dist/login/config/Telnet.properties

@@ -1,28 +0,0 @@
-# ---------------------------------------------------------------------------
-# Telnet Settings
-# ---------------------------------------------------------------------------
-# The defaults are set to be retail-like. If you modify any of these settings your server will deviate from being retail-like.
-# Warning: 
-# Please take extreme caution when changing anything. Also please understand what you are changing before you do so on a live server.
-# ---------------------------------------------------------------------------
-
-# Allows text based monitoring and administration of L2J LS
-# by using a telnet client. Communication protocol is insecure
-# and you should use SSL tunnels, VPN, etc. if you plan to connect
-# over non-trusted channels.
-# Default: False
-EnableTelnet = False
-
-# This is the port L2J should listen to for incoming telnet
-# requests.
-# Default: 12345
-StatusPort = 12345
-
-# If the following is not set, a random password is generated on server startup.
-# Usage: StatusPW = somePass
-StatusPW =
-
-# This list can contain IPs or Hosts of clients you wish to allow. Hostnames must be resolvable to an IP.
-# Example: 0.0.0.0,host,0.0.0.1,host2,host3,host4,0.0.0.3
-# Default: 127.0.0.1,localhost
-ListOfHosts = 127.0.0.1,localhost

+ 0 - 7
dist/login/console.cfg

@@ -1,7 +0,0 @@
-# Default global logging level.
-# This specifies which kinds of events are logged across
-# all loggers.  For any given facility this global level
-# can be overriden by a facility specific level
-# Note that the ConsoleHandler also has a separate level
-# setting to limit messages printed to the console.
-.level=OFF

+ 0 - 4
dist/login/data/mail/MailList.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MailList.xsd">
-	<mail id="SATempBan" file="html/SecAuthTempBan.htm" subject="Your account has been temporarily suspended" />
-</list>

+ 0 - 16
dist/login/data/mail/MailList.xsd

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema xmlns="http://www.w3.org/2001/XMLSchema">
-	<element name="list">
-		<complexType>
-			<sequence minOccurs="1" maxOccurs="1">
-				<element name="mail" minOccurs="1" maxOccurs="1">
-					<complexType>
-						<attribute name="file" type="token" use="required" />
-						<attribute name="id" type="token" use="required" />
-						<attribute name="subject" type="normalizedString" use="required" />
-					</complexType>
-				</element>
-			</sequence>
-		</complexType>
-	</element>
-</schema>

+ 0 - 15
dist/login/data/mail/html/SecAuthTempBan.htm

@@ -1,15 +0,0 @@
-Greetings,<br>
-<br>
-We have temporally suspended your account:<br>
-<br>
-Account Name: %accountname%<br>
-Reason: Typed wrong character password %var1% times in row from ip %var0%.<br>
-Consequences: Your account has been temporaly suspended for %var2% minutes.<br>
-<br>
-If you've lost your your character password, you can recover them by <a href="%var3%">clicking here</a>.<br>
-<br>
-If you have any question, <a href="mailto:%servermail%">click here</a> to send an email to the administrator.<br>
-Regards,<br>
-%servername% Game Master Team<br>
-<br>
-<p align="center">Powered By: <a href="http://www.l2jserver.com/">L2J Server</a></p>

+ 0 - 130
dist/login/data/servername.xml

@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<servers_list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="servername.xsd">
-	<server id="1" name="Bartz" />
-	<server id="2" name="Sieghardt" />
-	<server id="3" name="Kain" />
-	<server id="4" name="Lionna" />
-	<server id="5" name="Erica" />
-	<server id="6" name="Gustin" />
-	<server id="7" name="Devianne" />
-	<server id="8" name="Hindemith" />
-	<server id="9" name="Teon (EURO)" />
-	<server id="10" name="Franz (EURO)" />
-	<server id="11" name="Luna (EURO)" />
-	<server id="12" name="Sayha" />
-	<server id="13" name="Aria" />
-	<server id="14" name="Phoenix" />
-	<server id="15" name="Chronos" />
-	<server id="16" name="Naia (EURO)" />
-	<server id="17" name="Elhwynna" />
-	<server id="18" name="Ellikia" />
-	<server id="19" name="Shikken" />
-	<server id="20" name="Scryde" />
-	<server id="21" name="Frikios" />
-	<server id="22" name="Ophylia" />
-	<server id="23" name="Shakdun" />
-	<server id="24" name="Tarziph" />
-	<server id="25" name="Aria" />
-	<server id="26" name="Esenn" />
-	<server id="27" name="Elcardia" />
-	<server id="28" name="Yiana" />
-	<server id="29" name="Seresin" />
-	<server id="30" name="Tarkai" />
-	<server id="31" name="Khadia" />
-	<server id="32" name="Roien" />
-	<server id="33" name="Kallint (Non-PvP)" />
-	<server id="34" name="Baium" />
-	<server id="35" name="Kamael" />
-	<server id="36" name="Beleth" />
-	<server id="37" name="Anakim" />
-	<server id="38" name="Lilith" />
-	<server id="39" name="Thifiel" />
-	<server id="40" name="Lithra" />
-	<server id="41" name="Lockirin" />
-	<server id="42" name="Kakai" />
-	<server id="43" name="Cadmus" />
-	<server id="44" name="Athebaldt" />
-	<server id="45" name="Blackbird" />
-	<server id="46" name="Ramsheart" />
-	<server id="47" name="Esthus" />
-	<server id="48" name="Vasper" />
-	<server id="49" name="Lancer" />
-	<server id="50" name="Ashton" />
-	<server id="51" name="Waytrel" />
-	<server id="52" name="Waltner" />
-	<server id="53" name="Tahnford" />
-	<server id="54" name="Hunter" />
-	<server id="55" name="Dewell" />
-	<server id="56" name="Rodemaye" />
-	<server id="57" name="Ken Rauhel" />
-	<server id="58" name="Ken Abigail" />
-	<server id="59" name="Ken Orwen" />
-	<server id="60" name="Van Holter" />
-	<server id="61" name="Desperion" />
-	<server id="62" name="Einhovant" />
-	<server id="63" name="Shunaiman" />
-	<server id="64" name="Faris" />
-	<server id="65" name="Tor" />
-	<server id="66" name="Carneiar" />
-	<server id="67" name="Dwyllios" />
-	<server id="68" name="Baium" />
-	<server id="69" name="Hallate" />
-	<server id="70" name="Zaken" />
-	<server id="71" name="Core" />
-	<server id="72" name="72" />
-	<server id="73" name="73" />
-	<server id="74" name="74" />
-	<server id="75" name="75" />
-	<server id="76" name="76" />
-	<server id="77" name="77" />
-	<server id="78" name="78" />
-	<server id="79" name="79" />
-	<server id="80" name="80" />
-	<server id="81" name="81" />
-	<server id="82" name="82" />
-	<server id="83" name="83" />
-	<server id="84" name="84" />
-	<server id="85" name="85" />
-	<server id="86" name="86" />
-	<server id="87" name="87" />
-	<server id="88" name="88" />
-	<server id="89" name="89" />
-	<server id="90" name="90" />
-	<server id="91" name="91" />
-	<server id="92" name="92" />
-	<server id="93" name="93" />
-	<server id="94" name="94" />
-	<server id="95" name="95" />
-	<server id="96" name="96" />
-	<server id="97" name="97" />
-	<server id="98" name="98" />
-	<server id="99" name="99" />
-	<server id="100" name="100" />
-	<server id="101" name="101" />
-	<server id="102" name="102" />
-	<server id="103" name="103" />
-	<server id="104" name="104" />
-	<server id="105" name="105" />
-	<server id="106" name="106" />
-	<server id="107" name="107" />
-	<server id="108" name="108" />
-	<server id="109" name="109" />
-	<server id="110" name="110" />
-	<server id="111" name="111" />
-	<server id="112" name="112" />
-	<server id="113" name="113" />
-	<server id="114" name="114" />
-	<server id="115" name="115" />
-	<server id="116" name="116" />
-	<server id="117" name="117" />
-	<server id="118" name="118" />
-	<server id="119" name="119" />
-	<server id="120" name="120" />
-	<server id="121" name="121" />
-	<server id="122" name="122" />
-	<server id="123" name="123" />
-	<server id="124" name="124" />
-	<server id="125" name="125" />
-	<server id="126" name="126" />
-	<server id="127" name="???" />
-</servers_list>

+ 0 - 22
dist/login/data/servername.xsd

@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-	<xs:element name="servers_list">
-		<xs:complexType>
-			<xs:sequence minOccurs="1" maxOccurs="1">
-				<xs:element name="server" minOccurs="127" maxOccurs="127">
-					<xs:complexType>
-						<xs:attribute name="id" use="required">
-							<xs:simpleType>
-								<xs:restriction base="xs:integer">
-									<xs:minInclusive value="1" />
-									<xs:maxInclusive value="127" />
-								</xs:restriction>
-							</xs:simpleType>
-						</xs:attribute>
-						<xs:attribute name="name" type="xs:normalizedString" use="required" />
-					</xs:complexType>
-				</xs:element>
-			</xs:sequence>
-		</xs:complexType>
-	</xs:element>
-</xs:schema>

+ 0 - 162
dist/login/log.cfg

@@ -1,162 +0,0 @@
-############################################################
-#  	Global properties
-############################################################
-
-# "handlers" specifies a comma separated list of log Handler 
-# classes.  These handlers will be installed during VM startup.
-# Note that these classes must be on the system classpath.
-# By default we only configure a ConsoleHandler, which will only
-# show messages at the INFO and above levels.
-#handlers= java.util.logging.ConsoleHandler
-
-# To also add the FileHandler, use the following line instead.
-handlers = java.util.logging.FileHandler,\
-		java.util.logging.ConsoleHandler,\
-		com.l2jserver.log.handler.ErrorLogHandler
-chat.handlers = com.l2jserver.log.handler.ChatLogHandler
-chat.useParentHandlers = false
-gmaudit.handlers = com.l2jserver.log.handler.GMAuditLogHandler
-gmaudit.useParentHandlers = false
-item.handlers = com.l2jserver.log.handler.ItemLogHandler
-item.useParentHandlers = false
-audit.handlers = com.l2jserver.log.handler.AuditLogHandler
-audit.useParentHandlers = false
-enchant.handlers = com.l2jserver.log.handler.EnchantItemLogHandler,\
-		com.l2jserver.log.handler.EnchantSkillLogHandler
-enchant.useParentHandlers = false
-olympiad.handlers = com.l2jserver.log.handler.OlympiadLogHandler
-olympiad.useParentHandlers = false
-damage.handlers = com.l2jserver.log.handler.AllDamageLogHandler,\
-		com.l2jserver.log.handler.PDamageLogHandler,\
-		com.l2jserver.log.handler.MDamageLogHandler
-damage.useParentHandlers = false
-accounting.handlers = com.l2jserver.log.handler.AccountingLogHandler
-accounting.useParentHandlers = false
-
-# Default global logging level.
-# This specifies which kinds of events are logged across
-# all loggers.  For any given facility this global level
-# can be overriden by a facility specific level
-# Note that the ConsoleHandler also has a separate level
-# setting to limit messages printed to the console.
-.level= CONFIG
-
-############################################################
-# Handler specific properties.
-# Describes specific configuration info for Handlers.
-############################################################
-
-# default file output is in user's home directory.
-java.util.logging.FileHandler.pattern = log/java%g.log
-java.util.logging.FileHandler.count = 20
-java.util.logging.FileHandler.limit = 0
-java.util.logging.FileHandler.formatter = com.l2jserver.log.formatter.FileLogFormatter
-java.util.logging.FileHandler.level = CONFIG
-
-# Limit the message that are printed on the console to INFO and above.
-java.util.logging.ConsoleHandler.level = FINER
-java.util.logging.ConsoleHandler.formatter = com.l2jserver.log.formatter.ConsoleLogFormatter
-
-# log errors (exceptions)
-com.l2jserver.log.handler.ErrorLogHandler.pattern = log/error%g.log
-com.l2jserver.log.handler.ErrorLogHandler.count = 20
-com.l2jserver.log.handler.ErrorLogHandler.limit = 0
-com.l2jserver.log.handler.ErrorLogHandler.formatter = java.util.logging.SimpleFormatter
-com.l2jserver.log.handler.ErrorLogHandler.filter = com.l2jserver.log.filter.ErrorFilter
-com.l2jserver.log.handler.ErrorLogHandler.level = CONFIG
-
-# log chats
-com.l2jserver.log.handler.ChatLogHandler.pattern = log/chat.log
-com.l2jserver.log.handler.ChatLogHandler.formatter = com.l2jserver.log.formatter.ChatLogFormatter
-com.l2jserver.log.handler.ChatLogHandler.filter = com.l2jserver.log.filter.ChatFilter
-com.l2jserver.log.handler.ChatLogHandler.append = true
-com.l2jserver.log.handler.ChatLogHandler.level = INFO
-
-# log GM Audit
-com.l2jserver.log.handler.GMAuditLogHandler.pattern = log/gmaudit.log
-com.l2jserver.log.handler.GMAuditLogHandler.formatter = com.l2jserver.log.formatter.GMAuditFormatter
-com.l2jserver.log.handler.GMAuditLogHandler.filter = com.l2jserver.log.filter.GMAuditFilter
-com.l2jserver.log.handler.GMAuditLogHandler.append = true
-com.l2jserver.log.handler.GMAuditLogHandler.level = INFO
-
-# log items
-com.l2jserver.log.handler.ItemLogHandler.pattern = log/item.log
-com.l2jserver.log.handler.ItemLogHandler.formatter = com.l2jserver.log.formatter.ItemLogFormatter
-com.l2jserver.log.handler.ItemLogHandler.filter = com.l2jserver.log.filter.ItemFilter
-com.l2jserver.log.handler.ItemLogHandler.append = true
-com.l2jserver.log.handler.ItemLogHandler.level = INFO
-
-# audit
-com.l2jserver.log.handler.AuditLogHandler.pattern = log/audit.log
-com.l2jserver.log.handler.AuditLogHandler.formatter = com.l2jserver.log.formatter.AuditFormatter
-com.l2jserver.log.handler.AuditLogHandler.filter = com.l2jserver.log.filter.AuditFilter
-com.l2jserver.log.handler.AuditLogHandler.append = true
-com.l2jserver.log.handler.AuditLogHandler.level = INFO
-
-# enchant item log
-com.l2jserver.log.handler.EnchantItemLogHandler.pattern = log/enchantitem.log
-com.l2jserver.log.handler.EnchantItemLogHandler.formatter = com.l2jserver.log.formatter.EnchantFormatter
-com.l2jserver.log.handler.EnchantItemLogHandler.filter = com.l2jserver.log.filter.EnchantItemFilter
-com.l2jserver.log.handler.EnchantItemLogHandler.append = true
-com.l2jserver.log.handler.EnchantItemLogHandler.level = INFO
-
-# enchant skill log
-com.l2jserver.log.handler.EnchantSkillLogHandler.pattern = log/enchantskill.log
-com.l2jserver.log.handler.EnchantSkillLogHandler.formatter = com.l2jserver.log.formatter.EnchantFormatter
-com.l2jserver.log.handler.EnchantSkillLogHandler.filter = com.l2jserver.log.filter.EnchantSkillFilter
-com.l2jserver.log.handler.EnchantSkillLogHandler.append = true
-com.l2jserver.log.handler.EnchantSkillLogHandler.level = INFO
-
-# olympiad log
-com.l2jserver.log.handler.OlympiadLogHandler.pattern = log/olympiad.csv
-com.l2jserver.log.handler.OlympiadLogHandler.formatter = com.l2jserver.log.formatter.OlympiadFormatter
-com.l2jserver.log.handler.OlympiadLogHandler.append = true
-com.l2jserver.log.handler.OlympiadLogHandler.level = INFO
-
-# damage logs
-com.l2jserver.log.handler.AllDamageLogHandler.pattern = log/game/_all.txt
-com.l2jserver.log.handler.AllDamageLogHandler.formatter = com.l2jserver.log.formatter.DamageFormatter
-com.l2jserver.log.handler.AllDamageLogHandler.append = true
-com.l2jserver.log.handler.AllDamageLogHandler.level = INFO
-
-com.l2jserver.log.handler.PDamageLogHandler.pattern = log/game/damage_pdam.txt
-com.l2jserver.log.handler.PDamageLogHandler.formatter = com.l2jserver.log.formatter.DamageFormatter
-com.l2jserver.log.handler.PDamageLogHandler.filter = com.l2jserver.log.filter.PDamageFilter
-com.l2jserver.log.handler.PDamageLogHandler.append = true
-com.l2jserver.log.handler.PDamageLogHandler.level = INFO
-
-com.l2jserver.log.handler.MDamageLogHandler.pattern = log/game/damage_mdam.txt
-com.l2jserver.log.handler.MDamageLogHandler.formatter = com.l2jserver.log.formatter.DamageFormatter
-com.l2jserver.log.handler.MDamageLogHandler.filter = com.l2jserver.log.filter.MDamageFilter
-com.l2jserver.log.handler.MDamageLogHandler.append = true
-com.l2jserver.log.handler.MDamageLogHandler.level = INFO
-
-# accounting
-com.l2jserver.log.handler.AccountingLogHandler.pattern = log/accounting.log
-com.l2jserver.log.handler.AccountingLogHandler.formatter = com.l2jserver.log.formatter.AccountingFormatter
-com.l2jserver.log.handler.AccountingLogHandler.append = true
-com.l2jserver.log.handler.AccountingLogHandler.level = CONFIG
-
-############################################################
-# Facility specific properties.
-# Provides extra control for each logger.
-############################################################
-
-# For example, set the com.xyz.foo logger to only log SEVERE
-# messages:
-com.l2jserver.gameserver.level = CONFIG
-com.l2jserver.loginserver.level = CONFIG
-#com.l2jserver.gameserver.Connection.level = CONFIG
-com.l2jserver.gameserver.network.serverpackets.level = FINER
-com.l2jserver.gameserver.network.clientpackets.level = FINER
-com.l2jserver.gameserver.model.actor.L2Character.level = FINER
-com.l2jserver.gameserver.engines.DocumentEngine.level = INFO
-
-# Alt Privileges Administration
-AltPrivilegesAdmin.pattern = log/admin-commands.log
-AltPrivilegesAdmin.formatter = com.l2jserver.log.formatter.FileLogFormatter
-AltPrivilegesAdmin.append = true
-AltPrivilegesAdmin.level = CONFIG
-
-# c3p0 Logging
-com.mchange.v2.level = WARNING

+ 0 - 29
dist/login/startLoginServer.bat

@@ -1,29 +0,0 @@
-@echo off
-title Login Server Console
-
-:start
-echo Starting L2J Login Server.
-echo.
-
-java -Xms128m -Xmx256m -jar l2jlogin.jar
-
-if ERRORLEVEL 2 goto restart
-if ERRORLEVEL 1 goto error
-goto end
-
-:restart
-echo.
-echo Admin Restarted Login Server.
-echo.
-goto start
-
-:error
-echo.
-echo Login Server terminated abnormally!
-echo.
-
-:end
-echo.
-echo Login Server Terminated.
-echo.
-pause

+ 0 - 3
dist/login/startLoginServer.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-
-./LoginServer_loop.sh &

BIN
gradle/wrapper/gradle-wrapper.jar


+ 0 - 5
gradle/wrapper/gradle-wrapper.properties

@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists

+ 0 - 172
gradlew

@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
-    echo "$*"
-}
-
-die () {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-  NONSTOP* )
-    nonstop=true
-    ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-    JAVACMD=`cygpath --unix "$JAVACMD"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Escape application args
-save () {
-    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
-    echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
-  cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"

+ 0 - 84
gradlew.bat

@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem  Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega

+ 72 - 0
pom.xml

@@ -0,0 +1,72 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.l2jserver</groupId>
+	<artifactId>l2j-server-game</artifactId>
+	<version>2.6.1.0-SNAPSHOT</version>
+	<name>L2J Game Server</name>
+	<properties>
+		<maven.compiler.source>11</maven.compiler.source>
+		<maven.compiler.target>11</maven.compiler.target>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<slf4j.version>1.7.25</slf4j.version>
+		<log4j.version>2.11.1</log4j.version>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.logging.log4j</groupId>
+			<artifactId>log4j-slf4j-impl</artifactId>
+			<version>${log4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.logging.log4j</groupId>
+			<artifactId>log4j-core</artifactId>
+			<version>${log4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.mdkt.compiler</groupId>
+			<artifactId>InMemoryJavaCompiler</artifactId>
+			<version>1.3.0</version>
+		</dependency>
+		<dependency>
+			<groupId>com.google.code.gson</groupId>
+			<artifactId>gson</artifactId>
+			<version>2.8.5</version>
+		</dependency>
+		<dependency>
+			<groupId>org.bitlet</groupId>
+			<artifactId>weupnp</artifactId>
+			<version>0.1.4</version>
+		</dependency>
+		<dependency>
+			<groupId>com.l2jserver</groupId>
+			<artifactId>l2j-server-commons</artifactId>
+			<version>2.6.1.0-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>com.l2jserver</groupId>
+			<artifactId>l2j-geodriver</artifactId>
+			<version>1.0</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/resources/libs/L2J_GeoDriver.jar</systemPath>
+		</dependency>
+		<!-- Test -->
+		<dependency>
+			<groupId>org.testng</groupId>
+			<artifactId>testng</artifactId>
+			<version>6.14.3</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-core</artifactId>
+			<version>2.24.5</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>

+ 0 - 4078
src/main/java/com/l2jserver/Config.java

@@ -1,4078 +0,0 @@
-/*
- * Copyright © 2004-2019 L2J Server
- *
- * This file is part of L2J Server.
- *
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.math.BigInteger;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.InterfaceAddress;
-import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-import com.l2jserver.gameserver.GameServer;
-import com.l2jserver.gameserver.enums.IllegalActionPunishmentType;
-import com.l2jserver.gameserver.model.L2World;
-import com.l2jserver.gameserver.model.holders.ItemHolder;
-import com.l2jserver.gameserver.model.itemcontainer.Inventory;
-import com.l2jserver.gameserver.util.FloodProtectorConfig;
-import com.l2jserver.gameserver.util.Util;
-import com.l2jserver.util.PropertiesParser;
-import com.l2jserver.util.StringUtil;
-import com.l2jserver.util.data.xml.IXmlReader;
-
-/**
- * This class loads all the game server related configurations from files.<br>
- * The files are usually located in config folder in server root folder.<br>
- * Each configuration has a default value (that should reflect retail behavior).
- */
-public final class Config
-{
-	private static final Logger LOG = LoggerFactory.getLogger(Config.class);
-	
-	/**
-	 * Informs(logs) the scripts being loaded.<BR>
-	 * Apply only when executing script from files.<BR>
-	 */
-	public static final boolean VERBOSE_LOADING = false;
-	
-	// --------------------------------------------------
-	// Constants
-	// --------------------------------------------------
-	public static final String EOL = System.lineSeparator();
-	
-	// --------------------------------------------------
-	// L2J Property File Definitions
-	// --------------------------------------------------
-	public static final String CHARACTER_CONFIG_FILE = "./config/Character.properties";
-	public static final String FEATURE_CONFIG_FILE = "./config/Feature.properties";
-	public static final String FORTSIEGE_CONFIGURATION_FILE = "./config/FortSiege.properties";
-	public static final String GENERAL_CONFIG_FILE = "./config/General.properties";
-	public static final String HEXID_FILE = "./config/hexid.txt";
-	public static final String ID_CONFIG_FILE = "./config/IdFactory.properties";
-	public static final String L2JMOD_CONFIG_FILE = "./config/L2JMods.properties";
-	public static final String LOGIN_CONFIGURATION_FILE = "./config/LoginServer.properties";
-	public static final String NPC_CONFIG_FILE = "./config/NPC.properties";
-	public static final String PVP_CONFIG_FILE = "./config/PVP.properties";
-	public static final String RATES_CONFIG_FILE = "./config/Rates.properties";
-	public static final String CONFIGURATION_FILE = "./config/Server.properties";
-	public static final String IP_CONFIG_FILE = "./config/ipconfig.xml";
-	public static final String SIEGE_CONFIGURATION_FILE = "./config/Siege.properties";
-	public static final String TW_CONFIGURATION_FILE = "./config/TerritoryWar.properties";
-	public static final String TELNET_FILE = "./config/Telnet.properties";
-	public static final String FLOOD_PROTECTOR_FILE = "./config/FloodProtector.properties";
-	public static final String MMO_CONFIG_FILE = "./config/MMO.properties";
-	public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.properties";
-	public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.properties";
-	public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.properties";
-	public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt";
-	public static final String EMAIL_CONFIG_FILE = "./config/Email.properties";
-	public static final String CH_SIEGE_FILE = "./config/ConquerableHallSiege.properties";
-	public static final String GEODATA_FILE = "./config/GeoData.properties";
-	// --------------------------------------------------
-	// L2J Variable Definitions
-	// --------------------------------------------------
-	public static boolean ALT_GAME_DELEVEL;
-	public static boolean DECREASE_SKILL_LEVEL;
-	public static double ALT_WEIGHT_LIMIT;
-	public static int RUN_SPD_BOOST;
-	public static int DEATH_PENALTY_CHANCE;
-	public static double RESPAWN_RESTORE_CP;
-	public static double RESPAWN_RESTORE_HP;
-	public static double RESPAWN_RESTORE_MP;
-	public static boolean ENABLE_MODIFY_SKILL_DURATION;
-	public static Map<Integer, Integer> SKILL_DURATION_LIST;
-	public static boolean ENABLE_MODIFY_SKILL_REUSE;
-	public static Map<Integer, Integer> SKILL_REUSE_LIST;
-	public static boolean AUTO_LEARN_SKILLS;
-	public static boolean AUTO_LEARN_FS_SKILLS;
-	public static boolean AUTO_LOOT_HERBS;
-	public static byte BUFFS_MAX_AMOUNT;
-	public static byte TRIGGERED_BUFFS_MAX_AMOUNT;
-	public static byte DANCES_MAX_AMOUNT;
-	public static boolean DANCE_CANCEL_BUFF;
-	public static boolean DANCE_CONSUME_ADDITIONAL_MP;
-	public static boolean ALT_STORE_DANCES;
-	public static boolean AUTO_LEARN_DIVINE_INSPIRATION;
-	public static boolean ALT_GAME_CANCEL_BOW;
-	public static boolean ALT_GAME_CANCEL_CAST;
-	public static boolean ALT_GAME_MAGICFAILURES;
-	public static int PLAYER_FAKEDEATH_UP_PROTECTION;
-	public static boolean STORE_SKILL_COOLTIME;
-	public static boolean SUBCLASS_STORE_SKILL_COOLTIME;
-	public static boolean SUMMON_STORE_SKILL_COOLTIME;
-	public static boolean ALT_GAME_SHIELD_BLOCKS;
-	public static int ALT_PERFECT_SHLD_BLOCK;
-	public static long EFFECT_TICK_RATIO;
-	public static boolean ALLOW_CLASS_MASTERS;
-	public static ClassMasterSettings CLASS_MASTER_SETTINGS;
-	public static boolean ALLOW_ENTIRE_TREE;
-	public static boolean ALTERNATE_CLASS_MASTER;
-	public static boolean LIFE_CRYSTAL_NEEDED;
-	public static boolean ES_SP_BOOK_NEEDED;
-	public static boolean DIVINE_SP_BOOK_NEEDED;
-	public static boolean ALT_GAME_SKILL_LEARN;
-	public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
-	public static boolean ALT_GAME_SUBCLASS_EVERYWHERE;
-	public static boolean ALLOW_TRANSFORM_WITHOUT_QUEST;
-	public static int FEE_DELETE_TRANSFER_SKILLS;
-	public static int FEE_DELETE_SUBCLASS_SKILLS;
-	public static boolean RESTORE_SERVITOR_ON_RECONNECT;
-	public static boolean RESTORE_PET_ON_RECONNECT;
-	public static double MAX_BONUS_EXP;
-	public static double MAX_BONUS_SP;
-	public static int MAX_RUN_SPEED;
-	public static int MAX_PCRIT_RATE;
-	public static int MAX_MCRIT_RATE;
-	public static int MAX_PATK_SPEED;
-	public static int MAX_MATK_SPEED;
-	public static int MAX_EVASION;
-	public static int MIN_ABNORMAL_STATE_SUCCESS_RATE;
-	public static int MAX_ABNORMAL_STATE_SUCCESS_RATE;
-	public static int MAX_PLAYER_LEVEL;
-	public static int MAX_PET_LEVEL;
-	public static byte MAX_SUBCLASS;
-	public static int BASE_SUBCLASS_LEVEL;
-	public static int MAX_SUBCLASS_LEVEL;
-	public static int MAX_PVTSTORESELL_SLOTS_DWARF;
-	public static int MAX_PVTSTORESELL_SLOTS_OTHER;
-	public static int MAX_PVTSTOREBUY_SLOTS_DWARF;
-	public static int MAX_PVTSTOREBUY_SLOTS_OTHER;
-	public static int INVENTORY_MAXIMUM_NO_DWARF;
-	public static int INVENTORY_MAXIMUM_DWARF;
-	public static int INVENTORY_MAXIMUM_GM;
-	public static int INVENTORY_MAXIMUM_QUEST_ITEMS;
-	public static int WAREHOUSE_SLOTS_DWARF;
-	public static int WAREHOUSE_SLOTS_NO_DWARF;
-	public static int WAREHOUSE_SLOTS_CLAN;
-	public static int ALT_FREIGHT_SLOTS;
-	public static int ALT_FREIGHT_PRICE;
-	public static boolean ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE;
-	public static boolean ALT_GAME_KARMA_PLAYER_CAN_SHOP;
-	public static boolean ALT_GAME_KARMA_PLAYER_CAN_TELEPORT;
-	public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_GK;
-	public static boolean ALT_GAME_KARMA_PLAYER_CAN_TRADE;
-	public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE;
-	public static int MAX_PERSONAL_FAME_POINTS;
-	public static int FORTRESS_ZONE_FAME_TASK_FREQUENCY;
-	public static int FORTRESS_ZONE_FAME_AQUIRE_POINTS;
-	public static int CASTLE_ZONE_FAME_TASK_FREQUENCY;
-	public static int CASTLE_ZONE_FAME_AQUIRE_POINTS;
-	public static boolean FAME_FOR_DEAD_PLAYERS;
-	public static boolean IS_CRAFTING_ENABLED;
-	public static boolean CRAFT_MASTERWORK;
-	public static int DWARF_RECIPE_LIMIT;
-	public static int COMMON_RECIPE_LIMIT;
-	public static boolean ALT_GAME_CREATION;
-	public static double ALT_GAME_CREATION_SPEED;
-	public static double ALT_GAME_CREATION_XP_RATE;
-	public static double ALT_GAME_CREATION_RARE_XPSP_RATE;
-	public static double ALT_GAME_CREATION_SP_RATE;
-	public static boolean ALT_BLACKSMITH_USE_RECIPES;
-	public static int ALT_CLAN_LEADER_DATE_CHANGE;
-	public static String ALT_CLAN_LEADER_HOUR_CHANGE;
-	public static boolean ALT_CLAN_LEADER_INSTANT_ACTIVATION;
-	public static int ALT_CLAN_JOIN_DAYS;
-	public static int ALT_CLAN_CREATE_DAYS;
-	public static int ALT_CLAN_DISSOLVE_DAYS;
-	public static int ALT_ALLY_JOIN_DAYS_WHEN_LEAVED;
-	public static int ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED;
-	public static int ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED;
-	public static int ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED;
-	public static int ALT_MAX_NUM_OF_CLANS_IN_ALLY;
-	public static int ALT_CLAN_MEMBERS_FOR_WAR;
-	public static boolean ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH;
-	public static boolean REMOVE_CASTLE_CIRCLETS;
-	public static int ALT_PARTY_RANGE;
-	public static int ALT_PARTY_RANGE2;
-	public static boolean ALT_LEAVE_PARTY_LEADER;
-	public static boolean INITIAL_EQUIPMENT_EVENT;
-	public static long STARTING_ADENA;
-	public static int STARTING_LEVEL;
-	public static int STARTING_SP;
-	public static long MAX_ADENA;
-	public static boolean AUTO_LOOT;
-	public static boolean AUTO_LOOT_RAIDS;
-	public static int LOOT_RAIDS_PRIVILEGE_INTERVAL;
-	public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE;
-	public static int UNSTUCK_INTERVAL;
-	public static int TELEPORT_WATCHDOG_TIMEOUT;
-	public static int PLAYER_SPAWN_PROTECTION;
-	public static List<Integer> SPAWN_PROTECTION_ALLOWED_ITEMS;
-	public static int PLAYER_TELEPORT_PROTECTION;
-	public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
-	public static boolean OFFSET_ON_TELEPORT_ENABLED;
-	public static int MAX_OFFSET_ON_TELEPORT;
-	public static boolean PETITIONING_ALLOWED;
-	public static int MAX_PETITIONS_PER_PLAYER;
-	public static int MAX_PETITIONS_PENDING;
-	public static boolean ALT_GAME_FREE_TELEPORT;
-	public static int DELETE_DAYS;
-	public static float ALT_GAME_EXPONENT_XP;
-	public static float ALT_GAME_EXPONENT_SP;
-	public static String PARTY_XP_CUTOFF_METHOD;
-	public static double PARTY_XP_CUTOFF_PERCENT;
-	public static int PARTY_XP_CUTOFF_LEVEL;
-	public static int[][] PARTY_XP_CUTOFF_GAPS;
-	public static int[] PARTY_XP_CUTOFF_GAP_PERCENTS;
-	public static boolean DISABLE_TUTORIAL;
-	public static boolean EXPERTISE_PENALTY;
-	public static boolean STORE_RECIPE_SHOPLIST;
-	public static boolean STORE_UI_SETTINGS;
-	public static Set<String> FORBIDDEN_NAMES;
-	public static boolean SILENCE_MODE_EXCLUDE;
-	public static boolean ALT_VALIDATE_TRIGGER_SKILLS;
-	
-	// --------------------------------------------------
-	// ClanHall Settings
-	// --------------------------------------------------
-	public static long CH_TELE_FEE_RATIO;
-	public static int CH_TELE1_FEE;
-	public static int CH_TELE2_FEE;
-	public static long CH_ITEM_FEE_RATIO;
-	public static int CH_ITEM1_FEE;
-	public static int CH_ITEM2_FEE;
-	public static int CH_ITEM3_FEE;
-	public static long CH_MPREG_FEE_RATIO;
-	public static int CH_MPREG1_FEE;
-	public static int CH_MPREG2_FEE;
-	public static int CH_MPREG3_FEE;
-	public static int CH_MPREG4_FEE;
-	public static int CH_MPREG5_FEE;
-	public static long CH_HPREG_FEE_RATIO;
-	public static int CH_HPREG1_FEE;
-	public static int CH_HPREG2_FEE;
-	public static int CH_HPREG3_FEE;
-	public static int CH_HPREG4_FEE;
-	public static int CH_HPREG5_FEE;
-	public static int CH_HPREG6_FEE;
-	public static int CH_HPREG7_FEE;
-	public static int CH_HPREG8_FEE;
-	public static int CH_HPREG9_FEE;
-	public static int CH_HPREG10_FEE;
-	public static int CH_HPREG11_FEE;
-	public static int CH_HPREG12_FEE;
-	public static int CH_HPREG13_FEE;
-	public static long CH_EXPREG_FEE_RATIO;
-	public static int CH_EXPREG1_FEE;
-	public static int CH_EXPREG2_FEE;
-	public static int CH_EXPREG3_FEE;
-	public static int CH_EXPREG4_FEE;
-	public static int CH_EXPREG5_FEE;
-	public static int CH_EXPREG6_FEE;
-	public static int CH_EXPREG7_FEE;
-	public static long CH_SUPPORT_FEE_RATIO;
-	public static int CH_SUPPORT1_FEE;
-	public static int CH_SUPPORT2_FEE;
-	public static int CH_SUPPORT3_FEE;
-	public static int CH_SUPPORT4_FEE;
-	public static int CH_SUPPORT5_FEE;
-	public static int CH_SUPPORT6_FEE;
-	public static int CH_SUPPORT7_FEE;
-	public static int CH_SUPPORT8_FEE;
-	public static long CH_CURTAIN_FEE_RATIO;
-	public static int CH_CURTAIN1_FEE;
-	public static int CH_CURTAIN2_FEE;
-	public static long CH_FRONT_FEE_RATIO;
-	public static int CH_FRONT1_FEE;
-	public static int CH_FRONT2_FEE;
-	public static boolean CH_BUFF_FREE;
-	// --------------------------------------------------
-	// Castle Settings
-	// --------------------------------------------------
-	public static long CS_TELE_FEE_RATIO;
-	public static int CS_TELE1_FEE;
-	public static int CS_TELE2_FEE;
-	public static long CS_MPREG_FEE_RATIO;
-	public static int CS_MPREG1_FEE;
-	public static int CS_MPREG2_FEE;
-	public static long CS_HPREG_FEE_RATIO;
-	public static int CS_HPREG1_FEE;
-	public static int CS_HPREG2_FEE;
-	public static long CS_EXPREG_FEE_RATIO;
-	public static int CS_EXPREG1_FEE;
-	public static int CS_EXPREG2_FEE;
-	public static long CS_SUPPORT_FEE_RATIO;
-	public static int CS_SUPPORT1_FEE;
-	public static int CS_SUPPORT2_FEE;
-	public static List<Integer> SIEGE_HOUR_LIST;
-	public static int OUTER_DOOR_UPGRADE_PRICE2;
-	public static int OUTER_DOOR_UPGRADE_PRICE3;
-	public static int OUTER_DOOR_UPGRADE_PRICE5;
-	public static int INNER_DOOR_UPGRADE_PRICE2;
-	public static int INNER_DOOR_UPGRADE_PRICE3;
-	public static int INNER_DOOR_UPGRADE_PRICE5;
-	public static int WALL_UPGRADE_PRICE2;
-	public static int WALL_UPGRADE_PRICE3;
-	public static int WALL_UPGRADE_PRICE5;
-	public static int TRAP_UPGRADE_PRICE1;
-	public static int TRAP_UPGRADE_PRICE2;
-	public static int TRAP_UPGRADE_PRICE3;
-	public static int TRAP_UPGRADE_PRICE4;
-	
-	// --------------------------------------------------
-	// Fortress Settings
-	// --------------------------------------------------
-	public static long FS_TELE_FEE_RATIO;
-	public static int FS_TELE1_FEE;
-	public static int FS_TELE2_FEE;
-	public static long FS_MPREG_FEE_RATIO;
-	public static int FS_MPREG1_FEE;
-	public static int FS_MPREG2_FEE;
-	public static long FS_HPREG_FEE_RATIO;
-	public static int FS_HPREG1_FEE;
-	public static int FS_HPREG2_FEE;
-	public static long FS_EXPREG_FEE_RATIO;
-	public static int FS_EXPREG1_FEE;
-	public static int FS_EXPREG2_FEE;
-	public static long FS_SUPPORT_FEE_RATIO;
-	public static int FS_SUPPORT1_FEE;
-	public static int FS_SUPPORT2_FEE;
-	public static int FS_BLOOD_OATH_COUNT;
-	public static int FS_UPDATE_FRQ;
-	public static int FS_MAX_SUPPLY_LEVEL;
-	public static int FS_FEE_FOR_CASTLE;
-	public static int FS_MAX_OWN_TIME;
-	// --------------------------------------------------
-	// Feature Settings
-	// --------------------------------------------------
-	public static int TAKE_FORT_POINTS;
-	public static int LOOSE_FORT_POINTS;
-	public static int TAKE_CASTLE_POINTS;
-	public static int LOOSE_CASTLE_POINTS;
-	public static int CASTLE_DEFENDED_POINTS;
-	public static int FESTIVAL_WIN_POINTS;
-	public static int HERO_POINTS;
-	public static int ROYAL_GUARD_COST;
-	public static int KNIGHT_UNIT_COST;
-	public static int KNIGHT_REINFORCE_COST;
-	public static int BALLISTA_POINTS;
-	public static int BLOODALLIANCE_POINTS;
-	public static int BLOODOATH_POINTS;
-	public static int KNIGHTSEPAULETTE_POINTS;
-	public static int REPUTATION_SCORE_PER_KILL;
-	public static int JOIN_ACADEMY_MIN_REP_SCORE;
-	public static int JOIN_ACADEMY_MAX_REP_SCORE;
-	public static int RAID_RANKING_1ST;
-	public static int RAID_RANKING_2ND;
-	public static int RAID_RANKING_3RD;
-	public static int RAID_RANKING_4TH;
-	public static int RAID_RANKING_5TH;
-	public static int RAID_RANKING_6TH;
-	public static int RAID_RANKING_7TH;
-	public static int RAID_RANKING_8TH;
-	public static int RAID_RANKING_9TH;
-	public static int RAID_RANKING_10TH;
-	public static int RAID_RANKING_UP_TO_50TH;
-	public static int RAID_RANKING_UP_TO_100TH;
-	public static int CLAN_LEVEL_6_COST;
-	public static int CLAN_LEVEL_7_COST;
-	public static int CLAN_LEVEL_8_COST;
-	public static int CLAN_LEVEL_9_COST;
-	public static int CLAN_LEVEL_10_COST;
-	public static int CLAN_LEVEL_11_COST;
-	public static int CLAN_LEVEL_6_REQUIREMENT;
-	public static int CLAN_LEVEL_7_REQUIREMENT;
-	public static int CLAN_LEVEL_8_REQUIREMENT;
-	public static int CLAN_LEVEL_9_REQUIREMENT;
-	public static int CLAN_LEVEL_10_REQUIREMENT;
-	public static int CLAN_LEVEL_11_REQUIREMENT;
-	public static boolean ALLOW_WYVERN_ALWAYS;
-	public static boolean ALLOW_WYVERN_DURING_SIEGE;
-	
-	// --------------------------------------------------
-	// General Settings
-	// --------------------------------------------------
-	public static boolean EVERYBODY_HAS_ADMIN_RIGHTS;
-	public static boolean SERVER_LIST_BRACKET;
-	public static int SERVER_LIST_TYPE;
-	public static int SERVER_LIST_AGE;
-	public static boolean SERVER_GMONLY;
-	public static boolean GM_HERO_AURA;
-	public static boolean GM_STARTUP_INVULNERABLE;
-	public static boolean GM_STARTUP_INVISIBLE;
-	public static boolean GM_STARTUP_SILENCE;
-	public static boolean GM_STARTUP_AUTO_LIST;
-	public static boolean GM_STARTUP_DIET_MODE;
-	public static boolean GM_ITEM_RESTRICTION;
-	public static boolean GM_SKILL_RESTRICTION;
-	public static boolean GM_TRADE_RESTRICTED_ITEMS;
-	public static boolean GM_RESTART_FIGHTING;
-	public static boolean GM_ANNOUNCER_NAME;
-	public static boolean GM_CRITANNOUNCER_NAME;
-	public static boolean GM_GIVE_SPECIAL_SKILLS;
-	public static boolean GM_GIVE_SPECIAL_AURA_SKILLS;
-	public static boolean GAMEGUARD_ENFORCE;
-	public static boolean GAMEGUARD_PROHIBITACTION;
-	public static boolean LOG_CHAT;
-	public static boolean LOG_AUTO_ANNOUNCEMENTS;
-	public static boolean LOG_ITEMS;
-	public static boolean LOG_ITEMS_SMALL_LOG;
-	public static boolean LOG_ITEM_ENCHANTS;
-	public static boolean LOG_SKILL_ENCHANTS;
-	public static boolean GMAUDIT;
-	public static boolean SKILL_CHECK_ENABLE;
-	public static boolean SKILL_CHECK_REMOVE;
-	public static boolean SKILL_CHECK_GM;
-	public static boolean DEBUG;
-	public static boolean DEBUG_INSTANCES;
-	public static boolean HTML_ACTION_CACHE_DEBUG;
-	public static boolean PACKET_HANDLER_DEBUG;
-	public static boolean DEVELOPER;
-	public static boolean NO_HANDLERS;
-	public static boolean NO_QUESTS;
-	public static boolean ALT_DEV_NO_SPAWNS;
-	public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS;
-	public static boolean ALT_DEV_SHOW_SCRIPTS_LOAD_IN_LOGS;
-	public static int THREAD_P_EFFECTS;
-	public static int THREAD_P_GENERAL;
-	public static int THREAD_E_EVENTS;
-	public static int GENERAL_PACKET_THREAD_CORE_SIZE;
-	public static int IO_PACKET_THREAD_CORE_SIZE;
-	public static int GENERAL_THREAD_CORE_SIZE;
-	public static int AI_MAX_THREAD;
-	public static int EVENT_MAX_THREAD;
-	public static int CLIENT_PACKET_QUEUE_SIZE;
-	public static int CLIENT_PACKET_QUEUE_MAX_BURST_SIZE;
-	public static int CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND;
-	public static int CLIENT_PACKET_QUEUE_MEASURE_INTERVAL;
-	public static int CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND;
-	public static int CLIENT_PACKET_QUEUE_MAX_FLOODS_PER_MIN;
-	public static int CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN;
-	public static int CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN;
-	public static int CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN;
-	public static boolean DEADLOCK_DETECTOR;
-	public static int DEADLOCK_CHECK_INTERVAL;
-	public static boolean RESTART_ON_DEADLOCK;
-	public static boolean ALLOW_DISCARDITEM;
-	public static int AUTODESTROY_ITEM_AFTER;
-	public static int HERB_AUTO_DESTROY_TIME;
-	public static List<Integer> LIST_PROTECTED_ITEMS;
-	public static boolean DATABASE_CLEAN_UP;
-	public static long CONNECTION_CLOSE_TIME;
-	public static int CHAR_STORE_INTERVAL;
-	public static boolean LAZY_ITEMS_UPDATE;
-	public static boolean UPDATE_ITEMS_ON_CHAR_STORE;
-	public static boolean DESTROY_DROPPED_PLAYER_ITEM;
-	public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM;
-	public static boolean SAVE_DROPPED_ITEM;
-	public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD;
-	public static int SAVE_DROPPED_ITEM_INTERVAL;
-	public static boolean CLEAR_DROPPED_ITEM_TABLE;
-	public static boolean AUTODELETE_INVALID_QUEST_DATA;
-	public static boolean PRECISE_DROP_CALCULATION;
-	public static boolean MULTIPLE_ITEM_DROP;
-	public static boolean FORCE_INVENTORY_UPDATE;
-	public static boolean LAZY_CACHE;
-	public static boolean CACHE_CHAR_NAMES;
-	public static int MIN_NPC_ANIMATION;
-	public static int MAX_NPC_ANIMATION;
-	public static int MIN_MONSTER_ANIMATION;
-	public static int MAX_MONSTER_ANIMATION;
-	public static boolean ENABLE_FALLING_DAMAGE;
-	public static boolean GRIDS_ALWAYS_ON;
-	public static int GRID_NEIGHBOR_TURNON_TIME;
-	public static int GRID_NEIGHBOR_TURNOFF_TIME;
-	public static boolean MOVE_BASED_KNOWNLIST;
-	public static long KNOWNLIST_UPDATE_INTERVAL;
-	public static int PEACE_ZONE_MODE;
-	public static String DEFAULT_GLOBAL_CHAT;
-	public static String DEFAULT_TRADE_CHAT;
-	public static boolean ALLOW_WAREHOUSE;
-	public static boolean WAREHOUSE_CACHE;
-	public static int WAREHOUSE_CACHE_TIME;
-	public static boolean ALLOW_REFUND;
-	public static boolean ALLOW_MAIL;
-	public static boolean ALLOW_ATTACHMENTS;
-	public static boolean ALLOW_WEAR;
-	public static int WEAR_DELAY;
-	public static int WEAR_PRICE;
-	public static int INSTANCE_FINISH_TIME;
-	public static boolean RESTORE_PLAYER_INSTANCE;
-	public static boolean ALLOW_SUMMON_IN_INSTANCE;
-	public static int EJECT_DEAD_PLAYER_TIME;
-	public static boolean ALLOW_LOTTERY;
-	public static boolean ALLOW_RACE;
-	public static boolean ALLOW_WATER;
-	public static boolean ALLOW_RENTPET;
-	public static boolean ALLOWFISHING;
-	public static boolean ALLOW_BOAT;
-	public static int BOAT_BROADCAST_RADIUS;
-	public static boolean ALLOW_CURSED_WEAPONS;
-	public static boolean ALLOW_MANOR;
-	public static boolean ALLOW_PET_WALKERS;
-	public static boolean SERVER_NEWS;
-	public static boolean ENABLE_COMMUNITY_BOARD;
-	public static String BBS_DEFAULT;
-	public static boolean USE_SAY_FILTER;
-	public static String CHAT_FILTER_CHARS;
-	public static int[] BAN_CHAT_CHANNELS;
-	public static int ALT_OLY_START_TIME;
-	public static int ALT_OLY_MIN;
-	public static int ALT_OLY_MAX_BUFFS;
-	public static long ALT_OLY_CPERIOD;
-	public static long ALT_OLY_BATTLE;
-	public static long ALT_OLY_WPERIOD;
-	public static long ALT_OLY_VPERIOD;
-	public static int ALT_OLY_START_POINTS;
-	public static int ALT_OLY_WEEKLY_POINTS;
-	public static int ALT_OLY_CLASSED;
-	public static int ALT_OLY_NONCLASSED;
-	public static int ALT_OLY_TEAMS;
-	public static int ALT_OLY_REG_DISPLAY;
-	public static int[][] ALT_OLY_CLASSED_REWARD;
-	public static int[][] ALT_OLY_NONCLASSED_REWARD;
-	public static int[][] ALT_OLY_TEAM_REWARD;
-	public static int ALT_OLY_COMP_RITEM;
-	public static int ALT_OLY_MIN_MATCHES;
-	public static int ALT_OLY_GP_PER_POINT;
-	public static int ALT_OLY_HERO_POINTS;
-	public static int ALT_OLY_RANK1_POINTS;
-	public static int ALT_OLY_RANK2_POINTS;
-	public static int ALT_OLY_RANK3_POINTS;
-	public static int ALT_OLY_RANK4_POINTS;
-	public static int ALT_OLY_RANK5_POINTS;
-	public static int ALT_OLY_MAX_POINTS;
-	public static int ALT_OLY_DIVIDER_CLASSED;
-	public static int ALT_OLY_DIVIDER_NON_CLASSED;
-	public static int ALT_OLY_MAX_WEEKLY_MATCHES;
-	public static int ALT_OLY_MAX_WEEKLY_MATCHES_NON_CLASSED;
-	public static int ALT_OLY_MAX_WEEKLY_MATCHES_CLASSED;
-	public static int ALT_OLY_MAX_WEEKLY_MATCHES_TEAM;
-	public static boolean ALT_OLY_LOG_FIGHTS;
-	public static boolean ALT_OLY_SHOW_MONTHLY_WINNERS;
-	public static boolean ALT_OLY_ANNOUNCE_GAMES;
-	public static List<Integer> LIST_OLY_RESTRICTED_ITEMS;
-	public static int ALT_OLY_ENCHANT_LIMIT;
-	public static int ALT_OLY_WAIT_TIME;
-	public static int ALT_MANOR_REFRESH_TIME;
-	public static int ALT_MANOR_REFRESH_MIN;
-	public static int ALT_MANOR_APPROVE_TIME;
-	public static int ALT_MANOR_APPROVE_MIN;
-	public static int ALT_MANOR_MAINTENANCE_MIN;
-	public static boolean ALT_MANOR_SAVE_ALL_ACTIONS;
-	public static int ALT_MANOR_SAVE_PERIOD_RATE;
-	public static long ALT_LOTTERY_PRIZE;
-	public static long ALT_LOTTERY_TICKET_PRICE;
-	public static float ALT_LOTTERY_5_NUMBER_RATE;
-	public static float ALT_LOTTERY_4_NUMBER_RATE;
-	public static float ALT_LOTTERY_3_NUMBER_RATE;
-	public static long ALT_LOTTERY_2_AND_1_NUMBER_PRIZE;
-	public static boolean ALT_ITEM_AUCTION_ENABLED;
-	public static int ALT_ITEM_AUCTION_EXPIRED_AFTER;
-	public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID;
-	public static int FS_TIME_ATTACK;
-	public static int FS_TIME_COOLDOWN;
-	public static int FS_TIME_ENTRY;
-	public static int FS_TIME_WARMUP;
-	public static int FS_PARTY_MEMBER_COUNT;
-	public static int RIFT_MIN_PARTY_SIZE;
-	public static int RIFT_SPAWN_DELAY;
-	public static int RIFT_MAX_JUMPS;
-	public static int RIFT_AUTO_JUMPS_TIME_MIN;
-	public static int RIFT_AUTO_JUMPS_TIME_MAX;
-	public static float RIFT_BOSS_ROOM_TIME_MUTIPLY;
-	public static int RIFT_ENTER_COST_RECRUIT;
-	public static int RIFT_ENTER_COST_SOLDIER;
-	public static int RIFT_ENTER_COST_OFFICER;
-	public static int RIFT_ENTER_COST_CAPTAIN;
-	public static int RIFT_ENTER_COST_COMMANDER;
-	public static int RIFT_ENTER_COST_HERO;
-	public static IllegalActionPunishmentType DEFAULT_PUNISH;
-	public static int DEFAULT_PUNISH_PARAM;
-	public static boolean ONLY_GM_ITEMS_FREE;
-	public static boolean JAIL_IS_PVP;
-	public static boolean JAIL_DISABLE_CHAT;
-	public static boolean JAIL_DISABLE_TRANSACTION;
-	public static boolean CUSTOM_SPAWNLIST_TABLE;
-	public static boolean SAVE_GMSPAWN_ON_CUSTOM;
-	public static boolean CUSTOM_NPC_DATA;
-	public static boolean CUSTOM_TELEPORT_TABLE;
-	public static boolean CUSTOM_NPCBUFFER_TABLES;
-	public static boolean CUSTOM_SKILLS_LOAD;
-	public static boolean CUSTOM_ITEMS_LOAD;
-	public static boolean CUSTOM_MULTISELL_LOAD;
-	public static boolean CUSTOM_BUYLIST_LOAD;
-	public static int ALT_BIRTHDAY_GIFT;
-	public static String ALT_BIRTHDAY_MAIL_SUBJECT;
-	public static String ALT_BIRTHDAY_MAIL_TEXT;
-	public static boolean ENABLE_BLOCK_CHECKER_EVENT;
-	public static int MIN_BLOCK_CHECKER_TEAM_MEMBERS;
-	public static boolean HBCE_FAIR_PLAY;
-	public static boolean HELLBOUND_WITHOUT_QUEST;
-	public static int PLAYER_MOVEMENT_BLOCK_TIME;
-	public static int NORMAL_ENCHANT_COST_MULTIPLIER;
-	public static int SAFE_ENCHANT_COST_MULTIPLIER;
-	public static boolean BOTREPORT_ENABLE;
-	public static String[] BOTREPORT_RESETPOINT_HOUR;
-	public static long BOTREPORT_REPORT_DELAY;
-	public static boolean BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS;
-	
-	// --------------------------------------------------
-	// FloodProtector Settings
-	// --------------------------------------------------
-	public static FloodProtectorConfig FLOOD_PROTECTOR_USE_ITEM;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_ROLL_DICE;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_FIREWORK;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_ITEM_PET_SUMMON;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_HERO_VOICE;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_GLOBAL_CHAT;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_SUBCLASS;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_DROP_ITEM;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_SERVER_BYPASS;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_MULTISELL;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_TRANSACTION;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_MANUFACTURE;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_MANOR;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_SENDMAIL;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_CHARACTER_SELECT;
-	public static FloodProtectorConfig FLOOD_PROTECTOR_ITEM_AUCTION;
-	// --------------------------------------------------
-	// L2JMods Settings
-	// --------------------------------------------------
-	public static boolean L2JMOD_CHAMPION_ENABLE;
-	public static boolean L2JMOD_CHAMPION_PASSIVE;
-	public static int L2JMOD_CHAMPION_FREQUENCY;
-	public static String L2JMOD_CHAMP_TITLE;
-	public static int L2JMOD_CHAMP_MIN_LVL;
-	public static int L2JMOD_CHAMP_MAX_LVL;
-	public static int L2JMOD_CHAMPION_HP;
-	public static float L2JMOD_CHAMPION_REWARDS_EXP_SP;
-	public static float L2JMOD_CHAMPION_REWARDS_CHANCE;
-	public static float L2JMOD_CHAMPION_REWARDS_AMOUNT;
-	public static float L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE;
-	public static float L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT;
-	public static float L2JMOD_CHAMPION_HP_REGEN;
-	public static float L2JMOD_CHAMPION_ATK;
-	public static float L2JMOD_CHAMPION_SPD_ATK;
-	public static int L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE;
-	public static int L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE;
-	public static int L2JMOD_CHAMPION_REWARD_ID;
-	public static int L2JMOD_CHAMPION_REWARD_QTY;
-	public static boolean L2JMOD_CHAMPION_ENABLE_VITALITY;
-	public static boolean L2JMOD_CHAMPION_ENABLE_IN_INSTANCES;
-	public static boolean TVT_EVENT_ENABLED;
-	public static boolean TVT_EVENT_IN_INSTANCE;
-	public static String TVT_EVENT_INSTANCE_FILE;
-	public static String[] TVT_EVENT_INTERVAL;
-	public static int TVT_EVENT_PARTICIPATION_TIME;
-	public static int TVT_EVENT_RUNNING_TIME;
-	public static int TVT_EVENT_PARTICIPATION_NPC_ID;
-	public static int[] TVT_EVENT_PARTICIPATION_NPC_COORDINATES = new int[4];
-	public static int[] TVT_EVENT_PARTICIPATION_FEE = new int[2];
-	public static int TVT_EVENT_MIN_PLAYERS_IN_TEAMS;
-	public static int TVT_EVENT_MAX_PLAYERS_IN_TEAMS;
-	public static int TVT_EVENT_RESPAWN_TELEPORT_DELAY;
-	public static int TVT_EVENT_START_LEAVE_TELEPORT_DELAY;
-	public static String TVT_EVENT_TEAM_1_NAME;
-	public static int[] TVT_EVENT_TEAM_1_COORDINATES = new int[3];
-	public static String TVT_EVENT_TEAM_2_NAME;
-	public static int[] TVT_EVENT_TEAM_2_COORDINATES = new int[3];
-	public static List<int[]> TVT_EVENT_REWARDS;
-	public static boolean TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED;
-	public static boolean TVT_EVENT_SCROLL_ALLOWED;
-	public static boolean TVT_EVENT_POTIONS_ALLOWED;
-	public static boolean TVT_EVENT_SUMMON_BY_ITEM_ALLOWED;
-	public static List<Integer> TVT_DOORS_IDS_TO_OPEN;
-	public static List<Integer> TVT_DOORS_IDS_TO_CLOSE;
-	public static boolean TVT_REWARD_TEAM_TIE;
-	public static byte TVT_EVENT_MIN_LVL;
-	public static byte TVT_EVENT_MAX_LVL;
-	public static int TVT_EVENT_EFFECTS_REMOVAL;
-	public static Map<Integer, Integer> TVT_EVENT_FIGHTER_BUFFS;
-	public static Map<Integer, Integer> TVT_EVENT_MAGE_BUFFS;
-	public static int TVT_EVENT_MAX_PARTICIPANTS_PER_IP;
-	public static boolean TVT_ALLOW_VOICED_COMMAND;
-	public static boolean L2JMOD_ALLOW_WEDDING;
-	public static int L2JMOD_WEDDING_PRICE;
-	public static boolean L2JMOD_WEDDING_PUNISH_INFIDELITY;
-	public static boolean L2JMOD_WEDDING_TELEPORT;
-	public static int L2JMOD_WEDDING_TELEPORT_PRICE;
-	public static int L2JMOD_WEDDING_TELEPORT_DURATION;
-	public static boolean L2JMOD_WEDDING_SAMESEX;
-	public static boolean L2JMOD_WEDDING_FORMALWEAR;
-	public static int L2JMOD_WEDDING_DIVORCE_COSTS;
-	public static boolean L2JMOD_HELLBOUND_STATUS;
-	public static boolean BANKING_SYSTEM_ENABLED;
-	public static int BANKING_SYSTEM_GOLDBARS;
-	public static int BANKING_SYSTEM_ADENA;
-	public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_CLAN;
-	public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE;
-	public static boolean OFFLINE_TRADE_ENABLE;
-	public static boolean OFFLINE_CRAFT_ENABLE;
-	public static boolean OFFLINE_MODE_IN_PEACE_ZONE;
-	public static boolean OFFLINE_MODE_NO_DAMAGE;
-	public static boolean RESTORE_OFFLINERS;
-	public static int OFFLINE_MAX_DAYS;
-	public static boolean OFFLINE_DISCONNECT_FINISHED;
-	public static boolean OFFLINE_SET_NAME_COLOR;
-	public static int OFFLINE_NAME_COLOR;
-	public static boolean OFFLINE_FAME;
-	public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT;
-	public static boolean L2JMOD_DISPLAY_SERVER_TIME;
-	public static boolean WELCOME_MESSAGE_ENABLED;
-	public static String WELCOME_MESSAGE_TEXT;
-	public static int WELCOME_MESSAGE_TIME;
-	public static boolean L2JMOD_ANTIFEED_ENABLE;
-	public static boolean L2JMOD_ANTIFEED_DUALBOX;
-	public static boolean L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX;
-	public static int L2JMOD_ANTIFEED_INTERVAL;
-	public static boolean ANNOUNCE_PK_PVP;
-	public static boolean ANNOUNCE_PK_PVP_NORMAL_MESSAGE;
-	public static String ANNOUNCE_PK_MSG;
-	public static String ANNOUNCE_PVP_MSG;
-	public static boolean L2JMOD_CHAT_ADMIN;
-	public static boolean L2JMOD_MULTILANG_ENABLE;
-	public static List<String> L2JMOD_MULTILANG_ALLOWED = new ArrayList<>();
-	public static String L2JMOD_MULTILANG_DEFAULT;
-	public static boolean L2JMOD_MULTILANG_VOICED_ALLOW;
-	public static boolean L2JMOD_MULTILANG_SM_ENABLE;
-	public static List<String> L2JMOD_MULTILANG_SM_ALLOWED = new ArrayList<>();
-	public static boolean L2JMOD_MULTILANG_NS_ENABLE;
-	public static List<String> L2JMOD_MULTILANG_NS_ALLOWED = new ArrayList<>();
-	public static boolean L2WALKER_PROTECTION;
-	public static boolean L2JMOD_DEBUG_VOICE_COMMAND;
-	public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
-	public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
-	public static int L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP;
-	public static Map<Integer, Integer> L2JMOD_DUALBOX_CHECK_WHITELIST;
-	public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD;
-	// --------------------------------------------------
-	// NPC Settings
-	// --------------------------------------------------
-	public static boolean ANNOUNCE_MAMMON_SPAWN;
-	public static boolean ALT_MOB_AGRO_IN_PEACEZONE;
-	public static boolean ALT_ATTACKABLE_NPCS;
-	public static boolean ALT_GAME_VIEWNPC;
-	public static int MAX_DRIFT_RANGE;
-	public static boolean DEEPBLUE_DROP_RULES;
-	public static boolean DEEPBLUE_DROP_RULES_RAID;
-	public static boolean SHOW_NPC_LVL;
-	public static boolean SHOW_CREST_WITHOUT_QUEST;
-	public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
-	public static int MIN_NPC_LVL_DMG_PENALTY;
-	public static Map<Integer, Float> NPC_DMG_PENALTY;
-	public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY;
-	public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY;
-	public static int MIN_NPC_LVL_MAGIC_PENALTY;
-	public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY;
-	public static int DECAY_TIME_TASK;
-	public static int DEFAULT_CORPSE_TIME;
-	public static int SPOILED_CORPSE_EXTEND_TIME;
-	public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
-	public static boolean GUARD_ATTACK_AGGRO_MOB;
-	public static boolean ALLOW_WYVERN_UPGRADER;
-	public static List<Integer> LIST_PET_RENT_NPC;
-	public static double RAID_HP_REGEN_MULTIPLIER;
-	public static double RAID_MP_REGEN_MULTIPLIER;
-	public static double RAID_PDEFENCE_MULTIPLIER;
-	public static double RAID_MDEFENCE_MULTIPLIER;
-	public static double RAID_PATTACK_MULTIPLIER;
-	public static double RAID_MATTACK_MULTIPLIER;
-	public static double RAID_MINION_RESPAWN_TIMER;
-	public static Map<Integer, Integer> MINIONS_RESPAWN_TIME;
-	public static float RAID_MIN_RESPAWN_MULTIPLIER;
-	public static float RAID_MAX_RESPAWN_MULTIPLIER;
-	public static boolean RAID_DISABLE_CURSE;
-	public static int RAID_CHAOS_TIME;
-	public static int GRAND_CHAOS_TIME;
-	public static int MINION_CHAOS_TIME;
-	public static int INVENTORY_MAXIMUM_PET;
-	public static double PET_HP_REGEN_MULTIPLIER;
-	public static double PET_MP_REGEN_MULTIPLIER;
-	public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
-	public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
-	public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
-	public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
-	public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
-	public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
-	
-	// --------------------------------------------------
-	// PvP Settings
-	// --------------------------------------------------
-	public static boolean KARMA_DROP_GM;
-	public static boolean KARMA_AWARD_PK_KILL;
-	public static int KARMA_PK_LIMIT;
-	public static String KARMA_NONDROPPABLE_PET_ITEMS;
-	public static String KARMA_NONDROPPABLE_ITEMS;
-	public static int[] KARMA_LIST_NONDROPPABLE_PET_ITEMS;
-	public static int[] KARMA_LIST_NONDROPPABLE_ITEMS;
-	
-	// --------------------------------------------------
-	// Rate Settings
-	// --------------------------------------------------
-	public static float RATE_XP;
-	public static float RATE_SP;
-	public static float RATE_PARTY_XP;
-	public static float RATE_PARTY_SP;
-	public static float RATE_HB_TRUST_INCREASE;
-	public static float RATE_HB_TRUST_DECREASE;
-	public static float RATE_EXTRACTABLE;
-	public static int RATE_DROP_MANOR;
-	public static float RATE_QUEST_DROP;
-	public static float RATE_QUEST_REWARD;
-	public static float RATE_QUEST_REWARD_XP;
-	public static float RATE_QUEST_REWARD_SP;
-	public static float RATE_QUEST_REWARD_ADENA;
-	public static boolean RATE_QUEST_REWARD_USE_MULTIPLIERS;
-	public static float RATE_QUEST_REWARD_POTION;
-	public static float RATE_QUEST_REWARD_SCROLL;
-	public static float RATE_QUEST_REWARD_RECIPE;
-	public static float RATE_QUEST_REWARD_MATERIAL;
-	public static float RATE_DEATH_DROP_AMOUNT_MULTIPLIER;
-	public static float RATE_CORPSE_DROP_AMOUNT_MULTIPLIER;
-	public static float RATE_HERB_DROP_AMOUNT_MULTIPLIER;
-	public static float RATE_RAID_DROP_AMOUNT_MULTIPLIER;
-	public static float RATE_DEATH_DROP_CHANCE_MULTIPLIER;
-	public static float RATE_CORPSE_DROP_CHANCE_MULTIPLIER;
-	public static float RATE_HERB_DROP_CHANCE_MULTIPLIER;
-	public static float RATE_RAID_DROP_CHANCE_MULTIPLIER;
-	public static Map<Integer, Float> RATE_DROP_AMOUNT_MULTIPLIER;
-	public static Map<Integer, Float> RATE_DROP_CHANCE_MULTIPLIER;
-	public static float RATE_KARMA_LOST;
-	public static float RATE_KARMA_EXP_LOST;
-	public static float RATE_SIEGE_GUARDS_PRICE;
-	public static float RATE_DROP_COMMON_HERBS;
-	public static float RATE_DROP_HP_HERBS;
-	public static float RATE_DROP_MP_HERBS;
-	public static float RATE_DROP_SPECIAL_HERBS;
-	public static int PLAYER_DROP_LIMIT;
-	public static int PLAYER_RATE_DROP;
-	public static int PLAYER_RATE_DROP_ITEM;
-	public static int PLAYER_RATE_DROP_EQUIP;
-	public static int PLAYER_RATE_DROP_EQUIP_WEAPON;
-	public static float PET_XP_RATE;
-	public static int PET_FOOD_RATE;
-	public static float SINEATER_XP_RATE;
-	public static int KARMA_DROP_LIMIT;
-	public static int KARMA_RATE_DROP;
-	public static int KARMA_RATE_DROP_ITEM;
-	public static int KARMA_RATE_DROP_EQUIP;
-	public static int KARMA_RATE_DROP_EQUIP_WEAPON;
-	
-	// --------------------------------------------------
-	// Seven Signs Settings
-	// --------------------------------------------------
-	public static boolean ALT_GAME_CASTLE_DAWN;
-	public static boolean ALT_GAME_CASTLE_DUSK;
-	public static boolean ALT_GAME_REQUIRE_CLAN_CASTLE;
-	public static int ALT_FESTIVAL_MIN_PLAYER;
-	public static int ALT_MAXIMUM_PLAYER_CONTRIB;
-	public static long ALT_FESTIVAL_MANAGER_START;
-	public static long ALT_FESTIVAL_LENGTH;
-	public static long ALT_FESTIVAL_CYCLE_LENGTH;
-	public static long ALT_FESTIVAL_FIRST_SPAWN;
-	public static long ALT_FESTIVAL_FIRST_SWARM;
-	public static long ALT_FESTIVAL_SECOND_SPAWN;
-	public static long ALT_FESTIVAL_SECOND_SWARM;
-	public static long ALT_FESTIVAL_CHEST_SPAWN;
-	public static double ALT_SIEGE_DAWN_GATES_PDEF_MULT;
-	public static double ALT_SIEGE_DUSK_GATES_PDEF_MULT;
-	public static double ALT_SIEGE_DAWN_GATES_MDEF_MULT;
-	public static double ALT_SIEGE_DUSK_GATES_MDEF_MULT;
-	public static boolean ALT_STRICT_SEVENSIGNS;
-	public static boolean ALT_SEVENSIGNS_LAZY_UPDATE;
-	public static int SSQ_DAWN_TICKET_QUANTITY;
-	public static int SSQ_DAWN_TICKET_PRICE;
-	public static int SSQ_DAWN_TICKET_BUNDLE;
-	public static int SSQ_MANORS_AGREEMENT_ID;
-	public static int SSQ_JOIN_DAWN_ADENA_FEE;
-	
-	// --------------------------------------------------
-	// Server Settings
-	// --------------------------------------------------
-	public static boolean ENABLE_UPNP;
-	public static int PORT_GAME;
-	public static int PORT_LOGIN;
-	public static String LOGIN_BIND_ADDRESS;
-	public static int LOGIN_TRY_BEFORE_BAN;
-	public static int LOGIN_BLOCK_AFTER_BAN;
-	public static String GAMESERVER_HOSTNAME;
-	public static String DATABASE_ENGINE;
-	public static String DATABASE_DRIVER;
-	public static String DATABASE_URL;
-	public static String DATABASE_LOGIN;
-	public static String DATABASE_PASSWORD;
-	public static String DATABASE_CONNECTION_POOL;
-	public static int DATABASE_MAX_CONNECTIONS;
-	public static int DATABASE_MAX_IDLE_TIME;
-	public static int MAXIMUM_ONLINE_USERS;
-	public static Pattern PLAYER_NAME_TEMPLATE;
-	public static Pattern PET_NAME_TEMPLATE;
-	public static Pattern CLAN_NAME_TEMPLATE;
-	public static int MAX_CHARACTERS_NUMBER_PER_ACCOUNT;
-	public static File DATAPACK_ROOT;
-	public static boolean ACCEPT_ALTERNATE_ID;
-	public static int REQUEST_ID;
-	public static boolean RESERVE_HOST_ON_LOGIN = false;
-	public static List<Integer> PROTOCOL_LIST;
-	public static boolean LOGIN_SERVER_SCHEDULE_RESTART;
-	public static long LOGIN_SERVER_SCHEDULE_RESTART_TIME;
-	
-	// --------------------------------------------------
-	// MMO Settings
-	// --------------------------------------------------
-	public static int MMO_SELECTOR_SLEEP_TIME;
-	public static int MMO_MAX_SEND_PER_PASS;
-	public static int MMO_MAX_READ_PER_PASS;
-	public static int MMO_HELPER_BUFFER_COUNT;
-	public static boolean MMO_TCP_NODELAY;
-	
-	// --------------------------------------------------
-	// Vitality Settings
-	// --------------------------------------------------
-	public static boolean ENABLE_VITALITY;
-	public static boolean RECOVER_VITALITY_ON_RECONNECT;
-	public static boolean ENABLE_DROP_VITALITY_HERBS;
-	public static float RATE_VITALITY_LEVEL_1;
-	public static float RATE_VITALITY_LEVEL_2;
-	public static float RATE_VITALITY_LEVEL_3;
-	public static float RATE_VITALITY_LEVEL_4;
-	public static float RATE_DROP_VITALITY_HERBS;
-	public static float RATE_RECOVERY_VITALITY_PEACE_ZONE;
-	public static float RATE_VITALITY_LOST;
-	public static float RATE_VITALITY_GAIN;
-	public static float RATE_RECOVERY_ON_RECONNECT;
-	public static int STARTING_VITALITY_POINTS;
-	
-	// --------------------------------------------------
-	// No classification assigned to the following yet
-	// --------------------------------------------------
-	public static int MAX_ITEM_IN_PACKET;
-	public static boolean CHECK_KNOWN;
-	public static int GAME_SERVER_LOGIN_PORT;
-	public static String GAME_SERVER_LOGIN_HOST;
-	public static List<String> GAME_SERVER_SUBNETS;
-	public static List<String> GAME_SERVER_HOSTS;
-	public static int PVP_NORMAL_TIME;
-	public static int PVP_PVP_TIME;
-	
-	public static enum IdFactoryType
-	{
-		Compaction,
-		BitSet,
-		Stack
-	}
-	
-	public static IdFactoryType IDFACTORY_TYPE;
-	public static boolean BAD_ID_CHECKING;
-	
-	public static double ENCHANT_CHANCE_ELEMENT_STONE;
-	public static double ENCHANT_CHANCE_ELEMENT_CRYSTAL;
-	public static double ENCHANT_CHANCE_ELEMENT_JEWEL;
-	public static double ENCHANT_CHANCE_ELEMENT_ENERGY;
-	public static int[] ENCHANT_BLACKLIST;
-	public static int AUGMENTATION_NG_SKILL_CHANCE;
-	public static int AUGMENTATION_NG_GLOW_CHANCE;
-	public static int AUGMENTATION_MID_SKILL_CHANCE;
-	public static int AUGMENTATION_MID_GLOW_CHANCE;
-	public static int AUGMENTATION_HIGH_SKILL_CHANCE;
-	public static int AUGMENTATION_HIGH_GLOW_CHANCE;
-	public static int AUGMENTATION_TOP_SKILL_CHANCE;
-	public static int AUGMENTATION_TOP_GLOW_CHANCE;
-	public static int AUGMENTATION_BASESTAT_CHANCE;
-	public static int AUGMENTATION_ACC_SKILL_CHANCE;
-	public static boolean RETAIL_LIKE_AUGMENTATION;
-	public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE;
-	public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE;
-	public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE;
-	public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE;
-	public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY;
-	public static int[] AUGMENTATION_BLACKLIST;
-	public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS;
-	public static double HP_REGEN_MULTIPLIER;
-	public static double MP_REGEN_MULTIPLIER;
-	public static double CP_REGEN_MULTIPLIER;
-	public static boolean IS_TELNET_ENABLED;
-	public static boolean SHOW_LICENCE;
-	public static boolean ACCEPT_NEW_GAMESERVER;
-	public static int SERVER_ID;
-	public static byte[] HEX_ID;
-	public static boolean AUTO_CREATE_ACCOUNTS;
-	public static boolean FLOOD_PROTECTION;
-	public static int FAST_CONNECTION_LIMIT;
-	public static int NORMAL_CONNECTION_TIME;
-	public static int FAST_CONNECTION_TIME;
-	public static int MAX_CONNECTION_PER_IP;
-	
-	// GrandBoss Settings
-	
-	// Antharas
-	public static int ANTHARAS_WAIT_TIME;
-	public static int ANTHARAS_SPAWN_INTERVAL;
-	public static int ANTHARAS_SPAWN_RANDOM;
-	
-	// Valakas
-	public static int VALAKAS_WAIT_TIME;
-	public static int VALAKAS_SPAWN_INTERVAL;
-	public static int VALAKAS_SPAWN_RANDOM;
-	
-	// Baium
-	public static int BAIUM_SPAWN_INTERVAL;
-	public static int BAIUM_SPAWN_RANDOM;
-	
-	// Core
-	public static int CORE_SPAWN_INTERVAL;
-	public static int CORE_SPAWN_RANDOM;
-	
-	// Offen
-	public static int ORFEN_SPAWN_INTERVAL;
-	public static int ORFEN_SPAWN_RANDOM;
-	
-	// Queen Ant
-	public static int QUEEN_ANT_SPAWN_INTERVAL;
-	public static int QUEEN_ANT_SPAWN_RANDOM;
-	
-	// Beleth
-	public static int BELETH_MIN_PLAYERS;
-	public static int BELETH_SPAWN_INTERVAL;
-	public static int BELETH_SPAWN_RANDOM;
-	
-	// Gracia Seeds Settings
-	public static int SOD_TIAT_KILL_COUNT;
-	public static long SOD_STAGE_2_LENGTH;
-	
-	// chatfilter
-	public static List<String> FILTER_LIST;
-	
-	// Email
-	public static String EMAIL_SERVERINFO_NAME;
-	public static String EMAIL_SERVERINFO_ADDRESS;
-	public static boolean EMAIL_SYS_ENABLED;
-	public static String EMAIL_SYS_HOST;
-	public static int EMAIL_SYS_PORT;
-	public static boolean EMAIL_SYS_SMTP_AUTH;
-	public static String EMAIL_SYS_FACTORY;
-	public static boolean EMAIL_SYS_FACTORY_CALLBACK;
-	public static String EMAIL_SYS_USERNAME;
-	public static String EMAIL_SYS_PASSWORD;
-	public static String EMAIL_SYS_ADDRESS;
-	public static String EMAIL_SYS_SELECTQUERY;
-	public static String EMAIL_SYS_DBFIELD;
-	
-	// Conquerable Halls Settings
-	public static int CHS_CLAN_MINLEVEL;
-	public static int CHS_MAX_ATTACKERS;
-	public static int CHS_MAX_FLAGS_PER_CLAN;
-	public static boolean CHS_ENABLE_FAME;
-	public static int CHS_FAME_AMOUNT;
-	public static int CHS_FAME_FREQUENCY;
-	
-	// GeoData Settings
-	public static int PATHFINDING;
-	public static File PATHNODE_DIR;
-	public static String PATHFIND_BUFFERS;
-	public static float LOW_WEIGHT;
-	public static float MEDIUM_WEIGHT;
-	public static float HIGH_WEIGHT;
-	public static boolean ADVANCED_DIAGONAL_STRATEGY;
-	public static float DIAGONAL_WEIGHT;
-	public static int MAX_POSTFILTER_PASSES;
-	public static boolean DEBUG_PATH;
-	public static boolean FORCE_GEODATA;
-	public static int COORD_SYNCHRONIZE;
-	public static Path GEODATA_PATH;
-	public static boolean TRY_LOAD_UNSPECIFIED_REGIONS;
-	public static Map<String, Boolean> GEODATA_REGIONS;
-	
-	/**
-	 * This class initializes all global variables for configuration.<br>
-	 * If the key doesn't appear in properties file, a default value is set by this class. {@link #CONFIGURATION_FILE} (properties file) for configuring your server.
-	 */
-	public static void load()
-	{
-		if (Server.serverMode == Server.MODE_GAMESERVER)
-		{
-			FLOOD_PROTECTOR_USE_ITEM = new FloodProtectorConfig("UseItemFloodProtector");
-			FLOOD_PROTECTOR_ROLL_DICE = new FloodProtectorConfig("RollDiceFloodProtector");
-			FLOOD_PROTECTOR_FIREWORK = new FloodProtectorConfig("FireworkFloodProtector");
-			FLOOD_PROTECTOR_ITEM_PET_SUMMON = new FloodProtectorConfig("ItemPetSummonFloodProtector");
-			FLOOD_PROTECTOR_HERO_VOICE = new FloodProtectorConfig("HeroVoiceFloodProtector");
-			FLOOD_PROTECTOR_GLOBAL_CHAT = new FloodProtectorConfig("GlobalChatFloodProtector");
-			FLOOD_PROTECTOR_SUBCLASS = new FloodProtectorConfig("SubclassFloodProtector");
-			FLOOD_PROTECTOR_DROP_ITEM = new FloodProtectorConfig("DropItemFloodProtector");
-			FLOOD_PROTECTOR_SERVER_BYPASS = new FloodProtectorConfig("ServerBypassFloodProtector");
-			FLOOD_PROTECTOR_MULTISELL = new FloodProtectorConfig("MultiSellFloodProtector");
-			FLOOD_PROTECTOR_TRANSACTION = new FloodProtectorConfig("TransactionFloodProtector");
-			FLOOD_PROTECTOR_MANUFACTURE = new FloodProtectorConfig("ManufactureFloodProtector");
-			FLOOD_PROTECTOR_MANOR = new FloodProtectorConfig("ManorFloodProtector");
-			FLOOD_PROTECTOR_SENDMAIL = new FloodProtectorConfig("SendMailFloodProtector");
-			FLOOD_PROTECTOR_CHARACTER_SELECT = new FloodProtectorConfig("CharacterSelectFloodProtector");
-			FLOOD_PROTECTOR_ITEM_AUCTION = new FloodProtectorConfig("ItemAuctionFloodProtector");
-			
-			final PropertiesParser serverSettings = new PropertiesParser(CONFIGURATION_FILE);
-			
-			ENABLE_UPNP = serverSettings.getBoolean("EnableUPnP", true);
-			GAMESERVER_HOSTNAME = serverSettings.getString("GameserverHostname", "*");
-			PORT_GAME = serverSettings.getInt("GameserverPort", 7777);
-			
-			GAME_SERVER_LOGIN_PORT = serverSettings.getInt("LoginPort", 9014);
-			GAME_SERVER_LOGIN_HOST = serverSettings.getString("LoginHost", "127.0.0.1");
-			
-			REQUEST_ID = serverSettings.getInt("RequestServerID", 0);
-			ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
-			
-			DATABASE_ENGINE = serverSettings.getString("Database", "MySQL");
-			DATABASE_DRIVER = serverSettings.getString("Driver", "com.mysql.jdbc.Driver");
-			DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs?useSSL=false&serverTimezone=UTC");
-			DATABASE_LOGIN = serverSettings.getString("Login", "root");
-			DATABASE_PASSWORD = serverSettings.getString("Password", "toor");
-			DATABASE_CONNECTION_POOL = serverSettings.getString("ConnectionPool", "HikariCP");
-			DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
-			DATABASE_MAX_IDLE_TIME = serverSettings.getInt("MaximumDbIdleTime", 0);
-			
-			try
-			{
-				DATAPACK_ROOT = new File(serverSettings.getString("DatapackRoot", ".").replaceAll("\\\\", "/")).getCanonicalFile();
-			}
-			catch (IOException e)
-			{
-				LOG.warn("Error setting datapack root!", e);
-				DATAPACK_ROOT = new File(".");
-			}
-			
-			PLAYER_NAME_TEMPLATE = Pattern.compile(serverSettings.getString("PlayerNameTemplate", "[a-zA-Z0-9]*"));
-			PET_NAME_TEMPLATE = Pattern.compile(serverSettings.getString("PetNameTemplate", "[a-zA-Z0-9]*"));
-			CLAN_NAME_TEMPLATE = Pattern.compile(serverSettings.getString("ClanNameTemplate", "[a-zA-Z0-9]*"));
-			
-			MAX_CHARACTERS_NUMBER_PER_ACCOUNT = serverSettings.getInt("CharMaxNumber", 7);
-			MAXIMUM_ONLINE_USERS = serverSettings.getInt("MaximumOnlineUsers", 100);
-			
-			String[] protocols = serverSettings.getString("AllowedProtocolRevisions", "267;268;271;273").split(";");
-			PROTOCOL_LIST = new ArrayList<>(protocols.length);
-			for (String protocol : protocols)
-			{
-				try
-				{
-					PROTOCOL_LIST.add(Integer.parseInt(protocol.trim()));
-				}
-				catch (NumberFormatException e)
-				{
-					LOG.warn("Wrong config protocol version: {}, skipped.", protocol);
-				}
-			}
-			
-			// Hosts and Subnets
-			IPConfigData ipcd = new IPConfigData();
-			GAME_SERVER_SUBNETS = ipcd.getSubnets();
-			GAME_SERVER_HOSTS = ipcd.getHosts();
-			
-			// Load Feature L2Properties file (if exists)
-			final PropertiesParser Feature = new PropertiesParser(FEATURE_CONFIG_FILE);
-			
-			CH_TELE_FEE_RATIO = Feature.getLong("ClanHallTeleportFunctionFeeRatio", 604800000);
-			CH_TELE1_FEE = Feature.getInt("ClanHallTeleportFunctionFeeLvl1", 7000);
-			CH_TELE2_FEE = Feature.getInt("ClanHallTeleportFunctionFeeLvl2", 14000);
-			CH_SUPPORT_FEE_RATIO = Feature.getLong("ClanHallSupportFunctionFeeRatio", 86400000);
-			CH_SUPPORT1_FEE = Feature.getInt("ClanHallSupportFeeLvl1", 2500);
-			CH_SUPPORT2_FEE = Feature.getInt("ClanHallSupportFeeLvl2", 5000);
-			CH_SUPPORT3_FEE = Feature.getInt("ClanHallSupportFeeLvl3", 7000);
-			CH_SUPPORT4_FEE = Feature.getInt("ClanHallSupportFeeLvl4", 11000);
-			CH_SUPPORT5_FEE = Feature.getInt("ClanHallSupportFeeLvl5", 21000);
-			CH_SUPPORT6_FEE = Feature.getInt("ClanHallSupportFeeLvl6", 36000);
-			CH_SUPPORT7_FEE = Feature.getInt("ClanHallSupportFeeLvl7", 37000);
-			CH_SUPPORT8_FEE = Feature.getInt("ClanHallSupportFeeLvl8", 52000);
-			CH_MPREG_FEE_RATIO = Feature.getLong("ClanHallMpRegenerationFunctionFeeRatio", 86400000);
-			CH_MPREG1_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl1", 2000);
-			CH_MPREG2_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl2", 3750);
-			CH_MPREG3_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl3", 6500);
-			CH_MPREG4_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl4", 13750);
-			CH_MPREG5_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl5", 20000);
-			CH_HPREG_FEE_RATIO = Feature.getLong("ClanHallHpRegenerationFunctionFeeRatio", 86400000);
-			CH_HPREG1_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl1", 700);
-			CH_HPREG2_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl2", 800);
-			CH_HPREG3_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl3", 1000);
-			CH_HPREG4_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl4", 1166);
-			CH_HPREG5_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl5", 1500);
-			CH_HPREG6_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl6", 1750);
-			CH_HPREG7_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl7", 2000);
-			CH_HPREG8_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl8", 2250);
-			CH_HPREG9_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl9", 2500);
-			CH_HPREG10_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl10", 3250);
-			CH_HPREG11_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl11", 3270);
-			CH_HPREG12_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl12", 4250);
-			CH_HPREG13_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl13", 5166);
-			CH_EXPREG_FEE_RATIO = Feature.getLong("ClanHallExpRegenerationFunctionFeeRatio", 86400000);
-			CH_EXPREG1_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl1", 3000);
-			CH_EXPREG2_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl2", 6000);
-			CH_EXPREG3_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl3", 9000);
-			CH_EXPREG4_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl4", 15000);
-			CH_EXPREG5_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl5", 21000);
-			CH_EXPREG6_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl6", 23330);
-			CH_EXPREG7_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl7", 30000);
-			CH_ITEM_FEE_RATIO = Feature.getLong("ClanHallItemCreationFunctionFeeRatio", 86400000);
-			CH_ITEM1_FEE = Feature.getInt("ClanHallItemCreationFunctionFeeLvl1", 30000);
-			CH_ITEM2_FEE = Feature.getInt("ClanHallItemCreationFunctionFeeLvl2", 70000);
-			CH_ITEM3_FEE = Feature.getInt("ClanHallItemCreationFunctionFeeLvl3", 140000);
-			CH_CURTAIN_FEE_RATIO = Feature.getLong("ClanHallCurtainFunctionFeeRatio", 604800000);
-			CH_CURTAIN1_FEE = Feature.getInt("ClanHallCurtainFunctionFeeLvl1", 2000);
-			CH_CURTAIN2_FEE = Feature.getInt("ClanHallCurtainFunctionFeeLvl2", 2500);
-			CH_FRONT_FEE_RATIO = Feature.getLong("ClanHallFrontPlatformFunctionFeeRatio", 259200000);
-			CH_FRONT1_FEE = Feature.getInt("ClanHallFrontPlatformFunctionFeeLvl1", 1300);
-			CH_FRONT2_FEE = Feature.getInt("ClanHallFrontPlatformFunctionFeeLvl2", 4000);
-			CH_BUFF_FREE = Feature.getBoolean("AltClanHallMpBuffFree", false);
-			SIEGE_HOUR_LIST = new ArrayList<>();
-			for (String hour : Feature.getString("SiegeHourList", "").split(","))
-			{
-				if (Util.isDigit(hour))
-				{
-					SIEGE_HOUR_LIST.add(Integer.parseInt(hour));
-				}
-			}
-			CS_TELE_FEE_RATIO = Feature.getLong("CastleTeleportFunctionFeeRatio", 604800000);
-			CS_TELE1_FEE = Feature.getInt("CastleTeleportFunctionFeeLvl1", 1000);
-			CS_TELE2_FEE = Feature.getInt("CastleTeleportFunctionFeeLvl2", 10000);
-			CS_SUPPORT_FEE_RATIO = Feature.getLong("CastleSupportFunctionFeeRatio", 604800000);
-			CS_SUPPORT1_FEE = Feature.getInt("CastleSupportFeeLvl1", 49000);
-			CS_SUPPORT2_FEE = Feature.getInt("CastleSupportFeeLvl2", 120000);
-			CS_MPREG_FEE_RATIO = Feature.getLong("CastleMpRegenerationFunctionFeeRatio", 604800000);
-			CS_MPREG1_FEE = Feature.getInt("CastleMpRegenerationFeeLvl1", 45000);
-			CS_MPREG2_FEE = Feature.getInt("CastleMpRegenerationFeeLvl2", 65000);
-			CS_HPREG_FEE_RATIO = Feature.getLong("CastleHpRegenerationFunctionFeeRatio", 604800000);
-			CS_HPREG1_FEE = Feature.getInt("CastleHpRegenerationFeeLvl1", 12000);
-			CS_HPREG2_FEE = Feature.getInt("CastleHpRegenerationFeeLvl2", 20000);
-			CS_EXPREG_FEE_RATIO = Feature.getLong("CastleExpRegenerationFunctionFeeRatio", 604800000);
-			CS_EXPREG1_FEE = Feature.getInt("CastleExpRegenerationFeeLvl1", 63000);
-			CS_EXPREG2_FEE = Feature.getInt("CastleExpRegenerationFeeLvl2", 70000);
-			
-			OUTER_DOOR_UPGRADE_PRICE2 = Feature.getInt("OuterDoorUpgradePriceLvl2", 3000000);
-			OUTER_DOOR_UPGRADE_PRICE3 = Feature.getInt("OuterDoorUpgradePriceLvl3", 4000000);
-			OUTER_DOOR_UPGRADE_PRICE5 = Feature.getInt("OuterDoorUpgradePriceLvl5", 5000000);
-			INNER_DOOR_UPGRADE_PRICE2 = Feature.getInt("InnerDoorUpgradePriceLvl2", 750000);
-			INNER_DOOR_UPGRADE_PRICE3 = Feature.getInt("InnerDoorUpgradePriceLvl3", 900000);
-			INNER_DOOR_UPGRADE_PRICE5 = Feature.getInt("InnerDoorUpgradePriceLvl5", 1000000);
-			WALL_UPGRADE_PRICE2 = Feature.getInt("WallUpgradePriceLvl2", 1600000);
-			WALL_UPGRADE_PRICE3 = Feature.getInt("WallUpgradePriceLvl3", 1800000);
-			WALL_UPGRADE_PRICE5 = Feature.getInt("WallUpgradePriceLvl5", 2000000);
-			TRAP_UPGRADE_PRICE1 = Feature.getInt("TrapUpgradePriceLvl1", 3000000);
-			TRAP_UPGRADE_PRICE2 = Feature.getInt("TrapUpgradePriceLvl2", 4000000);
-			TRAP_UPGRADE_PRICE3 = Feature.getInt("TrapUpgradePriceLvl3", 5000000);
-			TRAP_UPGRADE_PRICE4 = Feature.getInt("TrapUpgradePriceLvl4", 6000000);
-			
-			FS_TELE_FEE_RATIO = Feature.getLong("FortressTeleportFunctionFeeRatio", 604800000);
-			FS_TELE1_FEE = Feature.getInt("FortressTeleportFunctionFeeLvl1", 1000);
-			FS_TELE2_FEE = Feature.getInt("FortressTeleportFunctionFeeLvl2", 10000);
-			FS_SUPPORT_FEE_RATIO = Feature.getLong("FortressSupportFunctionFeeRatio", 86400000);
-			FS_SUPPORT1_FEE = Feature.getInt("FortressSupportFeeLvl1", 7000);
-			FS_SUPPORT2_FEE = Feature.getInt("FortressSupportFeeLvl2", 17000);
-			FS_MPREG_FEE_RATIO = Feature.getLong("FortressMpRegenerationFunctionFeeRatio", 86400000);
-			FS_MPREG1_FEE = Feature.getInt("FortressMpRegenerationFeeLvl1", 6500);
-			FS_MPREG2_FEE = Feature.getInt("FortressMpRegenerationFeeLvl2", 9300);
-			FS_HPREG_FEE_RATIO = Feature.getLong("FortressHpRegenerationFunctionFeeRatio", 86400000);
-			FS_HPREG1_FEE = Feature.getInt("FortressHpRegenerationFeeLvl1", 2000);
-			FS_HPREG2_FEE = Feature.getInt("FortressHpRegenerationFeeLvl2", 3500);
-			FS_EXPREG_FEE_RATIO = Feature.getLong("FortressExpRegenerationFunctionFeeRatio", 86400000);
-			FS_EXPREG1_FEE = Feature.getInt("FortressExpRegenerationFeeLvl1", 9000);
-			FS_EXPREG2_FEE = Feature.getInt("FortressExpRegenerationFeeLvl2", 10000);
-			FS_UPDATE_FRQ = Feature.getInt("FortressPeriodicUpdateFrequency", 360);
-			FS_BLOOD_OATH_COUNT = Feature.getInt("FortressBloodOathCount", 1);
-			FS_MAX_SUPPLY_LEVEL = Feature.getInt("FortressMaxSupplyLevel", 6);
-			FS_FEE_FOR_CASTLE = Feature.getInt("FortressFeeForCastle", 25000);
-			FS_MAX_OWN_TIME = Feature.getInt("FortressMaximumOwnTime", 168);
-			
-			ALT_GAME_CASTLE_DAWN = Feature.getBoolean("AltCastleForDawn", true);
-			ALT_GAME_CASTLE_DUSK = Feature.getBoolean("AltCastleForDusk", true);
-			ALT_GAME_REQUIRE_CLAN_CASTLE = Feature.getBoolean("AltRequireClanCastle", false);
-			ALT_FESTIVAL_MIN_PLAYER = Feature.getInt("AltFestivalMinPlayer", 5);
-			ALT_MAXIMUM_PLAYER_CONTRIB = Feature.getInt("AltMaxPlayerContrib", 1000000);
-			ALT_FESTIVAL_MANAGER_START = Feature.getLong("AltFestivalManagerStart", 120000);
-			ALT_FESTIVAL_LENGTH = Feature.getLong("AltFestivalLength", 1080000);
-			ALT_FESTIVAL_CYCLE_LENGTH = Feature.getLong("AltFestivalCycleLength", 2280000);
-			ALT_FESTIVAL_FIRST_SPAWN = Feature.getLong("AltFestivalFirstSpawn", 120000);
-			ALT_FESTIVAL_FIRST_SWARM = Feature.getLong("AltFestivalFirstSwarm", 300000);
-			ALT_FESTIVAL_SECOND_SPAWN = Feature.getLong("AltFestivalSecondSpawn", 540000);
-			ALT_FESTIVAL_SECOND_SWARM = Feature.getLong("AltFestivalSecondSwarm", 720000);
-			ALT_FESTIVAL_CHEST_SPAWN = Feature.getLong("AltFestivalChestSpawn", 900000);
-			ALT_SIEGE_DAWN_GATES_PDEF_MULT = Feature.getDouble("AltDawnGatesPdefMult", 1.1);
-			ALT_SIEGE_DUSK_GATES_PDEF_MULT = Feature.getDouble("AltDuskGatesPdefMult", 0.8);
-			ALT_SIEGE_DAWN_GATES_MDEF_MULT = Feature.getDouble("AltDawnGatesMdefMult", 1.1);
-			ALT_SIEGE_DUSK_GATES_MDEF_MULT = Feature.getDouble("AltDuskGatesMdefMult", 0.8);
-			ALT_STRICT_SEVENSIGNS = Feature.getBoolean("StrictSevenSigns", true);
-			ALT_SEVENSIGNS_LAZY_UPDATE = Feature.getBoolean("AltSevenSignsLazyUpdate", true);
-			
-			SSQ_DAWN_TICKET_QUANTITY = Feature.getInt("SevenSignsDawnTicketQuantity", 300);
-			SSQ_DAWN_TICKET_PRICE = Feature.getInt("SevenSignsDawnTicketPrice", 1000);
-			SSQ_DAWN_TICKET_BUNDLE = Feature.getInt("SevenSignsDawnTicketBundle", 10);
-			SSQ_MANORS_AGREEMENT_ID = Feature.getInt("SevenSignsManorsAgreementId", 6388);
-			SSQ_JOIN_DAWN_ADENA_FEE = Feature.getInt("SevenSignsJoinDawnFee", 50000);
-			
-			TAKE_FORT_POINTS = Feature.getInt("TakeFortPoints", 200);
-			LOOSE_FORT_POINTS = Feature.getInt("LooseFortPoints", 0);
-			TAKE_CASTLE_POINTS = Feature.getInt("TakeCastlePoints", 1500);
-			LOOSE_CASTLE_POINTS = Feature.getInt("LooseCastlePoints", 3000);
-			CASTLE_DEFENDED_POINTS = Feature.getInt("CastleDefendedPoints", 750);
-			FESTIVAL_WIN_POINTS = Feature.getInt("FestivalOfDarknessWin", 200);
-			HERO_POINTS = Feature.getInt("HeroPoints", 1000);
-			ROYAL_GUARD_COST = Feature.getInt("CreateRoyalGuardCost", 5000);
-			KNIGHT_UNIT_COST = Feature.getInt("CreateKnightUnitCost", 10000);
-			KNIGHT_REINFORCE_COST = Feature.getInt("ReinforceKnightUnitCost", 5000);
-			BALLISTA_POINTS = Feature.getInt("KillBallistaPoints", 30);
-			BLOODALLIANCE_POINTS = Feature.getInt("BloodAlliancePoints", 500);
-			BLOODOATH_POINTS = Feature.getInt("BloodOathPoints", 200);
-			KNIGHTSEPAULETTE_POINTS = Feature.getInt("KnightsEpaulettePoints", 20);
-			REPUTATION_SCORE_PER_KILL = Feature.getInt("ReputationScorePerKill", 1);
-			JOIN_ACADEMY_MIN_REP_SCORE = Feature.getInt("CompleteAcademyMinPoints", 190);
-			JOIN_ACADEMY_MAX_REP_SCORE = Feature.getInt("CompleteAcademyMaxPoints", 650);
-			RAID_RANKING_1ST = Feature.getInt("1stRaidRankingPoints", 1250);
-			RAID_RANKING_2ND = Feature.getInt("2ndRaidRankingPoints", 900);
-			RAID_RANKING_3RD = Feature.getInt("3rdRaidRankingPoints", 700);
-			RAID_RANKING_4TH = Feature.getInt("4thRaidRankingPoints", 600);
-			RAID_RANKING_5TH = Feature.getInt("5thRaidRankingPoints", 450);
-			RAID_RANKING_6TH = Feature.getInt("6thRaidRankingPoints", 350);
-			RAID_RANKING_7TH = Feature.getInt("7thRaidRankingPoints", 300);
-			RAID_RANKING_8TH = Feature.getInt("8thRaidRankingPoints", 200);
-			RAID_RANKING_9TH = Feature.getInt("9thRaidRankingPoints", 150);
-			RAID_RANKING_10TH = Feature.getInt("10thRaidRankingPoints", 100);
-			RAID_RANKING_UP_TO_50TH = Feature.getInt("UpTo50thRaidRankingPoints", 25);
-			RAID_RANKING_UP_TO_100TH = Feature.getInt("UpTo100thRaidRankingPoints", 12);
-			CLAN_LEVEL_6_COST = Feature.getInt("ClanLevel6Cost", 5000);
-			CLAN_LEVEL_7_COST = Feature.getInt("ClanLevel7Cost", 10000);
-			CLAN_LEVEL_8_COST = Feature.getInt("ClanLevel8Cost", 20000);
-			CLAN_LEVEL_9_COST = Feature.getInt("ClanLevel9Cost", 40000);
-			CLAN_LEVEL_10_COST = Feature.getInt("ClanLevel10Cost", 40000);
-			CLAN_LEVEL_11_COST = Feature.getInt("ClanLevel11Cost", 75000);
-			CLAN_LEVEL_6_REQUIREMENT = Feature.getInt("ClanLevel6Requirement", 30);
-			CLAN_LEVEL_7_REQUIREMENT = Feature.getInt("ClanLevel7Requirement", 50);
-			CLAN_LEVEL_8_REQUIREMENT = Feature.getInt("ClanLevel8Requirement", 80);
-			CLAN_LEVEL_9_REQUIREMENT = Feature.getInt("ClanLevel9Requirement", 120);
-			CLAN_LEVEL_10_REQUIREMENT = Feature.getInt("ClanLevel10Requirement", 140);
-			CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
-			ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
-			ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
-			
-			// Load Character L2Properties file (if exists)
-			final PropertiesParser character = new PropertiesParser(CHARACTER_CONFIG_FILE);
-			
-			ALT_GAME_DELEVEL = character.getBoolean("Delevel", true);
-			DECREASE_SKILL_LEVEL = character.getBoolean("DecreaseSkillOnDelevel", true);
-			ALT_WEIGHT_LIMIT = character.getDouble("AltWeightLimit", 1);
-			RUN_SPD_BOOST = character.getInt("RunSpeedBoost", 0);
-			DEATH_PENALTY_CHANCE = character.getInt("DeathPenaltyChance", 20);
-			RESPAWN_RESTORE_CP = character.getDouble("RespawnRestoreCP", 0) / 100;
-			RESPAWN_RESTORE_HP = character.getDouble("RespawnRestoreHP", 65) / 100;
-			RESPAWN_RESTORE_MP = character.getDouble("RespawnRestoreMP", 0) / 100;
-			HP_REGEN_MULTIPLIER = character.getDouble("HpRegenMultiplier", 100) / 100;
-			MP_REGEN_MULTIPLIER = character.getDouble("MpRegenMultiplier", 100) / 100;
-			CP_REGEN_MULTIPLIER = character.getDouble("CpRegenMultiplier", 100) / 100;
-			ENABLE_MODIFY_SKILL_DURATION = character.getBoolean("EnableModifySkillDuration", false);
-			
-			// Create Map only if enabled
-			if (ENABLE_MODIFY_SKILL_DURATION)
-			{
-				String[] propertySplit = character.getString("SkillDurationList", "").split(";");
-				SKILL_DURATION_LIST = new HashMap<>(propertySplit.length);
-				for (String skill : propertySplit)
-				{
-					String[] skillSplit = skill.split(",");
-					if (skillSplit.length != 2)
-					{
-						LOG.warn("[SkillDurationList]: invalid config property -> SkillDurationList {}", skill);
-					}
-					else
-					{
-						try
-						{
-							SKILL_DURATION_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
-						}
-						catch (NumberFormatException nfe)
-						{
-							if (!skill.isEmpty())
-							{
-								LOG.warn("[SkillDurationList]: invalid config property -> SkillList {}", skill);
-							}
-						}
-					}
-				}
-			}
-			ENABLE_MODIFY_SKILL_REUSE = character.getBoolean("EnableModifySkillReuse", false);
-			// Create Map only if enabled
-			if (ENABLE_MODIFY_SKILL_REUSE)
-			{
-				String[] propertySplit = character.getString("SkillReuseList", "").split(";");
-				SKILL_REUSE_LIST = new HashMap<>(propertySplit.length);
-				for (String skill : propertySplit)
-				{
-					String[] skillSplit = skill.split(",");
-					if (skillSplit.length != 2)
-					{
-						LOG.warn("[SkillReuseList]: invalid config property -> SkillReuseList {}", skill);
-					}
-					else
-					{
-						try
-						{
-							SKILL_REUSE_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
-						}
-						catch (NumberFormatException nfe)
-						{
-							if (!skill.isEmpty())
-							{
-								LOG.warn("[SkillReuseList]: invalid config property -> SkillList {}", skill);
-							}
-						}
-					}
-				}
-			}
-			
-			AUTO_LEARN_SKILLS = character.getBoolean("AutoLearnSkills", false);
-			AUTO_LEARN_FS_SKILLS = character.getBoolean("AutoLearnForgottenScrollSkills", false);
-			AUTO_LOOT_HERBS = character.getBoolean("AutoLootHerbs", false);
-			BUFFS_MAX_AMOUNT = character.getByte("MaxBuffAmount", (byte) 20);
-			TRIGGERED_BUFFS_MAX_AMOUNT = character.getByte("MaxTriggeredBuffAmount", (byte) 12);
-			DANCES_MAX_AMOUNT = character.getByte("MaxDanceAmount", (byte) 12);
-			DANCE_CANCEL_BUFF = character.getBoolean("DanceCancelBuff", false);
-			DANCE_CONSUME_ADDITIONAL_MP = character.getBoolean("DanceConsumeAdditionalMP", true);
-			ALT_STORE_DANCES = character.getBoolean("AltStoreDances", false);
-			AUTO_LEARN_DIVINE_INSPIRATION = character.getBoolean("AutoLearnDivineInspiration", false);
-			ALT_GAME_CANCEL_BOW = character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all");
-			ALT_GAME_CANCEL_CAST = character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all");
-			ALT_GAME_MAGICFAILURES = character.getBoolean("MagicFailures", true);
-			PLAYER_FAKEDEATH_UP_PROTECTION = character.getInt("PlayerFakeDeathUpProtection", 0);
-			STORE_SKILL_COOLTIME = character.getBoolean("StoreSkillCooltime", true);
-			SUBCLASS_STORE_SKILL_COOLTIME = character.getBoolean("SubclassStoreSkillCooltime", false);
-			SUMMON_STORE_SKILL_COOLTIME = character.getBoolean("SummonStoreSkillCooltime", true);
-			ALT_GAME_SHIELD_BLOCKS = character.getBoolean("AltShieldBlocks", false);
-			ALT_PERFECT_SHLD_BLOCK = character.getInt("AltPerfectShieldBlockRate", 10);
-			EFFECT_TICK_RATIO = character.getLong("EffectTickRatio", 666);
-			ALLOW_CLASS_MASTERS = character.getBoolean("AllowClassMasters", false);
-			ALLOW_ENTIRE_TREE = character.getBoolean("AllowEntireTree", false);
-			ALTERNATE_CLASS_MASTER = character.getBoolean("AlternateClassMaster", false);
-			if (ALLOW_CLASS_MASTERS || ALTERNATE_CLASS_MASTER)
-			{
-				CLASS_MASTER_SETTINGS = new ClassMasterSettings(character.getString("ConfigClassMaster", ""));
-			}
-			LIFE_CRYSTAL_NEEDED = character.getBoolean("LifeCrystalNeeded", true);
-			ES_SP_BOOK_NEEDED = character.getBoolean("EnchantSkillSpBookNeeded", true);
-			DIVINE_SP_BOOK_NEEDED = character.getBoolean("DivineInspirationSpBookNeeded", true);
-			ALT_GAME_SKILL_LEARN = character.getBoolean("AltGameSkillLearn", false);
-			ALT_GAME_SUBCLASS_WITHOUT_QUESTS = character.getBoolean("AltSubClassWithoutQuests", false);
-			ALT_GAME_SUBCLASS_EVERYWHERE = character.getBoolean("AltSubclassEverywhere", false);
-			RESTORE_SERVITOR_ON_RECONNECT = character.getBoolean("RestoreServitorOnReconnect", true);
-			RESTORE_PET_ON_RECONNECT = character.getBoolean("RestorePetOnReconnect", true);
-			ALLOW_TRANSFORM_WITHOUT_QUEST = character.getBoolean("AltTransformationWithoutQuest", false);
-			FEE_DELETE_TRANSFER_SKILLS = character.getInt("FeeDeleteTransferSkills", 10000000);
-			FEE_DELETE_SUBCLASS_SKILLS = character.getInt("FeeDeleteSubClassSkills", 10000000);
-			ENABLE_VITALITY = character.getBoolean("EnableVitality", true);
-			RECOVER_VITALITY_ON_RECONNECT = character.getBoolean("RecoverVitalityOnReconnect", true);
-			STARTING_VITALITY_POINTS = character.getInt("StartingVitalityPoints", 20000);
-			MAX_BONUS_EXP = character.getDouble("MaxExpBonus", 3.5);
-			MAX_BONUS_SP = character.getDouble("MaxSpBonus", 3.5);
-			MAX_RUN_SPEED = character.getInt("MaxRunSpeed", 250);
-			MAX_PCRIT_RATE = character.getInt("MaxPCritRate", 500);
-			MAX_MCRIT_RATE = character.getInt("MaxMCritRate", 200);
-			MAX_PATK_SPEED = character.getInt("MaxPAtkSpeed", 1500);
-			MAX_MATK_SPEED = character.getInt("MaxMAtkSpeed", 1999);
-			MAX_EVASION = character.getInt("MaxEvasion", 250);
-			MIN_ABNORMAL_STATE_SUCCESS_RATE = character.getInt("MinAbnormalStateSuccessRate", 10);
-			MAX_ABNORMAL_STATE_SUCCESS_RATE = character.getInt("MaxAbnormalStateSuccessRate", 90);
-			MAX_PLAYER_LEVEL = character.getInt("MaxPlayerLevel", 85);
-			MAX_PET_LEVEL = character.getInt("MaxPetLevel", 86);
-			MAX_SUBCLASS = character.getByte("MaxSubclass", (byte) 3);
-			BASE_SUBCLASS_LEVEL = character.getInt("BaseSubclassLevel", 40);
-			MAX_SUBCLASS_LEVEL = character.getInt("MaxSubclassLevel", 80);
-			MAX_PVTSTORESELL_SLOTS_DWARF = character.getInt("MaxPvtStoreSellSlotsDwarf", 4);
-			MAX_PVTSTORESELL_SLOTS_OTHER = character.getInt("MaxPvtStoreSellSlotsOther", 3);
-			MAX_PVTSTOREBUY_SLOTS_DWARF = character.getInt("MaxPvtStoreBuySlotsDwarf", 5);
-			MAX_PVTSTOREBUY_SLOTS_OTHER = character.getInt("MaxPvtStoreBuySlotsOther", 4);
-			INVENTORY_MAXIMUM_NO_DWARF = character.getInt("MaximumSlotsForNoDwarf", 80);
-			INVENTORY_MAXIMUM_DWARF = character.getInt("MaximumSlotsForDwarf", 100);
-			INVENTORY_MAXIMUM_GM = character.getInt("MaximumSlotsForGMPlayer", 250);
-			INVENTORY_MAXIMUM_QUEST_ITEMS = character.getInt("MaximumSlotsForQuestItems", 100);
-			MAX_ITEM_IN_PACKET = Math.max(INVENTORY_MAXIMUM_NO_DWARF, Math.max(INVENTORY_MAXIMUM_DWARF, INVENTORY_MAXIMUM_GM));
-			WAREHOUSE_SLOTS_DWARF = character.getInt("MaximumWarehouseSlotsForDwarf", 120);
-			WAREHOUSE_SLOTS_NO_DWARF = character.getInt("MaximumWarehouseSlotsForNoDwarf", 100);
-			WAREHOUSE_SLOTS_CLAN = character.getInt("MaximumWarehouseSlotsForClan", 150);
-			ALT_FREIGHT_SLOTS = character.getInt("MaximumFreightSlots", 200);
-			ALT_FREIGHT_PRICE = character.getInt("FreightPrice", 1000);
-			ENCHANT_CHANCE_ELEMENT_STONE = character.getDouble("EnchantChanceElementStone", 50);
-			ENCHANT_CHANCE_ELEMENT_CRYSTAL = character.getDouble("EnchantChanceElementCrystal", 30);
-			ENCHANT_CHANCE_ELEMENT_JEWEL = character.getDouble("EnchantChanceElementJewel", 20);
-			ENCHANT_CHANCE_ELEMENT_ENERGY = character.getDouble("EnchantChanceElementEnergy", 10);
-			String[] notenchantable = character.getString("EnchantBlackList", "7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,13293,13294,13296").split(",");
-			ENCHANT_BLACKLIST = new int[notenchantable.length];
-			for (int i = 0; i < notenchantable.length; i++)
-			{
-				ENCHANT_BLACKLIST[i] = Integer.parseInt(notenchantable[i]);
-			}
-			Arrays.sort(ENCHANT_BLACKLIST);
-			
-			AUGMENTATION_NG_SKILL_CHANCE = character.getInt("AugmentationNGSkillChance", 15);
-			AUGMENTATION_NG_GLOW_CHANCE = character.getInt("AugmentationNGGlowChance", 0);
-			AUGMENTATION_MID_SKILL_CHANCE = character.getInt("AugmentationMidSkillChance", 30);
-			AUGMENTATION_MID_GLOW_CHANCE = character.getInt("AugmentationMidGlowChance", 40);
-			AUGMENTATION_HIGH_SKILL_CHANCE = character.getInt("AugmentationHighSkillChance", 45);
-			AUGMENTATION_HIGH_GLOW_CHANCE = character.getInt("AugmentationHighGlowChance", 70);
-			AUGMENTATION_TOP_SKILL_CHANCE = character.getInt("AugmentationTopSkillChance", 60);
-			AUGMENTATION_TOP_GLOW_CHANCE = character.getInt("AugmentationTopGlowChance", 100);
-			AUGMENTATION_BASESTAT_CHANCE = character.getInt("AugmentationBaseStatChance", 1);
-			AUGMENTATION_ACC_SKILL_CHANCE = character.getInt("AugmentationAccSkillChance", 0);
-			
-			RETAIL_LIKE_AUGMENTATION = character.getBoolean("RetailLikeAugmentation", true);
-			String[] array = character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(",");
-			RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length];
-			for (int i = 0; i < 4; i++)
-			{
-				RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]);
-			}
-			array = character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(",");
-			RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length];
-			for (int i = 0; i < 4; i++)
-			{
-				RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]);
-			}
-			array = character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(",");
-			RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length];
-			for (int i = 0; i < 4; i++)
-			{
-				RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]);
-			}
-			array = character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(",");
-			RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length];
-			for (int i = 0; i < 4; i++)
-			{
-				RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]);
-			}
-			RETAIL_LIKE_AUGMENTATION_ACCESSORY = character.getBoolean("RetailLikeAugmentationAccessory", true);
-			
-			array = character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(",");
-			AUGMENTATION_BLACKLIST = new int[array.length];
-			
-			for (int i = 0; i < array.length; i++)
-			{
-				AUGMENTATION_BLACKLIST[i] = Integer.parseInt(array[i]);
-			}
-			
-			Arrays.sort(AUGMENTATION_BLACKLIST);
-			ALT_ALLOW_AUGMENT_PVP_ITEMS = character.getBoolean("AltAllowAugmentPvPItems", false);
-			ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = character.getBoolean("AltKarmaPlayerCanBeKilledInPeaceZone", false);
-			ALT_GAME_KARMA_PLAYER_CAN_SHOP = character.getBoolean("AltKarmaPlayerCanShop", true);
-			ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = character.getBoolean("AltKarmaPlayerCanTeleport", true);
-			ALT_GAME_KARMA_PLAYER_CAN_USE_GK = character.getBoolean("AltKarmaPlayerCanUseGK", false);
-			ALT_GAME_KARMA_PLAYER_CAN_TRADE = character.getBoolean("AltKarmaPlayerCanTrade", true);
-			ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = character.getBoolean("AltKarmaPlayerCanUseWareHouse", true);
-			MAX_PERSONAL_FAME_POINTS = character.getInt("MaxPersonalFamePoints", 100000);
-			FORTRESS_ZONE_FAME_TASK_FREQUENCY = character.getInt("FortressZoneFameTaskFrequency", 300);
-			FORTRESS_ZONE_FAME_AQUIRE_POINTS = character.getInt("FortressZoneFameAquirePoints", 31);
-			CASTLE_ZONE_FAME_TASK_FREQUENCY = character.getInt("CastleZoneFameTaskFrequency", 300);
-			CASTLE_ZONE_FAME_AQUIRE_POINTS = character.getInt("CastleZoneFameAquirePoints", 125);
-			FAME_FOR_DEAD_PLAYERS = character.getBoolean("FameForDeadPlayers", true);
-			IS_CRAFTING_ENABLED = character.getBoolean("CraftingEnabled", true);
-			CRAFT_MASTERWORK = character.getBoolean("CraftMasterwork", true);
-			DWARF_RECIPE_LIMIT = character.getInt("DwarfRecipeLimit", 50);
-			COMMON_RECIPE_LIMIT = character.getInt("CommonRecipeLimit", 50);
-			ALT_GAME_CREATION = character.getBoolean("AltGameCreation", false);
-			ALT_GAME_CREATION_SPEED = character.getDouble("AltGameCreationSpeed", 1);
-			ALT_GAME_CREATION_XP_RATE = character.getDouble("AltGameCreationXpRate", 1);
-			ALT_GAME_CREATION_SP_RATE = character.getDouble("AltGameCreationSpRate", 1);
-			ALT_GAME_CREATION_RARE_XPSP_RATE = character.getDouble("AltGameCreationRareXpSpRate", 2);
-			ALT_BLACKSMITH_USE_RECIPES = character.getBoolean("AltBlacksmithUseRecipes", true);
-			ALT_CLAN_LEADER_DATE_CHANGE = character.getInt("AltClanLeaderDateChange", 3);
-			if ((ALT_CLAN_LEADER_DATE_CHANGE < 1) || (ALT_CLAN_LEADER_DATE_CHANGE > 7))
-			{
-				LOG.warn("Wrong value specified for AltClanLeaderDateChange: {}", ALT_CLAN_LEADER_DATE_CHANGE);
-				ALT_CLAN_LEADER_DATE_CHANGE = 3;
-			}
-			ALT_CLAN_LEADER_HOUR_CHANGE = character.getString("AltClanLeaderHourChange", "00:00:00");
-			ALT_CLAN_LEADER_INSTANT_ACTIVATION = character.getBoolean("AltClanLeaderInstantActivation", false);
-			ALT_CLAN_JOIN_DAYS = character.getInt("DaysBeforeJoinAClan", 1);
-			ALT_CLAN_CREATE_DAYS = character.getInt("DaysBeforeCreateAClan", 10);
-			ALT_CLAN_DISSOLVE_DAYS = character.getInt("DaysToPassToDissolveAClan", 7);
-			ALT_ALLY_JOIN_DAYS_WHEN_LEAVED = character.getInt("DaysBeforeJoinAllyWhenLeaved", 1);
-			ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED = character.getInt("DaysBeforeJoinAllyWhenDismissed", 1);
-			ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED = character.getInt("DaysBeforeAcceptNewClanWhenDismissed", 1);
-			ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED = character.getInt("DaysBeforeCreateNewAllyWhenDissolved", 1);
-			ALT_MAX_NUM_OF_CLANS_IN_ALLY = character.getInt("AltMaxNumOfClansInAlly", 3);
-			ALT_CLAN_MEMBERS_FOR_WAR = character.getInt("AltClanMembersForWar", 15);
-			ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = character.getBoolean("AltMembersCanWithdrawFromClanWH", false);
-			REMOVE_CASTLE_CIRCLETS = character.getBoolean("RemoveCastleCirclets", true);
-			ALT_PARTY_RANGE = character.getInt("AltPartyRange", 1600);
-			ALT_PARTY_RANGE2 = character.getInt("AltPartyRange2", 1400);
-			ALT_LEAVE_PARTY_LEADER = character.getBoolean("AltLeavePartyLeader", false);
-			INITIAL_EQUIPMENT_EVENT = character.getBoolean("InitialEquipmentEvent", false);
-			STARTING_ADENA = character.getLong("StartingAdena", 0);
-			STARTING_LEVEL = character.getInt("StartingLevel", 1);
-			STARTING_SP = character.getInt("StartingSP", 0);
-			MAX_ADENA = character.getLong("MaxAdena", 99900000000L);
-			if (MAX_ADENA < 0)
-			{
-				MAX_ADENA = Long.MAX_VALUE;
-			}
-			AUTO_LOOT = character.getBoolean("AutoLoot", false);
-			AUTO_LOOT_RAIDS = character.getBoolean("AutoLootRaids", false);
-			LOOT_RAIDS_PRIVILEGE_INTERVAL = character.getInt("RaidLootRightsInterval", 900) * 1000;
-			LOOT_RAIDS_PRIVILEGE_CC_SIZE = character.getInt("RaidLootRightsCCSize", 45);
-			UNSTUCK_INTERVAL = character.getInt("UnstuckInterval", 300);
-			TELEPORT_WATCHDOG_TIMEOUT = character.getInt("TeleportWatchdogTimeout", 0);
-			PLAYER_SPAWN_PROTECTION = character.getInt("PlayerSpawnProtection", 0);
-			String[] items = character.getString("PlayerSpawnProtectionAllowedItems", "").split(",");
-			SPAWN_PROTECTION_ALLOWED_ITEMS = new ArrayList<>(items.length);
-			for (String item : items)
-			{
-				try
-				{
-					if (!item.isEmpty())
-					{
-						SPAWN_PROTECTION_ALLOWED_ITEMS.add(Integer.parseInt(item));
-					}
-				}
-				catch (NumberFormatException nfe)
-				{
-					LOG.warn("Player Spawn Protection: Wrong Item ID passed: {}", item, nfe);
-				}
-			}
-			
-			PLAYER_TELEPORT_PROTECTION = character.getInt("PlayerTeleportProtection", 0);
-			RANDOM_RESPAWN_IN_TOWN_ENABLED = character.getBoolean("RandomRespawnInTownEnabled", true);
-			OFFSET_ON_TELEPORT_ENABLED = character.getBoolean("OffsetOnTeleportEnabled", true);
-			MAX_OFFSET_ON_TELEPORT = character.getInt("MaxOffsetOnTeleport", 50);
-			PETITIONING_ALLOWED = character.getBoolean("PetitioningAllowed", true);
-			MAX_PETITIONS_PER_PLAYER = character.getInt("MaxPetitionsPerPlayer", 5);
-			MAX_PETITIONS_PENDING = character.getInt("MaxPetitionsPending", 25);
-			ALT_GAME_FREE_TELEPORT = character.getBoolean("AltFreeTeleporting", false);
-			DELETE_DAYS = character.getInt("DeleteCharAfterDays", 7);
-			ALT_GAME_EXPONENT_XP = character.getFloat("AltGameExponentXp", 0);
-			ALT_GAME_EXPONENT_SP = character.getFloat("AltGameExponentSp", 0);
-			PARTY_XP_CUTOFF_METHOD = character.getString("PartyXpCutoffMethod", "highfive");
-			PARTY_XP_CUTOFF_PERCENT = character.getDouble("PartyXpCutoffPercent", 3);
-			PARTY_XP_CUTOFF_LEVEL = character.getInt("PartyXpCutoffLevel", 20);
-			final String[] gaps = character.getString("PartyXpCutoffGaps", "0,9;10,14;15,99").split(";");
-			PARTY_XP_CUTOFF_GAPS = new int[gaps.length][2];
-			for (int i = 0; i < gaps.length; i++)
-			{
-				PARTY_XP_CUTOFF_GAPS[i] = new int[]
-				{
-					Integer.parseInt(gaps[i].split(",")[0]),
-					Integer.parseInt(gaps[i].split(",")[1])
-				};
-			}
-			final String[] percents = character.getString("PartyXpCutoffGapPercent", "100;30;0").split(";");
-			PARTY_XP_CUTOFF_GAP_PERCENTS = new int[percents.length];
-			for (int i = 0; i < percents.length; i++)
-			{
-				PARTY_XP_CUTOFF_GAP_PERCENTS[i] = Integer.parseInt(percents[i]);
-			}
-			DISABLE_TUTORIAL = character.getBoolean("DisableTutorial", false);
-			EXPERTISE_PENALTY = character.getBoolean("ExpertisePenalty", true);
-			STORE_RECIPE_SHOPLIST = character.getBoolean("StoreRecipeShopList", false);
-			STORE_UI_SETTINGS = character.getBoolean("StoreCharUiSettings", false);
-			FORBIDDEN_NAMES = new HashSet<>(Arrays.asList(character.getString("ForbiddenNames", "annou,ammou,amnou,anmou,anou,amou,announcements,announce").split(",")));
-			SILENCE_MODE_EXCLUDE = character.getBoolean("SilenceModeExclude", false);
-			ALT_VALIDATE_TRIGGER_SKILLS = character.getBoolean("AltValidateTriggerSkills", false);
-			PLAYER_MOVEMENT_BLOCK_TIME = character.getInt("NpcTalkBlockingTime", 0) * 1000;
-			
-			// Load Telnet L2Properties file (if exists)
-			final PropertiesParser telnetSettings = new PropertiesParser(TELNET_FILE);
-			
-			IS_TELNET_ENABLED = telnetSettings.getBoolean("EnableTelnet", false);
-			
-			// MMO
-			final PropertiesParser mmoSettings = new PropertiesParser(MMO_CONFIG_FILE);
-			
-			MMO_SELECTOR_SLEEP_TIME = mmoSettings.getInt("SleepTime", 20);
-			MMO_MAX_SEND_PER_PASS = mmoSettings.getInt("MaxSendPerPass", 12);
-			MMO_MAX_READ_PER_PASS = mmoSettings.getInt("MaxReadPerPass", 12);
-			MMO_HELPER_BUFFER_COUNT = mmoSettings.getInt("HelperBufferCount", 20);
-			MMO_TCP_NODELAY = mmoSettings.getBoolean("TcpNoDelay", false);
-			
-			// Load IdFactory L2Properties file (if exists)
-			final PropertiesParser IdFactory = new PropertiesParser(ID_CONFIG_FILE);
-			
-			IDFACTORY_TYPE = IdFactory.getEnum("IDFactory", IdFactoryType.class, IdFactoryType.BitSet);
-			BAD_ID_CHECKING = IdFactory.getBoolean("BadIdChecking", true);
-			
-			// Load General L2Properties file (if exists)
-			final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE);
-			EVERYBODY_HAS_ADMIN_RIGHTS = General.getBoolean("EverybodyHasAdminRights", false);
-			SERVER_LIST_BRACKET = General.getBoolean("ServerListBrackets", false);
-			SERVER_LIST_TYPE = getServerTypeId(General.getString("ServerListType", "Normal").split(","));
-			SERVER_LIST_AGE = General.getInt("ServerListAge", 0);
-			SERVER_GMONLY = General.getBoolean("ServerGMOnly", false);
-			GM_HERO_AURA = General.getBoolean("GMHeroAura", false);
-			GM_STARTUP_INVULNERABLE = General.getBoolean("GMStartupInvulnerable", false);
-			GM_STARTUP_INVISIBLE = General.getBoolean("GMStartupInvisible", false);
-			GM_STARTUP_SILENCE = General.getBoolean("GMStartupSilence", false);
-			GM_STARTUP_AUTO_LIST = General.getBoolean("GMStartupAutoList", false);
-			GM_STARTUP_DIET_MODE = General.getBoolean("GMStartupDietMode", false);
-			GM_ITEM_RESTRICTION = General.getBoolean("GMItemRestriction", true);
-			GM_SKILL_RESTRICTION = General.getBoolean("GMSkillRestriction", true);
-			GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false);
-			GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true);
-			GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false);
-			GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false);
-			GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false);
-			GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false);
-			GAMEGUARD_ENFORCE = General.getBoolean("GameGuardEnforce", false);
-			GAMEGUARD_PROHIBITACTION = General.getBoolean("GameGuardProhibitAction", false);
-			LOG_CHAT = General.getBoolean("LogChat", false);
-			LOG_AUTO_ANNOUNCEMENTS = General.getBoolean("LogAutoAnnouncements", false);
-			LOG_ITEMS = General.getBoolean("LogItems", false);
-			LOG_ITEMS_SMALL_LOG = General.getBoolean("LogItemsSmallLog", false);
-			LOG_ITEM_ENCHANTS = General.getBoolean("LogItemEnchants", false);
-			LOG_SKILL_ENCHANTS = General.getBoolean("LogSkillEnchants", false);
-			GMAUDIT = General.getBoolean("GMAudit", false);
-			SKILL_CHECK_ENABLE = General.getBoolean("SkillCheckEnable", false);
-			SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false);
-			SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true);
-			DEBUG = General.getBoolean("Debug", false);
-			DEBUG_INSTANCES = General.getBoolean("InstanceDebug", false);
-			HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false);
-			PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false);
-			DEVELOPER = General.getBoolean("Developer", false);
-			NO_HANDLERS = General.getBoolean("NoHandlers", false) || Boolean.getBoolean("nohandlers");
-			NO_QUESTS = General.getBoolean("NoQuests", false) || Boolean.getBoolean("noquests");
-			ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns");
-			ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false);
-			ALT_DEV_SHOW_SCRIPTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowScriptsLoadInLogs", false);
-			THREAD_P_EFFECTS = General.getInt("ThreadPoolSizeEffects", 10);
-			THREAD_P_GENERAL = General.getInt("ThreadPoolSizeGeneral", 13);
-			THREAD_E_EVENTS = General.getInt("ThreadPoolSizeEvents", 2);
-			IO_PACKET_THREAD_CORE_SIZE = General.getInt("UrgentPacketThreadCoreSize", 2);
-			GENERAL_PACKET_THREAD_CORE_SIZE = General.getInt("GeneralPacketThreadCoreSize", 4);
-			GENERAL_THREAD_CORE_SIZE = General.getInt("GeneralThreadCoreSize", 4);
-			AI_MAX_THREAD = General.getInt("AiMaxThread", 6);
-			EVENT_MAX_THREAD = General.getInt("EventsMaxThread", 5);
-			CLIENT_PACKET_QUEUE_SIZE = General.getInt("ClientPacketQueueSize", 0);
-			if (CLIENT_PACKET_QUEUE_SIZE == 0)
-			{
-				CLIENT_PACKET_QUEUE_SIZE = MMO_MAX_READ_PER_PASS + 2;
-			}
-			CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = General.getInt("ClientPacketQueueMaxBurstSize", 0);
-			if (CLIENT_PACKET_QUEUE_MAX_BURST_SIZE == 0)
-			{
-				CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = MMO_MAX_READ_PER_PASS + 1;
-			}
-			CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND = General.getInt("ClientPacketQueueMaxPacketsPerSecond", 80);
-			CLIENT_PACKET_QUEUE_MEASURE_INTERVAL = General.getInt("ClientPacketQueueMeasureInterval", 5);
-			CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND = General.getInt("ClientPacketQueueMaxAveragePacketsPerSecond", 40);
-			CLIENT_PACKET_QUEUE_MAX_FLOODS_PER_MIN = General.getInt("ClientPacketQueueMaxFloodsPerMin", 2);
-			CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN = General.getInt("ClientPacketQueueMaxOverflowsPerMin", 1);
-			CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN = General.getInt("ClientPacketQueueMaxUnderflowsPerMin", 1);
-			CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = General.getInt("ClientPacketQueueMaxUnknownPerMin", 5);
-			DEADLOCK_DETECTOR = General.getBoolean("DeadLockDetector", true);
-			DEADLOCK_CHECK_INTERVAL = General.getInt("DeadLockCheckInterval", 20);
-			RESTART_ON_DEADLOCK = General.getBoolean("RestartOnDeadlock", false);
-			ALLOW_DISCARDITEM = General.getBoolean("AllowDiscardItem", true);
-			AUTODESTROY_ITEM_AFTER = General.getInt("AutoDestroyDroppedItemAfter", 600);
-			HERB_AUTO_DESTROY_TIME = General.getInt("AutoDestroyHerbTime", 60) * 1000;
-			String[] split = General.getString("ListOfProtectedItems", "0").split(",");
-			LIST_PROTECTED_ITEMS = new ArrayList<>(split.length);
-			for (String id : split)
-			{
-				LIST_PROTECTED_ITEMS.add(Integer.parseInt(id));
-			}
-			DATABASE_CLEAN_UP = General.getBoolean("DatabaseCleanUp", true);
-			CONNECTION_CLOSE_TIME = General.getLong("ConnectionCloseTime", 60000);
-			CHAR_STORE_INTERVAL = General.getInt("CharacterDataStoreInterval", 15);
-			LAZY_ITEMS_UPDATE = General.getBoolean("LazyItemsUpdate", false);
-			UPDATE_ITEMS_ON_CHAR_STORE = General.getBoolean("UpdateItemsOnCharStore", false);
-			DESTROY_DROPPED_PLAYER_ITEM = General.getBoolean("DestroyPlayerDroppedItem", false);
-			DESTROY_EQUIPABLE_PLAYER_ITEM = General.getBoolean("DestroyEquipableItem", false);
-			SAVE_DROPPED_ITEM = General.getBoolean("SaveDroppedItem", false);
-			EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = General.getBoolean("EmptyDroppedItemTableAfterLoad", false);
-			SAVE_DROPPED_ITEM_INTERVAL = General.getInt("SaveDroppedItemInterval", 60) * 60000;
-			CLEAR_DROPPED_ITEM_TABLE = General.getBoolean("ClearDroppedItemTable", false);
-			AUTODELETE_INVALID_QUEST_DATA = General.getBoolean("AutoDeleteInvalidQuestData", false);
-			PRECISE_DROP_CALCULATION = General.getBoolean("PreciseDropCalculation", true);
-			MULTIPLE_ITEM_DROP = General.getBoolean("MultipleItemDrop", true);
-			FORCE_INVENTORY_UPDATE = General.getBoolean("ForceInventoryUpdate", false);
-			LAZY_CACHE = General.getBoolean("LazyCache", true);
-			CACHE_CHAR_NAMES = General.getBoolean("CacheCharNames", true);
-			MIN_NPC_ANIMATION = General.getInt("MinNPCAnimation", 10);
-			MAX_NPC_ANIMATION = General.getInt("MaxNPCAnimation", 20);
-			MIN_MONSTER_ANIMATION = General.getInt("MinMonsterAnimation", 5);
-			MAX_MONSTER_ANIMATION = General.getInt("MaxMonsterAnimation", 20);
-			MOVE_BASED_KNOWNLIST = General.getBoolean("MoveBasedKnownlist", false);
-			KNOWNLIST_UPDATE_INTERVAL = General.getLong("KnownListUpdateInterval", 1250);
-			GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
-			GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
-			GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
-			PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
-			DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
-			DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
-			ALLOW_WAREHOUSE = General.getBoolean("AllowWarehouse", true);
-			WAREHOUSE_CACHE = General.getBoolean("WarehouseCache", false);
-			WAREHOUSE_CACHE_TIME = General.getInt("WarehouseCacheTime", 15);
-			ALLOW_REFUND = General.getBoolean("AllowRefund", true);
-			ALLOW_MAIL = General.getBoolean("AllowMail", true);
-			ALLOW_ATTACHMENTS = General.getBoolean("AllowAttachments", true);
-			ALLOW_WEAR = General.getBoolean("AllowWear", true);
-			WEAR_DELAY = General.getInt("WearDelay", 5);
-			WEAR_PRICE = General.getInt("WearPrice", 10);
-			INSTANCE_FINISH_TIME = 1000 * General.getInt("DefaultFinishTime", 300);
-			RESTORE_PLAYER_INSTANCE = General.getBoolean("RestorePlayerInstance", false);
-			ALLOW_SUMMON_IN_INSTANCE = General.getBoolean("AllowSummonInInstance", false);
-			EJECT_DEAD_PLAYER_TIME = 1000 * General.getInt("EjectDeadPlayerTime", 60);
-			ALLOW_LOTTERY = General.getBoolean("AllowLottery", true);
-			ALLOW_RACE = General.getBoolean("AllowRace", true);
-			ALLOW_WATER = General.getBoolean("AllowWater", true);
-			ALLOW_RENTPET = General.getBoolean("AllowRentPet", false);
-			ALLOWFISHING = General.getBoolean("AllowFishing", true);
-			ALLOW_MANOR = General.getBoolean("AllowManor", true);
-			ALLOW_BOAT = General.getBoolean("AllowBoat", true);
-			BOAT_BROADCAST_RADIUS = General.getInt("BoatBroadcastRadius", 20000);
-			ALLOW_CURSED_WEAPONS = General.getBoolean("AllowCursedWeapons", true);
-			ALLOW_PET_WALKERS = General.getBoolean("AllowPetWalkers", true);
-			SERVER_NEWS = General.getBoolean("ShowServerNews", false);
-			ENABLE_COMMUNITY_BOARD = General.getBoolean("EnableCommunityBoard", true);
-			BBS_DEFAULT = General.getString("BBSDefault", "_bbshome");
-			USE_SAY_FILTER = General.getBoolean("UseChatFilter", false);
-			CHAT_FILTER_CHARS = General.getString("ChatFilterChars", "^_^");
-			String[] propertySplit4 = General.getString("BanChatChannels", "0;1;8;17").trim().split(";");
-			BAN_CHAT_CHANNELS = new int[propertySplit4.length];
-			try
-			{
-				int i = 0;
-				for (String chatId : propertySplit4)
-				{
-					BAN_CHAT_CHANNELS[i++] = Integer.parseInt(chatId);
-				}
-			}
-			catch (NumberFormatException nfe)
-			{
-				LOG.warn("Unable to load banned channels!", nfe);
-			}
-			ALT_MANOR_REFRESH_TIME = General.getInt("AltManorRefreshTime", 20);
-			ALT_MANOR_REFRESH_MIN = General.getInt("AltManorRefreshMin", 0);
-			ALT_MANOR_APPROVE_TIME = General.getInt("AltManorApproveTime", 4);
-			ALT_MANOR_APPROVE_MIN = General.getInt("AltManorApproveMin", 30);
-			ALT_MANOR_MAINTENANCE_MIN = General.getInt("AltManorMaintenanceMin", 6);
-			ALT_MANOR_SAVE_ALL_ACTIONS = General.getBoolean("AltManorSaveAllActions", false);
-			ALT_MANOR_SAVE_PERIOD_RATE = General.getInt("AltManorSavePeriodRate", 2);
-			ALT_LOTTERY_PRIZE = General.getLong("AltLotteryPrize", 50000);
-			ALT_LOTTERY_TICKET_PRICE = General.getLong("AltLotteryTicketPrice", 2000);
-			ALT_LOTTERY_5_NUMBER_RATE = General.getFloat("AltLottery5NumberRate", 0.6f);
-			ALT_LOTTERY_4_NUMBER_RATE = General.getFloat("AltLottery4NumberRate", 0.2f);
-			ALT_LOTTERY_3_NUMBER_RATE = General.getFloat("AltLottery3NumberRate", 0.2f);
-			ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = General.getLong("AltLottery2and1NumberPrize", 200);
-			ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true);
-			ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14);
-			ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000;
-			FS_TIME_ATTACK = General.getInt("TimeOfAttack", 50);
-			FS_TIME_COOLDOWN = General.getInt("TimeOfCoolDown", 5);
-			FS_TIME_ENTRY = General.getInt("TimeOfEntry", 3);
-			FS_TIME_WARMUP = General.getInt("TimeOfWarmUp", 2);
-			FS_PARTY_MEMBER_COUNT = General.getInt("NumberOfNecessaryPartyMembers", 4);
-			if (FS_TIME_ATTACK <= 0)
-			{
-				FS_TIME_ATTACK = 50;
-			}
-			if (FS_TIME_COOLDOWN <= 0)
-			{
-				FS_TIME_COOLDOWN = 5;
-			}
-			if (FS_TIME_ENTRY <= 0)
-			{
-				FS_TIME_ENTRY = 3;
-			}
-			if (FS_TIME_ENTRY <= 0)
-			{
-				FS_TIME_ENTRY = 3;
-			}
-			if (FS_TIME_ENTRY <= 0)
-			{
-				FS_TIME_ENTRY = 3;
-			}
-			RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5);
-			RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4);
-			RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000);
-			RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480);
-			RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600);
-			RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f);
-			RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18);
-			RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21);
-			RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24);
-			RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27);
-			RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30);
-			RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33);
-			DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK"));
-			DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0);
-			ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true);
-			JAIL_IS_PVP = General.getBoolean("JailIsPvp", false);
-			JAIL_DISABLE_CHAT = General.getBoolean("JailDisableChat", true);
-			JAIL_DISABLE_TRANSACTION = General.getBoolean("JailDisableTransaction", false);
-			CUSTOM_SPAWNLIST_TABLE = General.getBoolean("CustomSpawnlistTable", false);
-			SAVE_GMSPAWN_ON_CUSTOM = General.getBoolean("SaveGmSpawnOnCustom", false);
-			CUSTOM_NPC_DATA = General.getBoolean("CustomNpcData", false);
-			CUSTOM_TELEPORT_TABLE = General.getBoolean("CustomTeleportTable", false);
-			CUSTOM_NPCBUFFER_TABLES = General.getBoolean("CustomNpcBufferTables", false);
-			CUSTOM_SKILLS_LOAD = General.getBoolean("CustomSkillsLoad", false);
-			CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false);
-			CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false);
-			CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
-			ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
-			ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
-			ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day."
-				+ EOL + EOL + "Sincerely, Alegria");
-			ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
-			MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
-			if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
-			{
-				MIN_BLOCK_CHECKER_TEAM_MEMBERS = 1;
-			}
-			else if (MIN_BLOCK_CHECKER_TEAM_MEMBERS > 6)
-			{
-				MIN_BLOCK_CHECKER_TEAM_MEMBERS = 6;
-			}
-			HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false);
-			HELLBOUND_WITHOUT_QUEST = General.getBoolean("HellboundWithoutQuest", false);
-			
-			NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1);
-			SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5);
-			
-			BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false);
-			BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":");
-			BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000;
-			BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS = General.getBoolean("AllowReportsFromSameClanMembers", false);
-			ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
-			
-			// Load FloodProtector L2Properties file
-			final PropertiesParser FloodProtectors = new PropertiesParser(FLOOD_PROTECTOR_FILE);
-			
-			loadFloodProtectorConfigs(FloodProtectors);
-			
-			// Load NPC L2Properties file (if exists)
-			final PropertiesParser NPC = new PropertiesParser(NPC_CONFIG_FILE);
-			
-			ANNOUNCE_MAMMON_SPAWN = NPC.getBoolean("AnnounceMammonSpawn", false);
-			ALT_MOB_AGRO_IN_PEACEZONE = NPC.getBoolean("AltMobAgroInPeaceZone", true);
-			ALT_ATTACKABLE_NPCS = NPC.getBoolean("AltAttackableNpcs", true);
-			ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
-			MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
-			DEEPBLUE_DROP_RULES = NPC.getBoolean("UseDeepBlueDropRules", true);
-			DEEPBLUE_DROP_RULES_RAID = NPC.getBoolean("UseDeepBlueDropRulesRaid", true);
-			SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
-			SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
-			ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
-			MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
-			NPC_DMG_PENALTY = parseConfigLine(NPC.getString("DmgPenaltyForLvLDifferences", "0.7, 0.6, 0.6, 0.55"));
-			NPC_CRIT_DMG_PENALTY = parseConfigLine(NPC.getString("CritDmgPenaltyForLvLDifferences", "0.75, 0.65, 0.6, 0.58"));
-			NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62"));
-			MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78);
-			NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5"));
-			DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000);
-			DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7);
-			SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10);
-			CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000);
-			GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false);
-			ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false);
-			String[] listPetRentNpc = NPC.getString("ListPetRentNpc", "30827").split(",");
-			LIST_PET_RENT_NPC = new ArrayList<>(listPetRentNpc.length);
-			for (String id : listPetRentNpc)
-			{
-				LIST_PET_RENT_NPC.add(Integer.valueOf(id));
-			}
-			RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100;
-			RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100;
-			RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100;
-			RAID_MDEFENCE_MULTIPLIER = NPC.getDouble("RaidMDefenceMultiplier", 100) / 100;
-			RAID_PATTACK_MULTIPLIER = NPC.getDouble("RaidPAttackMultiplier", 100) / 100;
-			RAID_MATTACK_MULTIPLIER = NPC.getDouble("RaidMAttackMultiplier", 100) / 100;
-			RAID_MIN_RESPAWN_MULTIPLIER = NPC.getFloat("RaidMinRespawnMultiplier", 1.0f);
-			RAID_MAX_RESPAWN_MULTIPLIER = NPC.getFloat("RaidMaxRespawnMultiplier", 1.0f);
-			RAID_MINION_RESPAWN_TIMER = NPC.getInt("RaidMinionRespawnTime", 300000);
-			final String[] propertySplit = NPC.getString("CustomMinionsRespawnTime", "").split(";");
-			MINIONS_RESPAWN_TIME = new HashMap<>(propertySplit.length);
-			for (String prop : propertySplit)
-			{
-				String[] propSplit = prop.split(",");
-				if (propSplit.length != 2)
-				{
-					LOG.warn("[CustomMinionsRespawnTime]: invalid config property -> CustomMinionsRespawnTime {}", prop);
-				}
-				
-				try
-				{
-					MINIONS_RESPAWN_TIME.put(Integer.valueOf(propSplit[0]), Integer.valueOf(propSplit[1]));
-				}
-				catch (NumberFormatException nfe)
-				{
-					if (!prop.isEmpty())
-					{
-						LOG.warn("[CustomMinionsRespawnTime]: invalid config property -> CustomMinionsRespawnTime {}", prop);
-					}
-				}
-			}
-			
-			RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false);
-			RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10);
-			GRAND_CHAOS_TIME = NPC.getInt("GrandChaosTime", 10);
-			MINION_CHAOS_TIME = NPC.getInt("MinionChaosTime", 10);
-			INVENTORY_MAXIMUM_PET = NPC.getInt("MaximumSlotsForPet", 12);
-			PET_HP_REGEN_MULTIPLIER = NPC.getDouble("PetHpRegenMultiplier", 100) / 100;
-			PET_MP_REGEN_MULTIPLIER = NPC.getDouble("PetMpRegenMultiplier", 100) / 100;
-			
-			DROP_ADENA_MIN_LEVEL_DIFFERENCE = NPC.getInt("DropAdenaMinLevelDifference", 8);
-			DROP_ADENA_MAX_LEVEL_DIFFERENCE = NPC.getInt("DropAdenaMaxLevelDifference", 15);
-			DROP_ADENA_MIN_LEVEL_GAP_CHANCE = NPC.getDouble("DropAdenaMinLevelGapChance", 10);
-			
-			DROP_ITEM_MIN_LEVEL_DIFFERENCE = NPC.getInt("DropItemMinLevelDifference", 5);
-			DROP_ITEM_MAX_LEVEL_DIFFERENCE = NPC.getInt("DropItemMaxLevelDifference", 10);
-			DROP_ITEM_MIN_LEVEL_GAP_CHANCE = NPC.getDouble("DropItemMinLevelGapChance", 10);
-			
-			// Load Rates L2Properties file (if exists)
-			final PropertiesParser RatesSettings = new PropertiesParser(RATES_CONFIG_FILE);
-			
-			RATE_XP = RatesSettings.getFloat("RateXp", 1);
-			RATE_SP = RatesSettings.getFloat("RateSp", 1);
-			RATE_PARTY_XP = RatesSettings.getFloat("RatePartyXp", 1);
-			RATE_PARTY_SP = RatesSettings.getFloat("RatePartySp", 1);
-			RATE_EXTRACTABLE = RatesSettings.getFloat("RateExtractable", 1);
-			RATE_DROP_MANOR = RatesSettings.getInt("RateDropManor", 1);
-			RATE_QUEST_DROP = RatesSettings.getFloat("RateQuestDrop", 1);
-			RATE_QUEST_REWARD = RatesSettings.getFloat("RateQuestReward", 1);
-			RATE_QUEST_REWARD_XP = RatesSettings.getFloat("RateQuestRewardXP", 1);
-			RATE_QUEST_REWARD_SP = RatesSettings.getFloat("RateQuestRewardSP", 1);
-			RATE_QUEST_REWARD_ADENA = RatesSettings.getFloat("RateQuestRewardAdena", 1);
-			RATE_QUEST_REWARD_USE_MULTIPLIERS = RatesSettings.getBoolean("UseQuestRewardMultipliers", false);
-			RATE_QUEST_REWARD_POTION = RatesSettings.getFloat("RateQuestRewardPotion", 1);
-			RATE_QUEST_REWARD_SCROLL = RatesSettings.getFloat("RateQuestRewardScroll", 1);
-			RATE_QUEST_REWARD_RECIPE = RatesSettings.getFloat("RateQuestRewardRecipe", 1);
-			RATE_QUEST_REWARD_MATERIAL = RatesSettings.getFloat("RateQuestRewardMaterial", 1);
-			RATE_HB_TRUST_INCREASE = RatesSettings.getFloat("RateHellboundTrustIncrease", 1);
-			RATE_HB_TRUST_DECREASE = RatesSettings.getFloat("RateHellboundTrustDecrease", 1);
-			
-			RATE_VITALITY_LEVEL_1 = RatesSettings.getFloat("RateVitalityLevel1", 1.5f);
-			RATE_VITALITY_LEVEL_2 = RatesSettings.getFloat("RateVitalityLevel2", 2);
-			RATE_VITALITY_LEVEL_3 = RatesSettings.getFloat("RateVitalityLevel3", 2.5f);
-			RATE_VITALITY_LEVEL_4 = RatesSettings.getFloat("RateVitalityLevel4", 3);
-			RATE_RECOVERY_VITALITY_PEACE_ZONE = RatesSettings.getFloat("RateRecoveryPeaceZone", 1);
-			RATE_VITALITY_LOST = RatesSettings.getFloat("RateVitalityLost", 1);
-			RATE_VITALITY_GAIN = RatesSettings.getFloat("RateVitalityGain", 1);
-			RATE_RECOVERY_ON_RECONNECT = RatesSettings.getFloat("RateRecoveryOnReconnect", 4);
-			RATE_KARMA_LOST = RatesSettings.getFloat("RateKarmaLost", -1);
-			if (RATE_KARMA_LOST == -1)
-			{
-				RATE_KARMA_LOST = RATE_XP;
-			}
-			RATE_KARMA_EXP_LOST = RatesSettings.getFloat("RateKarmaExpLost", 1);
-			RATE_SIEGE_GUARDS_PRICE = RatesSettings.getFloat("RateSiegeGuardsPrice", 1);
-			PLAYER_DROP_LIMIT = RatesSettings.getInt("PlayerDropLimit", 3);
-			PLAYER_RATE_DROP = RatesSettings.getInt("PlayerRateDrop", 5);
-			PLAYER_RATE_DROP_ITEM = RatesSettings.getInt("PlayerRateDropItem", 70);
-			PLAYER_RATE_DROP_EQUIP = RatesSettings.getInt("PlayerRateDropEquip", 25);
-			PLAYER_RATE_DROP_EQUIP_WEAPON = RatesSettings.getInt("PlayerRateDropEquipWeapon", 5);
-			PET_XP_RATE = RatesSettings.getFloat("PetXpRate", 1);
-			PET_FOOD_RATE = RatesSettings.getInt("PetFoodRate", 1);
-			SINEATER_XP_RATE = RatesSettings.getFloat("SinEaterXpRate", 1);
-			KARMA_DROP_LIMIT = RatesSettings.getInt("KarmaDropLimit", 10);
-			KARMA_RATE_DROP = RatesSettings.getInt("KarmaRateDrop", 70);
-			KARMA_RATE_DROP_ITEM = RatesSettings.getInt("KarmaRateDropItem", 50);
-			KARMA_RATE_DROP_EQUIP = RatesSettings.getInt("KarmaRateDropEquip", 40);
-			KARMA_RATE_DROP_EQUIP_WEAPON = RatesSettings.getInt("KarmaRateDropEquipWeapon", 10);
-			
-			RATE_DEATH_DROP_AMOUNT_MULTIPLIER = RatesSettings.getFloat("DeathDropAmountMultiplier", 1);
-			RATE_CORPSE_DROP_AMOUNT_MULTIPLIER = RatesSettings.getFloat("CorpseDropAmountMultiplier", 1);
-			RATE_HERB_DROP_AMOUNT_MULTIPLIER = RatesSettings.getFloat("HerbDropAmountMultiplier", 1);
-			RATE_RAID_DROP_AMOUNT_MULTIPLIER = RatesSettings.getFloat("RaidDropAmountMultiplier", 1);
-			RATE_DEATH_DROP_CHANCE_MULTIPLIER = RatesSettings.getFloat("DeathDropChanceMultiplier", 1);
-			RATE_CORPSE_DROP_CHANCE_MULTIPLIER = RatesSettings.getFloat("CorpseDropChanceMultiplier", 1);
-			RATE_HERB_DROP_CHANCE_MULTIPLIER = RatesSettings.getFloat("HerbDropChanceMultiplier", 1);
-			RATE_RAID_DROP_CHANCE_MULTIPLIER = RatesSettings.getFloat("RaidDropChanceMultiplier", 1);
-			String[] dropAmountMultiplier = RatesSettings.getString("DropAmountMultiplierByItemId", "").split(";");
-			RATE_DROP_AMOUNT_MULTIPLIER = new HashMap<>(dropAmountMultiplier.length);
-			if (!dropAmountMultiplier[0].isEmpty())
-			{
-				for (String item : dropAmountMultiplier)
-				{
-					String[] itemSplit = item.split(",");
-					if (itemSplit.length != 2)
-					{
-						LOG.warn("Config.load(): invalid config property -> RateDropItemsById {}", item);
-					}
-					else
-					{
-						try
-						{
-							RATE_DROP_AMOUNT_MULTIPLIER.put(Integer.valueOf(itemSplit[0]), Float.valueOf(itemSplit[1]));
-						}
-						catch (NumberFormatException nfe)
-						{
-							if (!item.isEmpty())
-							{
-								LOG.warn("Config.load(): invalid config property -> RateDropItemsById {}", item);
-							}
-						}
-					}
-				}
-			}
-			
-			String[] dropChanceMultiplier = RatesSettings.getString("DropChanceMultiplierByItemId", "").split(";");
-			RATE_DROP_CHANCE_MULTIPLIER = new HashMap<>(dropChanceMultiplier.length);
-			if (!dropChanceMultiplier[0].isEmpty())
-			{
-				for (String item : dropChanceMultiplier)
-				{
-					String[] itemSplit = item.split(",");
-					if (itemSplit.length != 2)
-					{
-						LOG.warn("Config.load(): invalid config property -> RateDropItemsById {}", item);
-					}
-					else
-					{
-						try
-						{
-							RATE_DROP_CHANCE_MULTIPLIER.put(Integer.valueOf(itemSplit[0]), Float.valueOf(itemSplit[1]));
-						}
-						catch (NumberFormatException nfe)
-						{
-							if (!item.isEmpty())
-							{
-								LOG.warn("Config.load(): invalid config property -> RateDropItemsById {}", item);
-							}
-						}
-					}
-				}
-			}
-			
-			// Load L2JMod L2Properties file (if exists)
-			final PropertiesParser L2JModSettings = new PropertiesParser(L2JMOD_CONFIG_FILE);
-			
-			L2JMOD_CHAMPION_ENABLE = L2JModSettings.getBoolean("ChampionEnable", false);
-			L2JMOD_CHAMPION_PASSIVE = L2JModSettings.getBoolean("ChampionPassive", false);
-			L2JMOD_CHAMPION_FREQUENCY = L2JModSettings.getInt("ChampionFrequency", -1);
-			L2JMOD_CHAMP_TITLE = L2JModSettings.getString("ChampionTitle", "Champion");
-			L2JMOD_CHAMP_MIN_LVL = L2JModSettings.getInt("ChampionMinLevel", 20);
-			L2JMOD_CHAMP_MAX_LVL = L2JModSettings.getInt("ChampionMaxLevel", 60);
-			L2JMOD_CHAMPION_HP = L2JModSettings.getInt("ChampionHp", 7);
-			L2JMOD_CHAMPION_HP_REGEN = L2JModSettings.getFloat("ChampionHpRegen", 1);
-			L2JMOD_CHAMPION_REWARDS_EXP_SP = L2JModSettings.getFloat("ChampionRewardsExpSp", 8);
-			L2JMOD_CHAMPION_REWARDS_CHANCE = L2JModSettings.getFloat("ChampionRewardsChance", 8);
-			L2JMOD_CHAMPION_REWARDS_AMOUNT = L2JModSettings.getFloat("ChampionRewardsAmount", 1);
-			L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE = L2JModSettings.getFloat("ChampionAdenasRewardsChance", 1);
-			L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT = L2JModSettings.getFloat("ChampionAdenasRewardsAmount", 1);
-			L2JMOD_CHAMPION_ATK = L2JModSettings.getFloat("ChampionAtk", 1);
-			L2JMOD_CHAMPION_SPD_ATK = L2JModSettings.getFloat("ChampionSpdAtk", 1);
-			L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = L2JModSettings.getInt("ChampionRewardLowerLvlItemChance", 0);
-			L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = L2JModSettings.getInt("ChampionRewardHigherLvlItemChance", 0);
-			L2JMOD_CHAMPION_REWARD_ID = L2JModSettings.getInt("ChampionRewardItemID", 6393);
-			L2JMOD_CHAMPION_REWARD_QTY = L2JModSettings.getInt("ChampionRewardItemQty", 1);
-			L2JMOD_CHAMPION_ENABLE_VITALITY = L2JModSettings.getBoolean("ChampionEnableVitality", false);
-			L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = L2JModSettings.getBoolean("ChampionEnableInInstances", false);
-			
-			TVT_EVENT_ENABLED = L2JModSettings.getBoolean("TvTEventEnabled", false);
-			TVT_EVENT_IN_INSTANCE = L2JModSettings.getBoolean("TvTEventInInstance", false);
-			TVT_EVENT_INSTANCE_FILE = L2JModSettings.getString("TvTEventInstanceFile", "coliseum.xml");
-			TVT_EVENT_INTERVAL = L2JModSettings.getString("TvTEventInterval", "20:00").split(",");
-			TVT_EVENT_PARTICIPATION_TIME = L2JModSettings.getInt("TvTEventParticipationTime", 3600);
-			TVT_EVENT_RUNNING_TIME = L2JModSettings.getInt("TvTEventRunningTime", 1800);
-			TVT_EVENT_PARTICIPATION_NPC_ID = L2JModSettings.getInt("TvTEventParticipationNpcId", 0);
-			
-			L2JMOD_ALLOW_WEDDING = L2JModSettings.getBoolean("AllowWedding", false);
-			L2JMOD_WEDDING_PRICE = L2JModSettings.getInt("WeddingPrice", 250000000);
-			L2JMOD_WEDDING_PUNISH_INFIDELITY = L2JModSettings.getBoolean("WeddingPunishInfidelity", true);
-			L2JMOD_WEDDING_TELEPORT = L2JModSettings.getBoolean("WeddingTeleport", true);
-			L2JMOD_WEDDING_TELEPORT_PRICE = L2JModSettings.getInt("WeddingTeleportPrice", 50000);
-			L2JMOD_WEDDING_TELEPORT_DURATION = L2JModSettings.getInt("WeddingTeleportDuration", 60);
-			L2JMOD_WEDDING_SAMESEX = L2JModSettings.getBoolean("WeddingAllowSameSex", false);
-			L2JMOD_WEDDING_FORMALWEAR = L2JModSettings.getBoolean("WeddingFormalWear", true);
-			L2JMOD_WEDDING_DIVORCE_COSTS = L2JModSettings.getInt("WeddingDivorceCosts", 20);
-			
-			L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = L2JModSettings.getBoolean("EnableWarehouseSortingClan", false);
-			L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = L2JModSettings.getBoolean("EnableWarehouseSortingPrivate", false);
-			
-			if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
-			{
-				TVT_EVENT_ENABLED = false;
-				LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcId");
-			}
-			else
-			{
-				String[] tvtNpcCoords = L2JModSettings.getString("TvTEventParticipationNpcCoordinates", "0,0,0").split(",");
-				if (tvtNpcCoords.length < 3)
-				{
-					TVT_EVENT_ENABLED = false;
-					LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcCoordinates");
-				}
-				else
-				{
-					TVT_EVENT_REWARDS = new ArrayList<>();
-					TVT_DOORS_IDS_TO_OPEN = new ArrayList<>();
-					TVT_DOORS_IDS_TO_CLOSE = new ArrayList<>();
-					TVT_EVENT_PARTICIPATION_NPC_COORDINATES = new int[4];
-					TVT_EVENT_TEAM_1_COORDINATES = new int[3];
-					TVT_EVENT_TEAM_2_COORDINATES = new int[3];
-					TVT_EVENT_PARTICIPATION_NPC_COORDINATES[0] = Integer.parseInt(tvtNpcCoords[0]);
-					TVT_EVENT_PARTICIPATION_NPC_COORDINATES[1] = Integer.parseInt(tvtNpcCoords[1]);
-					TVT_EVENT_PARTICIPATION_NPC_COORDINATES[2] = Integer.parseInt(tvtNpcCoords[2]);
-					if (tvtNpcCoords.length == 4)
-					{
-						TVT_EVENT_PARTICIPATION_NPC_COORDINATES[3] = Integer.parseInt(tvtNpcCoords[3]);
-					}
-					TVT_EVENT_MIN_PLAYERS_IN_TEAMS = L2JModSettings.getInt("TvTEventMinPlayersInTeams", 1);
-					TVT_EVENT_MAX_PLAYERS_IN_TEAMS = L2JModSettings.getInt("TvTEventMaxPlayersInTeams", 20);
-					TVT_EVENT_MIN_LVL = L2JModSettings.getByte("TvTEventMinPlayerLevel", (byte) 1);
-					TVT_EVENT_MAX_LVL = L2JModSettings.getByte("TvTEventMaxPlayerLevel", (byte) 80);
-					TVT_EVENT_RESPAWN_TELEPORT_DELAY = L2JModSettings.getInt("TvTEventRespawnTeleportDelay", 20);
-					TVT_EVENT_START_LEAVE_TELEPORT_DELAY = L2JModSettings.getInt("TvTEventStartLeaveTeleportDelay", 20);
-					TVT_EVENT_EFFECTS_REMOVAL = L2JModSettings.getInt("TvTEventEffectsRemoval", 0);
-					TVT_EVENT_MAX_PARTICIPANTS_PER_IP = L2JModSettings.getInt("TvTEventMaxParticipantsPerIP", 0);
-					TVT_ALLOW_VOICED_COMMAND = L2JModSettings.getBoolean("TvTAllowVoicedInfoCommand", false);
-					TVT_EVENT_TEAM_1_NAME = L2JModSettings.getString("TvTEventTeam1Name", "Team1");
-					tvtNpcCoords = L2JModSettings.getString("TvTEventTeam1Coordinates", "0,0,0").split(",");
-					if (tvtNpcCoords.length < 3)
-					{
-						TVT_EVENT_ENABLED = false;
-						LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam1Coordinates");
-					}
-					else
-					{
-						TVT_EVENT_TEAM_1_COORDINATES[0] = Integer.parseInt(tvtNpcCoords[0]);
-						TVT_EVENT_TEAM_1_COORDINATES[1] = Integer.parseInt(tvtNpcCoords[1]);
-						TVT_EVENT_TEAM_1_COORDINATES[2] = Integer.parseInt(tvtNpcCoords[2]);
-						TVT_EVENT_TEAM_2_NAME = L2JModSettings.getString("TvTEventTeam2Name", "Team2");
-						tvtNpcCoords = L2JModSettings.getString("TvTEventTeam2Coordinates", "0,0,0").split(",");
-						if (tvtNpcCoords.length < 3)
-						{
-							TVT_EVENT_ENABLED = false;
-							LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam2Coordinates");
-						}
-						else
-						{
-							TVT_EVENT_TEAM_2_COORDINATES[0] = Integer.parseInt(tvtNpcCoords[0]);
-							TVT_EVENT_TEAM_2_COORDINATES[1] = Integer.parseInt(tvtNpcCoords[1]);
-							TVT_EVENT_TEAM_2_COORDINATES[2] = Integer.parseInt(tvtNpcCoords[2]);
-							tvtNpcCoords = L2JModSettings.getString("TvTEventParticipationFee", "0,0").split(",");
-							try
-							{
-								TVT_EVENT_PARTICIPATION_FEE[0] = Integer.parseInt(tvtNpcCoords[0]);
-								TVT_EVENT_PARTICIPATION_FEE[1] = Integer.parseInt(tvtNpcCoords[1]);
-							}
-							catch (NumberFormatException nfe)
-							{
-								if (tvtNpcCoords.length > 0)
-								{
-									LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationFee");
-								}
-							}
-							tvtNpcCoords = L2JModSettings.getString("TvTEventReward", "57,100000").split(";");
-							for (String reward : tvtNpcCoords)
-							{
-								String[] rewardSplit = reward.split(",");
-								if (rewardSplit.length != 2)
-								{
-									LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward {}", reward);
-								}
-								else
-								{
-									try
-									{
-										TVT_EVENT_REWARDS.add(new int[]
-										{
-											Integer.parseInt(rewardSplit[0]),
-											Integer.parseInt(rewardSplit[1])
-										});
-									}
-									catch (NumberFormatException nfe)
-									{
-										if (!reward.isEmpty())
-										{
-											LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward {}", reward);
-										}
-									}
-								}
-							}
-							
-							TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED = L2JModSettings.getBoolean("TvTEventTargetTeamMembersAllowed", true);
-							TVT_EVENT_SCROLL_ALLOWED = L2JModSettings.getBoolean("TvTEventScrollsAllowed", false);
-							TVT_EVENT_POTIONS_ALLOWED = L2JModSettings.getBoolean("TvTEventPotionsAllowed", false);
-							TVT_EVENT_SUMMON_BY_ITEM_ALLOWED = L2JModSettings.getBoolean("TvTEventSummonByItemAllowed", false);
-							TVT_REWARD_TEAM_TIE = L2JModSettings.getBoolean("TvTRewardTeamTie", false);
-							tvtNpcCoords = L2JModSettings.getString("TvTDoorsToOpen", "").split(";");
-							for (String door : tvtNpcCoords)
-							{
-								try
-								{
-									TVT_DOORS_IDS_TO_OPEN.add(Integer.parseInt(door));
-								}
-								catch (NumberFormatException nfe)
-								{
-									if (!door.isEmpty())
-									{
-										LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTDoorsToOpen {}", door);
-									}
-								}
-							}
-							
-							tvtNpcCoords = L2JModSettings.getString("TvTDoorsToClose", "").split(";");
-							for (String door : tvtNpcCoords)
-							{
-								try
-								{
-									TVT_DOORS_IDS_TO_CLOSE.add(Integer.parseInt(door));
-								}
-								catch (NumberFormatException nfe)
-								{
-									if (!door.isEmpty())
-									{
-										LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTDoorsToClose {}", door);
-									}
-								}
-							}
-							
-							tvtNpcCoords = L2JModSettings.getString("TvTEventFighterBuffs", "").split(";");
-							if (!tvtNpcCoords[0].isEmpty())
-							{
-								TVT_EVENT_FIGHTER_BUFFS = new HashMap<>(tvtNpcCoords.length);
-								for (String skill : tvtNpcCoords)
-								{
-									String[] skillSplit = skill.split(",");
-									if (skillSplit.length != 2)
-									{
-										LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventFighterBuffs {}", skill);
-									}
-									else
-									{
-										try
-										{
-											TVT_EVENT_FIGHTER_BUFFS.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
-										}
-										catch (NumberFormatException nfe)
-										{
-											if (!skill.isEmpty())
-											{
-												LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventFighterBuffs {}", skill);
-											}
-										}
-									}
-								}
-							}
-							
-							tvtNpcCoords = L2JModSettings.getString("TvTEventMageBuffs", "").split(";");
-							if (!tvtNpcCoords[0].isEmpty())
-							{
-								TVT_EVENT_MAGE_BUFFS = new HashMap<>(tvtNpcCoords.length);
-								for (String skill : tvtNpcCoords)
-								{
-									String[] skillSplit = skill.split(",");
-									if (skillSplit.length != 2)
-									{
-										LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventMageBuffs {}", skill);
-									}
-									else
-									{
-										try
-										{
-											TVT_EVENT_MAGE_BUFFS.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
-										}
-										catch (NumberFormatException nfe)
-										{
-											if (!skill.isEmpty())
-											{
-												LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventMageBuffs {}", skill);
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-			
-			BANKING_SYSTEM_ENABLED = L2JModSettings.getBoolean("BankingEnabled", false);
-			BANKING_SYSTEM_GOLDBARS = L2JModSettings.getInt("BankingGoldbarCount", 1);
-			BANKING_SYSTEM_ADENA = L2JModSettings.getInt("BankingAdenaCount", 500000000);
-			
-			OFFLINE_TRADE_ENABLE = L2JModSettings.getBoolean("OfflineTradeEnable", false);
-			OFFLINE_CRAFT_ENABLE = L2JModSettings.getBoolean("OfflineCraftEnable", false);
-			OFFLINE_MODE_IN_PEACE_ZONE = L2JModSettings.getBoolean("OfflineModeInPeaceZone", false);
-			OFFLINE_MODE_NO_DAMAGE = L2JModSettings.getBoolean("OfflineModeNoDamage", false);
-			OFFLINE_SET_NAME_COLOR = L2JModSettings.getBoolean("OfflineSetNameColor", false);
-			OFFLINE_NAME_COLOR = Integer.decode("0x" + L2JModSettings.getString("OfflineNameColor", "808080"));
-			OFFLINE_FAME = L2JModSettings.getBoolean("OfflineFame", true);
-			RESTORE_OFFLINERS = L2JModSettings.getBoolean("RestoreOffliners", false);
-			OFFLINE_MAX_DAYS = L2JModSettings.getInt("OfflineMaxDays", 10);
-			OFFLINE_DISCONNECT_FINISHED = L2JModSettings.getBoolean("OfflineDisconnectFinished", true);
-			
-			L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = L2JModSettings.getBoolean("EnableManaPotionSupport", false);
-			
-			L2JMOD_DISPLAY_SERVER_TIME = L2JModSettings.getBoolean("DisplayServerTime", false);
-			
-			WELCOME_MESSAGE_ENABLED = L2JModSettings.getBoolean("ScreenWelcomeMessageEnable", false);
-			WELCOME_MESSAGE_TEXT = L2JModSettings.getString("ScreenWelcomeMessageText", "Welcome to L2J server!");
-			WELCOME_MESSAGE_TIME = L2JModSettings.getInt("ScreenWelcomeMessageTime", 10) * 1000;
-			
-			L2JMOD_ANTIFEED_ENABLE = L2JModSettings.getBoolean("AntiFeedEnable", false);
-			L2JMOD_ANTIFEED_DUALBOX = L2JModSettings.getBoolean("AntiFeedDualbox", true);
-			L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX = L2JModSettings.getBoolean("AntiFeedDisconnectedAsDualbox", true);
-			L2JMOD_ANTIFEED_INTERVAL = L2JModSettings.getInt("AntiFeedInterval", 120) * 1000;
-			ANNOUNCE_PK_PVP = L2JModSettings.getBoolean("AnnouncePkPvP", false);
-			ANNOUNCE_PK_PVP_NORMAL_MESSAGE = L2JModSettings.getBoolean("AnnouncePkPvPNormalMessage", true);
-			ANNOUNCE_PK_MSG = L2JModSettings.getString("AnnouncePkMsg", "$killer has slaughtered $target");
-			ANNOUNCE_PVP_MSG = L2JModSettings.getString("AnnouncePvpMsg", "$killer has defeated $target");
-			
-			L2JMOD_CHAT_ADMIN = L2JModSettings.getBoolean("ChatAdmin", false);
-			
-			L2JMOD_MULTILANG_DEFAULT = L2JModSettings.getString("MultiLangDefault", "en");
-			L2JMOD_MULTILANG_ENABLE = L2JModSettings.getBoolean("MultiLangEnable", false);
-			String[] allowed = L2JModSettings.getString("MultiLangAllowed", L2JMOD_MULTILANG_DEFAULT).split(";");
-			L2JMOD_MULTILANG_ALLOWED = new ArrayList<>(allowed.length);
-			for (String lang : allowed)
-			{
-				L2JMOD_MULTILANG_ALLOWED.add(lang);
-			}
-			
-			if (!L2JMOD_MULTILANG_ALLOWED.contains(L2JMOD_MULTILANG_DEFAULT))
-			{
-				LOG.warn("MultiLang[Config.load()]: default language: {} is not in allowed list !", L2JMOD_MULTILANG_DEFAULT);
-			}
-			
-			L2JMOD_HELLBOUND_STATUS = L2JModSettings.getBoolean("HellboundStatus", false);
-			L2JMOD_MULTILANG_VOICED_ALLOW = L2JModSettings.getBoolean("MultiLangVoiceCommand", true);
-			L2JMOD_MULTILANG_SM_ENABLE = L2JModSettings.getBoolean("MultiLangSystemMessageEnable", false);
-			allowed = L2JModSettings.getString("MultiLangSystemMessageAllowed", "").split(";");
-			L2JMOD_MULTILANG_SM_ALLOWED = new ArrayList<>(allowed.length);
-			for (String lang : allowed)
-			{
-				if (!lang.isEmpty())
-				{
-					L2JMOD_MULTILANG_SM_ALLOWED.add(lang);
-				}
-			}
-			L2JMOD_MULTILANG_NS_ENABLE = L2JModSettings.getBoolean("MultiLangNpcStringEnable", false);
-			allowed = L2JModSettings.getString("MultiLangNpcStringAllowed", "").split(";");
-			L2JMOD_MULTILANG_NS_ALLOWED = new ArrayList<>(allowed.length);
-			for (String lang : allowed)
-			{
-				if (!lang.isEmpty())
-				{
-					L2JMOD_MULTILANG_NS_ALLOWED.add(lang);
-				}
-			}
-			
-			L2WALKER_PROTECTION = L2JModSettings.getBoolean("L2WalkerProtection", false);
-			L2JMOD_DEBUG_VOICE_COMMAND = L2JModSettings.getBoolean("DebugVoiceCommand", false);
-			
-			L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP = L2JModSettings.getInt("DualboxCheckMaxPlayersPerIP", 0);
-			L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP = L2JModSettings.getInt("DualboxCheckMaxOlympiadParticipantsPerIP", 0);
-			L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP = L2JModSettings.getInt("DualboxCheckMaxL2EventParticipantsPerIP", 0);
-			String[] dualboxCheckWhiteList = L2JModSettings.getString("DualboxCheckWhitelist", "127.0.0.1,0").split(";");
-			L2JMOD_DUALBOX_CHECK_WHITELIST = new HashMap<>(dualboxCheckWhiteList.length);
-			for (String entry : dualboxCheckWhiteList)
-			{
-				String[] entrySplit = entry.split(",");
-				if (entrySplit.length != 2)
-				{
-					LOG.warn("DualboxCheck[Config.load()]: invalid config property -> DualboxCheckWhitelist {}", entry);
-				}
-				else
-				{
-					try
-					{
-						int num = Integer.parseInt(entrySplit[1]);
-						num = (num == 0) ? -1 : num;
-						L2JMOD_DUALBOX_CHECK_WHITELIST.put(InetAddress.getByName(entrySplit[0]).hashCode(), num);
-					}
-					catch (UnknownHostException e)
-					{
-						LOG.warn("DualboxCheck[Config.load()]: invalid address -> DualboxCheckWhitelist {}", entrySplit[0]);
-					}
-					catch (NumberFormatException e)
-					{
-						LOG.warn("DualboxCheck[Config.load()]: invalid number -> DualboxCheckWhitelist {}", entrySplit[1]);
-					}
-				}
-			}
-			L2JMOD_ALLOW_CHANGE_PASSWORD = L2JModSettings.getBoolean("AllowChangePassword", false);
-			
-			// Load PvP L2Properties file (if exists)
-			final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE);
-			
-			KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false);
-			KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false);
-			KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5);
-			KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882");
-			KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390");
-			
-			String[] karma = KARMA_NONDROPPABLE_PET_ITEMS.split(",");
-			KARMA_LIST_NONDROPPABLE_PET_ITEMS = new int[karma.length];
-			
-			for (int i = 0; i < karma.length; i++)
-			{
-				KARMA_LIST_NONDROPPABLE_PET_ITEMS[i] = Integer.parseInt(karma[i]);
-			}
-			
-			karma = KARMA_NONDROPPABLE_ITEMS.split(",");
-			KARMA_LIST_NONDROPPABLE_ITEMS = new int[karma.length];
-			
-			for (int i = 0; i < karma.length; i++)
-			{
-				KARMA_LIST_NONDROPPABLE_ITEMS[i] = Integer.parseInt(karma[i]);
-			}
-			
-			// sorting so binarySearch can be used later
-			Arrays.sort(KARMA_LIST_NONDROPPABLE_PET_ITEMS);
-			Arrays.sort(KARMA_LIST_NONDROPPABLE_ITEMS);
-			
-			PVP_NORMAL_TIME = PVPSettings.getInt("PvPVsNormalTime", 120000);
-			PVP_PVP_TIME = PVPSettings.getInt("PvPVsPvPTime", 60000);
-			
-			// Load Olympiad L2Properties file (if exists)
-			final PropertiesParser Olympiad = new PropertiesParser(OLYMPIAD_CONFIG_FILE);
-			
-			ALT_OLY_START_TIME = Olympiad.getInt("AltOlyStartTime", 18);
-			ALT_OLY_MIN = Olympiad.getInt("AltOlyMin", 0);
-			ALT_OLY_MAX_BUFFS = Olympiad.getInt("AltOlyMaxBuffs", 5);
-			ALT_OLY_CPERIOD = Olympiad.getLong("AltOlyCPeriod", 21600000);
-			ALT_OLY_BATTLE = Olympiad.getLong("AltOlyBattle", 300000);
-			ALT_OLY_WPERIOD = Olympiad.getLong("AltOlyWPeriod", 604800000);
-			ALT_OLY_VPERIOD = Olympiad.getLong("AltOlyVPeriod", 86400000);
-			ALT_OLY_START_POINTS = Olympiad.getInt("AltOlyStartPoints", 10);
-			ALT_OLY_WEEKLY_POINTS = Olympiad.getInt("AltOlyWeeklyPoints", 10);
-			ALT_OLY_CLASSED = Olympiad.getInt("AltOlyClassedParticipants", 11);
-			ALT_OLY_NONCLASSED = Olympiad.getInt("AltOlyNonClassedParticipants", 11);
-			ALT_OLY_TEAMS = Olympiad.getInt("AltOlyTeamsParticipants", 6);
-			ALT_OLY_REG_DISPLAY = Olympiad.getInt("AltOlyRegistrationDisplayNumber", 100);
-			ALT_OLY_CLASSED_REWARD = parseItemsList(Olympiad.getString("AltOlyClassedReward", "13722,50"));
-			ALT_OLY_NONCLASSED_REWARD = parseItemsList(Olympiad.getString("AltOlyNonClassedReward", "13722,40"));
-			ALT_OLY_TEAM_REWARD = parseItemsList(Olympiad.getString("AltOlyTeamReward", "13722,85"));
-			ALT_OLY_COMP_RITEM = Olympiad.getInt("AltOlyCompRewItem", 13722);
-			ALT_OLY_MIN_MATCHES = Olympiad.getInt("AltOlyMinMatchesForPoints", 15);
-			ALT_OLY_GP_PER_POINT = Olympiad.getInt("AltOlyGPPerPoint", 1000);
-			ALT_OLY_HERO_POINTS = Olympiad.getInt("AltOlyHeroPoints", 200);
-			ALT_OLY_RANK1_POINTS = Olympiad.getInt("AltOlyRank1Points", 100);
-			ALT_OLY_RANK2_POINTS = Olympiad.getInt("AltOlyRank2Points", 75);
-			ALT_OLY_RANK3_POINTS = Olympiad.getInt("AltOlyRank3Points", 55);
-			ALT_OLY_RANK4_POINTS = Olympiad.getInt("AltOlyRank4Points", 40);
-			ALT_OLY_RANK5_POINTS = Olympiad.getInt("AltOlyRank5Points", 30);
-			ALT_OLY_MAX_POINTS = Olympiad.getInt("AltOlyMaxPoints", 10);
-			ALT_OLY_DIVIDER_CLASSED = Olympiad.getInt("AltOlyDividerClassed", 5);
-			ALT_OLY_DIVIDER_NON_CLASSED = Olympiad.getInt("AltOlyDividerNonClassed", 5);
-			ALT_OLY_MAX_WEEKLY_MATCHES = Olympiad.getInt("AltOlyMaxWeeklyMatches", 70);
-			ALT_OLY_MAX_WEEKLY_MATCHES_NON_CLASSED = Olympiad.getInt("AltOlyMaxWeeklyMatchesNonClassed", 60);
-			ALT_OLY_MAX_WEEKLY_MATCHES_CLASSED = Olympiad.getInt("AltOlyMaxWeeklyMatchesClassed", 30);
-			ALT_OLY_MAX_WEEKLY_MATCHES_TEAM = Olympiad.getInt("AltOlyMaxWeeklyMatchesTeam", 10);
-			ALT_OLY_LOG_FIGHTS = Olympiad.getBoolean("AltOlyLogFights", false);
-			ALT_OLY_SHOW_MONTHLY_WINNERS = Olympiad.getBoolean("AltOlyShowMonthlyWinners", true);
-			ALT_OLY_ANNOUNCE_GAMES = Olympiad.getBoolean("AltOlyAnnounceGames", true);
-			String[] olyRestrictedItems = Olympiad.getString("AltOlyRestrictedItems", "6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,9388,9389,9390,17049,17050,17051,17052,17053,17054,17055,17056,17057,17058,17059,17060,17061,20759,20775,20776,20777,20778,14774").split(",");
-			LIST_OLY_RESTRICTED_ITEMS = new ArrayList<>(olyRestrictedItems.length);
-			for (String id : olyRestrictedItems)
-			{
-				LIST_OLY_RESTRICTED_ITEMS.add(Integer.parseInt(id));
-			}
-			ALT_OLY_ENCHANT_LIMIT = Olympiad.getInt("AltOlyEnchantLimit", -1);
-			ALT_OLY_WAIT_TIME = Olympiad.getInt("AltOlyWaitTime", 120);
-			
-			final File hexIdFile = new File(HEXID_FILE);
-			if (hexIdFile.exists())
-			{
-				final PropertiesParser hexId = new PropertiesParser(hexIdFile);
-				
-				if (hexId.containskey("ServerID") && hexId.containskey("HexID"))
-				{
-					SERVER_ID = hexId.getInt("ServerID", 1);
-					try
-					{
-						HEX_ID = new BigInteger(hexId.getString("HexID", null), 16).toByteArray();
-					}
-					catch (Exception e)
-					{
-						LOG.warn("Could not load HexID file ({}). Hopefully login will give us one.", HEXID_FILE);
-					}
-				}
-				else
-				{
-					LOG.warn("Could not load HexID file ({}). Hopefully login will give us one.", HEXID_FILE);
-				}
-			}
-			else
-			{
-				LOG.warn("Could not load HexID file ({}). Hopefully login will give us one.", HEXID_FILE);
-			}
-			
-			// Grand bosses
-			final PropertiesParser GrandBossSettings = new PropertiesParser(GRANDBOSS_CONFIG_FILE);
-			
-			ANTHARAS_WAIT_TIME = GrandBossSettings.getInt("AntharasWaitTime", 30);
-			ANTHARAS_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfAntharasSpawn", 264);
-			ANTHARAS_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfAntharasSpawn", 72);
-			
-			VALAKAS_WAIT_TIME = GrandBossSettings.getInt("ValakasWaitTime", 30);
-			VALAKAS_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfValakasSpawn", 264);
-			VALAKAS_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfValakasSpawn", 72);
-			
-			BAIUM_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfBaiumSpawn", 168);
-			BAIUM_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfBaiumSpawn", 48);
-			
-			CORE_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfCoreSpawn", 60);
-			CORE_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfCoreSpawn", 24);
-			
-			ORFEN_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfOrfenSpawn", 48);
-			ORFEN_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfOrfenSpawn", 20);
-			
-			QUEEN_ANT_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfQueenAntSpawn", 36);
-			QUEEN_ANT_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfQueenAntSpawn", 17);
-			
-			BELETH_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfBelethSpawn", 192);
-			BELETH_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfBelethSpawn", 148);
-			BELETH_MIN_PLAYERS = GrandBossSettings.getInt("BelethMinPlayers", 36);
-			
-			// Gracia Seeds
-			final PropertiesParser GraciaSeedsSettings = new PropertiesParser(GRACIASEEDS_CONFIG_FILE);
-			
-			// Seed of Destruction
-			SOD_TIAT_KILL_COUNT = GraciaSeedsSettings.getInt("TiatKillCountForNextState", 10);
-			SOD_STAGE_2_LENGTH = GraciaSeedsSettings.getLong("Stage2Length", 720) * 60000;
-			
-			try
-			{
-				//@formatter:off
-				FILTER_LIST = Files.lines(Paths.get(CHAT_FILTER_FILE), StandardCharsets.UTF_8)
-					.map(String::trim)
-					.filter(line -> (!line.isEmpty() && (line.charAt(0) != '#')))
-					.collect(Collectors.toList());
-				//@formatter:on
-				LOG.info("Loaded {} filter words.", FILTER_LIST.size());
-			}
-			catch (IOException ioe)
-			{
-				LOG.warn("Error while loading chat filter words!", ioe);
-			}
-			
-			final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_FILE);
-			
-			CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500);
-			CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4);
-			CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1);
-			CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false);
-			CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0);
-			CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0);
-			
-			final PropertiesParser geoData = new PropertiesParser(GEODATA_FILE);
-			
-			try
-			{
-				PATHNODE_DIR = new File(geoData.getString("PathnodeDirectory", "data/pathnode").replaceAll("\\\\", "/")).getCanonicalFile();
-			}
-			catch (IOException e)
-			{
-				LOG.warn("Error setting pathnode directory!", e);
-				PATHNODE_DIR = new File("data/pathnode");
-			}
-			
-			PATHFINDING = geoData.getInt("PathFinding", 0);
-			PATHFIND_BUFFERS = geoData.getString("PathFindBuffers", "100x6;128x6;192x6;256x4;320x4;384x4;500x2");
-			LOW_WEIGHT = geoData.getFloat("LowWeight", 0.5f);
-			MEDIUM_WEIGHT = geoData.getFloat("MediumWeight", 2);
-			HIGH_WEIGHT = geoData.getFloat("HighWeight", 3);
-			ADVANCED_DIAGONAL_STRATEGY = geoData.getBoolean("AdvancedDiagonalStrategy", true);
-			DIAGONAL_WEIGHT = geoData.getFloat("DiagonalWeight", 0.707f);
-			MAX_POSTFILTER_PASSES = geoData.getInt("MaxPostfilterPasses", 3);
-			DEBUG_PATH = geoData.getBoolean("DebugPath", false);
-			FORCE_GEODATA = geoData.getBoolean("ForceGeoData", true);
-			COORD_SYNCHRONIZE = geoData.getInt("CoordSynchronize", -1);
-			GEODATA_PATH = Paths.get(geoData.getString("GeoDataPath", "./data/geodata"));
-			TRY_LOAD_UNSPECIFIED_REGIONS = geoData.getBoolean("TryLoadUnspecifiedRegions", true);
-			GEODATA_REGIONS = new HashMap<>();
-			for (int regionX = L2World.TILE_X_MIN; regionX <= L2World.TILE_X_MAX; regionX++)
-			{
-				for (int regionY = L2World.TILE_Y_MIN; regionY <= L2World.TILE_Y_MAX; regionY++)
-				{
-					String key = regionX + "_" + regionY;
-					if (geoData.containskey(regionX + "_" + regionY))
-					{
-						GEODATA_REGIONS.put(key, geoData.getBoolean(key, false));
-					}
-				}
-			}
-		}
-		else if (Server.serverMode == Server.MODE_LOGINSERVER)
-		{
-			final PropertiesParser ServerSettings = new PropertiesParser(LOGIN_CONFIGURATION_FILE);
-			
-			ENABLE_UPNP = ServerSettings.getBoolean("EnableUPnP", true);
-			GAME_SERVER_LOGIN_HOST = ServerSettings.getString("LoginHostname", "127.0.0.1");
-			GAME_SERVER_LOGIN_PORT = ServerSettings.getInt("LoginPort", 9014);
-			
-			LOGIN_BIND_ADDRESS = ServerSettings.getString("LoginserverHostname", "*");
-			PORT_LOGIN = ServerSettings.getInt("LoginserverPort", 2106);
-			
-			try
-			{
-				DATAPACK_ROOT = new File(ServerSettings.getString("DatapackRoot", ".").replaceAll("\\\\", "/")).getCanonicalFile();
-			}
-			catch (IOException e)
-			{
-				LOG.warn("Error setting datapack root!", e);
-				DATAPACK_ROOT = new File(".");
-			}
-			
-			DEBUG = ServerSettings.getBoolean("Debug", false);
-			
-			ACCEPT_NEW_GAMESERVER = ServerSettings.getBoolean("AcceptNewGameServer", true);
-			
-			LOGIN_TRY_BEFORE_BAN = ServerSettings.getInt("LoginTryBeforeBan", 5);
-			LOGIN_BLOCK_AFTER_BAN = ServerSettings.getInt("LoginBlockAfterBan", 900);
-			
-			LOGIN_SERVER_SCHEDULE_RESTART = ServerSettings.getBoolean("LoginRestartSchedule", false);
-			LOGIN_SERVER_SCHEDULE_RESTART_TIME = ServerSettings.getLong("LoginRestartTime", 24);
-			
-			DATABASE_DRIVER = ServerSettings.getString("Driver", "com.mysql.jdbc.Driver");
-			DATABASE_URL = ServerSettings.getString("URL", "jdbc:mysql://localhost/l2jls?useSSL=false&serverTimezone=UTC");
-			DATABASE_LOGIN = ServerSettings.getString("Login", "root");
-			DATABASE_PASSWORD = ServerSettings.getString("Password", "toor");
-			DATABASE_CONNECTION_POOL = ServerSettings.getString("ConnectionPool", "HikariCP");
-			DATABASE_MAX_CONNECTIONS = ServerSettings.getInt("MaximumDbConnections", 10);
-			DATABASE_MAX_IDLE_TIME = ServerSettings.getInt("MaximumDbIdleTime", 0);
-			CONNECTION_CLOSE_TIME = ServerSettings.getLong("ConnectionCloseTime", 60000);
-			
-			SHOW_LICENCE = ServerSettings.getBoolean("ShowLicence", true);
-			
-			AUTO_CREATE_ACCOUNTS = ServerSettings.getBoolean("AutoCreateAccounts", true);
-			
-			FLOOD_PROTECTION = ServerSettings.getBoolean("EnableFloodProtection", true);
-			FAST_CONNECTION_LIMIT = ServerSettings.getInt("FastConnectionLimit", 15);
-			NORMAL_CONNECTION_TIME = ServerSettings.getInt("NormalConnectionTime", 700);
-			FAST_CONNECTION_TIME = ServerSettings.getInt("FastConnectionTime", 350);
-			MAX_CONNECTION_PER_IP = ServerSettings.getInt("MaxConnectionPerIP", 50);
-			
-			// MMO
-			final PropertiesParser mmoSettings = new PropertiesParser(MMO_CONFIG_FILE);
-			
-			MMO_SELECTOR_SLEEP_TIME = mmoSettings.getInt("SleepTime", 20);
-			MMO_MAX_SEND_PER_PASS = mmoSettings.getInt("MaxSendPerPass", 12);
-			MMO_MAX_READ_PER_PASS = mmoSettings.getInt("MaxReadPerPass", 12);
-			MMO_HELPER_BUFFER_COUNT = mmoSettings.getInt("HelperBufferCount", 20);
-			MMO_TCP_NODELAY = mmoSettings.getBoolean("TcpNoDelay", false);
-			
-			// Load Telnet L2Properties file (if exists)
-			final PropertiesParser telnetSettings = new PropertiesParser(TELNET_FILE);
-			
-			IS_TELNET_ENABLED = telnetSettings.getBoolean("EnableTelnet", false);
-			
-			// Email
-			final PropertiesParser emailSettings = new PropertiesParser(EMAIL_CONFIG_FILE);
-			
-			EMAIL_SERVERINFO_NAME = emailSettings.getString("ServerInfoName", "Unconfigured L2J Server");
-			EMAIL_SERVERINFO_ADDRESS = emailSettings.getString("ServerInfoAddress", "info@myl2jserver.com");
-			
-			EMAIL_SYS_ENABLED = emailSettings.getBoolean("EmailSystemEnabled", false);
-			EMAIL_SYS_HOST = emailSettings.getString("SmtpServerHost", "smtp.gmail.com");
-			EMAIL_SYS_PORT = emailSettings.getInt("SmtpServerPort", 465);
-			EMAIL_SYS_SMTP_AUTH = emailSettings.getBoolean("SmtpAuthRequired", true);
-			EMAIL_SYS_FACTORY = emailSettings.getString("SmtpFactory", "javax.net.ssl.SSLSocketFactory");
-			EMAIL_SYS_FACTORY_CALLBACK = emailSettings.getBoolean("SmtpFactoryCallback", false);
-			EMAIL_SYS_USERNAME = emailSettings.getString("SmtpUsername", "user@gmail.com");
-			EMAIL_SYS_PASSWORD = emailSettings.getString("SmtpPassword", "password");
-			EMAIL_SYS_ADDRESS = emailSettings.getString("EmailSystemAddress", "noreply@myl2jserver.com");
-			EMAIL_SYS_SELECTQUERY = emailSettings.getString("EmailDBSelectQuery", "SELECT value FROM account_data WHERE account_name=? AND var='email_addr'");
-			EMAIL_SYS_DBFIELD = emailSettings.getString("EmailDBField", "value");
-		}
-		else
-		{
-			LOG.error("Could not Load Config: server mode was not set!");
-		}
-	}
-	
-	/**
-	 * Set a new value to a config parameter.
-	 * @param pName the name of the parameter whose value to change
-	 * @param pValue the new value of the parameter
-	 * @return {@code true} if the value of the parameter was changed, {@code false} otherwise
-	 */
-	public static boolean setParameterValue(String pName, String pValue)
-	{
-		switch (pName.trim().toLowerCase())
-		{
-			// rates.properties
-			case "ratexp":
-				RATE_XP = Float.parseFloat(pValue);
-				break;
-			case "ratesp":
-				RATE_SP = Float.parseFloat(pValue);
-				break;
-			case "ratepartyxp":
-				RATE_PARTY_XP = Float.parseFloat(pValue);
-				break;
-			case "rateextractable":
-				RATE_EXTRACTABLE = Float.parseFloat(pValue);
-				break;
-			case "ratedropadena":
-				RATE_DROP_AMOUNT_MULTIPLIER.put(Inventory.ADENA_ID, Float.parseFloat(pValue));
-				break;
-			case "ratedropmanor":
-				RATE_DROP_MANOR = Integer.parseInt(pValue);
-				break;
-			case "ratequestdrop":
-				RATE_QUEST_DROP = Float.parseFloat(pValue);
-				break;
-			case "ratequestreward":
-				RATE_QUEST_REWARD = Float.parseFloat(pValue);
-				break;
-			case "ratequestrewardxp":
-				RATE_QUEST_REWARD_XP = Float.parseFloat(pValue);
-				break;
-			case "ratequestrewardsp":
-				RATE_QUEST_REWARD_SP = Float.parseFloat(pValue);
-				break;
-			case "ratequestrewardadena":
-				RATE_QUEST_REWARD_ADENA = Float.parseFloat(pValue);
-				break;
-			case "usequestrewardmultipliers":
-				RATE_QUEST_REWARD_USE_MULTIPLIERS = Boolean.parseBoolean(pValue);
-				break;
-			case "ratequestrewardpotion":
-				RATE_QUEST_REWARD_POTION = Float.parseFloat(pValue);
-				break;
-			case "ratequestrewardscroll":
-				RATE_QUEST_REWARD_SCROLL = Float.parseFloat(pValue);
-				break;
-			case "ratequestrewardrecipe":
-				RATE_QUEST_REWARD_RECIPE = Float.parseFloat(pValue);
-				break;
-			case "ratequestrewardmaterial":
-				RATE_QUEST_REWARD_MATERIAL = Float.parseFloat(pValue);
-				break;
-			case "ratehellboundtrustincrease":
-				RATE_HB_TRUST_INCREASE = Float.parseFloat(pValue);
-				break;
-			case "ratehellboundtrustdecrease":
-				RATE_HB_TRUST_DECREASE = Float.parseFloat(pValue);
-				break;
-			case "ratevitalitylevel1":
-				RATE_VITALITY_LEVEL_1 = Float.parseFloat(pValue);
-				break;
-			case "ratevitalitylevel2":
-				RATE_VITALITY_LEVEL_2 = Float.parseFloat(pValue);
-				break;
-			case "ratevitalitylevel3":
-				RATE_VITALITY_LEVEL_3 = Float.parseFloat(pValue);
-				break;
-			case "ratevitalitylevel4":
-				RATE_VITALITY_LEVEL_4 = Float.parseFloat(pValue);
-				break;
-			case "raterecoverypeacezone":
-				RATE_RECOVERY_VITALITY_PEACE_ZONE = Float.parseFloat(pValue);
-				break;
-			case "ratevitalitylost":
-				RATE_VITALITY_LOST = Float.parseFloat(pValue);
-				break;
-			case "ratevitalitygain":
-				RATE_VITALITY_GAIN = Float.parseFloat(pValue);
-				break;
-			case "raterecoveryonreconnect":
-				RATE_RECOVERY_ON_RECONNECT = Float.parseFloat(pValue);
-				break;
-			case "ratekarmaexplost":
-				RATE_KARMA_EXP_LOST = Float.parseFloat(pValue);
-				break;
-			case "ratesiegeguardsprice":
-				RATE_SIEGE_GUARDS_PRICE = Float.parseFloat(pValue);
-				break;
-			case "ratecommonherbs":
-				RATE_DROP_COMMON_HERBS = Float.parseFloat(pValue);
-				break;
-			case "ratehpherbs":
-				RATE_DROP_HP_HERBS = Float.parseFloat(pValue);
-				break;
-			case "ratempherbs":
-				RATE_DROP_MP_HERBS = Float.parseFloat(pValue);
-				break;
-			case "ratespecialherbs":
-				RATE_DROP_SPECIAL_HERBS = Float.parseFloat(pValue);
-				break;
-			case "ratevitalityherbs":
-				RATE_DROP_VITALITY_HERBS = Float.parseFloat(pValue);
-				break;
-			case "playerdroplimit":
-				PLAYER_DROP_LIMIT = Integer.parseInt(pValue);
-				break;
-			case "playerratedrop":
-				PLAYER_RATE_DROP = Integer.parseInt(pValue);
-				break;
-			case "playerratedropitem":
-				PLAYER_RATE_DROP_ITEM = Integer.parseInt(pValue);
-				break;
-			case "playerratedropequip":
-				PLAYER_RATE_DROP_EQUIP = Integer.parseInt(pValue);
-				break;
-			case "playerratedropequipweapon":
-				PLAYER_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue);
-				break;
-			case "petxprate":
-				PET_XP_RATE = Float.parseFloat(pValue);
-				break;
-			case "petfoodrate":
-				PET_FOOD_RATE = Integer.parseInt(pValue);
-				break;
-			case "sineaterxprate":
-				SINEATER_XP_RATE = Float.parseFloat(pValue);
-				break;
-			case "karmadroplimit":
-				KARMA_DROP_LIMIT = Integer.parseInt(pValue);
-				break;
-			case "karmaratedrop":
-				KARMA_RATE_DROP = Integer.parseInt(pValue);
-				break;
-			case "karmaratedropitem":
-				KARMA_RATE_DROP_ITEM = Integer.parseInt(pValue);
-				break;
-			case "karmaratedropequip":
-				KARMA_RATE_DROP_EQUIP = Integer.parseInt(pValue);
-				break;
-			case "karmaratedropequipweapon":
-				KARMA_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue);
-				break;
-			case "autodestroydroppeditemafter":
-				AUTODESTROY_ITEM_AFTER = Integer.parseInt(pValue);
-				break;
-			case "destroyplayerdroppeditem":
-				DESTROY_DROPPED_PLAYER_ITEM = Boolean.parseBoolean(pValue);
-				break;
-			case "destroyequipableitem":
-				DESTROY_EQUIPABLE_PLAYER_ITEM = Boolean.parseBoolean(pValue);
-				break;
-			case "savedroppeditem":
-				SAVE_DROPPED_ITEM = Boolean.parseBoolean(pValue);
-				break;
-			case "emptydroppeditemtableafterload":
-				EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = Boolean.parseBoolean(pValue);
-				break;
-			case "savedroppediteminterval":
-				SAVE_DROPPED_ITEM_INTERVAL = Integer.parseInt(pValue);
-				break;
-			case "cleardroppeditemtable":
-				CLEAR_DROPPED_ITEM_TABLE = Boolean.parseBoolean(pValue);
-				break;
-			case "precisedropcalculation":
-				PRECISE_DROP_CALCULATION = Boolean.parseBoolean(pValue);
-				break;
-			case "multipleitemdrop":
-				MULTIPLE_ITEM_DROP = Boolean.parseBoolean(pValue);
-				break;
-			case "lowweight":
-				LOW_WEIGHT = Float.parseFloat(pValue);
-				break;
-			case "mediumweight":
-				MEDIUM_WEIGHT = Float.parseFloat(pValue);
-				break;
-			case "highweight":
-				HIGH_WEIGHT = Float.parseFloat(pValue);
-				break;
-			case "advanceddiagonalstrategy":
-				ADVANCED_DIAGONAL_STRATEGY = Boolean.parseBoolean(pValue);
-				break;
-			case "diagonalweight":
-				DIAGONAL_WEIGHT = Float.parseFloat(pValue);
-				break;
-			case "maxpostfilterpasses":
-				MAX_POSTFILTER_PASSES = Integer.parseInt(pValue);
-				break;
-			case "coordsynchronize":
-				COORD_SYNCHRONIZE = Integer.parseInt(pValue);
-				break;
-			case "deletecharafterdays":
-				DELETE_DAYS = Integer.parseInt(pValue);
-				break;
-			case "clientpacketqueuesize":
-				CLIENT_PACKET_QUEUE_SIZE = Integer.parseInt(pValue);
-				if (CLIENT_PACKET_QUEUE_SIZE == 0)
-				{
-					CLIENT_PACKET_QUEUE_SIZE = MMO_MAX_READ_PER_PASS + 1;
-				}
-				break;
-			case "clientpacketqueuemaxburstsize":
-				CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = Integer.parseInt(pValue);
-				if (CLIENT_PACKET_QUEUE_MAX_BURST_SIZE == 0)
-				{
-					CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = MMO_MAX_READ_PER_PASS;
-				}
-				break;
-			case "clientpacketqueuemaxpacketspersecond":
-				CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND = Integer.parseInt(pValue);
-				break;
-			case "clientpacketqueuemeasureinterval":
-				CLIENT_PACKET_QUEUE_MEASURE_INTERVAL = Integer.parseInt(pValue);
-				break;
-			case "clientpacketqueuemaxaveragepacketspersecond":
-				CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND = Integer.parseInt(pValue);
-				break;
-			case "clientpacketqueuemaxfloodspermin":
-				CLIENT_PACKET_QUEUE_MAX_FLOODS_PER_MIN = Integer.parseInt(pValue);
-				break;
-			case "clientpacketqueuemaxoverflowspermin":
-				CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN = Integer.parseInt(pValue);
-				break;
-			case "clientpacketqueuemaxunderflowspermin":
-				CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN = Integer.parseInt(pValue);
-				break;
-			case "clientpacketqueuemaxunknownpermin":
-				CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = Integer.parseInt(pValue);
-				break;
-			case "allowdiscarditem":
-				ALLOW_DISCARDITEM = Boolean.parseBoolean(pValue);
-				break;
-			case "allowrefund":
-				ALLOW_REFUND = Boolean.parseBoolean(pValue);
-				break;
-			case "allowwarehouse":
-				ALLOW_WAREHOUSE = Boolean.parseBoolean(pValue);
-				break;
-			case "allowwear":
-				ALLOW_WEAR = Boolean.parseBoolean(pValue);
-				break;
-			case "weardelay":
-				WEAR_DELAY = Integer.parseInt(pValue);
-				break;
-			case "wearprice":
-				WEAR_PRICE = Integer.parseInt(pValue);
-				break;
-			case "defaultfinishtime":
-				INSTANCE_FINISH_TIME = Integer.parseInt(pValue);
-				break;
-			case "restoreplayerinstance":
-				RESTORE_PLAYER_INSTANCE = Boolean.parseBoolean(pValue);
-				break;
-			case "allowsummonininstance":
-				ALLOW_SUMMON_IN_INSTANCE = Boolean.parseBoolean(pValue);
-				break;
-			case "ejectdeadplayertime":
-				EJECT_DEAD_PLAYER_TIME = Integer.parseInt(pValue);
-				break;
-			case "allowwater":
-				ALLOW_WATER = Boolean.parseBoolean(pValue);
-				break;
-			case "allowrentpet":
-				ALLOW_RENTPET = Boolean.parseBoolean(pValue);
-				break;
-			case "boatbroadcastradius":
-				BOAT_BROADCAST_RADIUS = Integer.parseInt(pValue);
-				break;
-			case "allowcursedweapons":
-				ALLOW_CURSED_WEAPONS = Boolean.parseBoolean(pValue);
-				break;
-			case "allowmanor":
-				ALLOW_MANOR = Boolean.parseBoolean(pValue);
-				break;
-			case "allowpetwalkers":
-				ALLOW_PET_WALKERS = Boolean.parseBoolean(pValue);
-				break;
-			case "enablecommunityboard":
-				ENABLE_COMMUNITY_BOARD = Boolean.parseBoolean(pValue);
-				break;
-			case "bbsdefault":
-				BBS_DEFAULT = pValue;
-				break;
-			case "showservernews":
-				SERVER_NEWS = Boolean.parseBoolean(pValue);
-				break;
-			case "shownpclevel":
-				SHOW_NPC_LVL = Boolean.parseBoolean(pValue);
-				break;
-			case "showcrestwithoutquest":
-				SHOW_CREST_WITHOUT_QUEST = Boolean.parseBoolean(pValue);
-				break;
-			case "forceinventoryupdate":
-				FORCE_INVENTORY_UPDATE = Boolean.parseBoolean(pValue);
-				break;
-			case "autodeleteinvalidquestdata":
-				AUTODELETE_INVALID_QUEST_DATA = Boolean.parseBoolean(pValue);
-				break;
-			case "maximumonlineusers":
-				MAXIMUM_ONLINE_USERS = Integer.parseInt(pValue);
-				break;
-			case "peacezonemode":
-				PEACE_ZONE_MODE = Integer.parseInt(pValue);
-				break;
-			case "checkknownlist":
-				CHECK_KNOWN = Boolean.parseBoolean(pValue);
-				break;
-			case "maxdriftrange":
-				MAX_DRIFT_RANGE = Integer.parseInt(pValue);
-				break;
-			case "usedeepbluedroprules":
-				DEEPBLUE_DROP_RULES = Boolean.parseBoolean(pValue);
-				break;
-			case "usedeepbluedroprulesraid":
-				DEEPBLUE_DROP_RULES_RAID = Boolean.parseBoolean(pValue);
-				break;
-			case "guardattackaggromob":
-				GUARD_ATTACK_AGGRO_MOB = Boolean.parseBoolean(pValue);
-				break;
-			case "maximumslotsfornodwarf":
-				INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(pValue);
-				break;
-			case "maximumslotsfordwarf":
-				INVENTORY_MAXIMUM_DWARF = Integer.parseInt(pValue);
-				break;
-			case "maximumslotsforgmplayer":
-				INVENTORY_MAXIMUM_GM = Integer.parseInt(pValue);
-				break;
-			case "maximumslotsforquestitems":
-				INVENTORY_MAXIMUM_QUEST_ITEMS = Integer.parseInt(pValue);
-				break;
-			case "maximumwarehouseslotsfornodwarf":
-				WAREHOUSE_SLOTS_NO_DWARF = Integer.parseInt(pValue);
-				break;
-			case "maximumwarehouseslotsfordwarf":
-				WAREHOUSE_SLOTS_DWARF = Integer.parseInt(pValue);
-				break;
-			case "maximumwarehouseslotsforclan":
-				WAREHOUSE_SLOTS_CLAN = Integer.parseInt(pValue);
-				break;
-			case "enchantchanceelementstone":
-				ENCHANT_CHANCE_ELEMENT_STONE = Double.parseDouble(pValue);
-				break;
-			case "enchantchanceelementcrystal":
-				ENCHANT_CHANCE_ELEMENT_CRYSTAL = Double.parseDouble(pValue);
-				break;
-			case "enchantchanceelementjewel":
-				ENCHANT_CHANCE_ELEMENT_JEWEL = Double.parseDouble(pValue);
-				break;
-			case "enchantchanceelementenergy":
-				ENCHANT_CHANCE_ELEMENT_ENERGY = Double.parseDouble(pValue);
-				break;
-			case "augmentationngskillchance":
-				AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "augmentationngglowchance":
-				AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "augmentationmidskillchance":
-				AUGMENTATION_MID_SKILL_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "augmentationmidglowchance":
-				AUGMENTATION_MID_GLOW_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "augmentationhighskillchance":
-				AUGMENTATION_HIGH_SKILL_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "augmentationhighglowchance":
-				AUGMENTATION_HIGH_GLOW_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "augmentationtopskillchance":
-				AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "augmentationtopglowchance":
-				AUGMENTATION_TOP_GLOW_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "augmentationbasestatchance":
-				AUGMENTATION_BASESTAT_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "hpregenmultiplier":
-				HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
-				break;
-			case "mpregenmultiplier":
-				MP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
-				break;
-			case "cpregenmultiplier":
-				CP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
-				break;
-			case "raidhpregenmultiplier":
-				RAID_HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
-				break;
-			case "raidmpregenmultiplier":
-				RAID_MP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
-				break;
-			case "raidpdefencemultiplier":
-				RAID_PDEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100;
-				break;
-			case "raidmdefencemultiplier":
-				RAID_MDEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100;
-				break;
-			case "raidpattackmultiplier":
-				RAID_PATTACK_MULTIPLIER = Double.parseDouble(pValue) / 100;
-				break;
-			case "raidmattackmultiplier":
-				RAID_MATTACK_MULTIPLIER = Double.parseDouble(pValue) / 100;
-				break;
-			case "raidminionrespawntime":
-				RAID_MINION_RESPAWN_TIMER = Integer.parseInt(pValue);
-				break;
-			case "raidchaostime":
-				RAID_CHAOS_TIME = Integer.parseInt(pValue);
-				break;
-			case "grandchaostime":
-				GRAND_CHAOS_TIME = Integer.parseInt(pValue);
-				break;
-			case "minionchaostime":
-				MINION_CHAOS_TIME = Integer.parseInt(pValue);
-				break;
-			case "startingadena":
-				STARTING_ADENA = Long.parseLong(pValue);
-				break;
-			case "startinglevel":
-				STARTING_LEVEL = Byte.parseByte(pValue);
-				break;
-			case "startingsp":
-				STARTING_SP = Integer.parseInt(pValue);
-				break;
-			case "unstuckinterval":
-				UNSTUCK_INTERVAL = Integer.parseInt(pValue);
-				break;
-			case "teleportwatchdogtimeout":
-				TELEPORT_WATCHDOG_TIMEOUT = Integer.parseInt(pValue);
-				break;
-			case "playerspawnprotection":
-				PLAYER_SPAWN_PROTECTION = Integer.parseInt(pValue);
-				break;
-			case "playerfakedeathupprotection":
-				PLAYER_FAKEDEATH_UP_PROTECTION = Integer.parseInt(pValue);
-				break;
-			case "partyxpcutoffmethod":
-				PARTY_XP_CUTOFF_METHOD = pValue;
-				break;
-			case "partyxpcutoffpercent":
-				PARTY_XP_CUTOFF_PERCENT = Double.parseDouble(pValue);
-				break;
-			case "partyxpcutofflevel":
-				PARTY_XP_CUTOFF_LEVEL = Integer.parseInt(pValue);
-				break;
-			case "respawnrestorecp":
-				RESPAWN_RESTORE_CP = Double.parseDouble(pValue) / 100;
-				break;
-			case "respawnrestorehp":
-				RESPAWN_RESTORE_HP = Double.parseDouble(pValue) / 100;
-				break;
-			case "respawnrestoremp":
-				RESPAWN_RESTORE_MP = Double.parseDouble(pValue) / 100;
-				break;
-			case "maxpvtstoresellslotsdwarf":
-				MAX_PVTSTORESELL_SLOTS_DWARF = Integer.parseInt(pValue);
-				break;
-			case "maxpvtstoresellslotsother":
-				MAX_PVTSTORESELL_SLOTS_OTHER = Integer.parseInt(pValue);
-				break;
-			case "maxpvtstorebuyslotsdwarf":
-				MAX_PVTSTOREBUY_SLOTS_DWARF = Integer.parseInt(pValue);
-				break;
-			case "maxpvtstorebuyslotsother":
-				MAX_PVTSTOREBUY_SLOTS_OTHER = Integer.parseInt(pValue);
-				break;
-			case "storeskillcooltime":
-				STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue);
-				break;
-			case "subclassstoreskillcooltime":
-				SUBCLASS_STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue);
-				break;
-			case "announcemammonspawn":
-				ANNOUNCE_MAMMON_SPAWN = Boolean.parseBoolean(pValue);
-				break;
-			case "enablefallingdamage":
-				ENABLE_FALLING_DAMAGE = Boolean.parseBoolean(pValue);
-				break;
-			case "altgamecreation":
-				ALT_GAME_CREATION = Boolean.parseBoolean(pValue);
-				break;
-			case "altgamecreationspeed":
-				ALT_GAME_CREATION_SPEED = Double.parseDouble(pValue);
-				break;
-			case "altgamecreationxprate":
-				ALT_GAME_CREATION_XP_RATE = Double.parseDouble(pValue);
-				break;
-			case "altgamecreationrarexpsprate":
-				ALT_GAME_CREATION_RARE_XPSP_RATE = Double.parseDouble(pValue);
-				break;
-			case "altgamecreationsprate":
-				ALT_GAME_CREATION_SP_RATE = Double.parseDouble(pValue);
-				break;
-			case "altweightlimit":
-				ALT_WEIGHT_LIMIT = Double.parseDouble(pValue);
-				break;
-			case "altblacksmithuserecipes":
-				ALT_BLACKSMITH_USE_RECIPES = Boolean.parseBoolean(pValue);
-				break;
-			case "altgameskilllearn":
-				ALT_GAME_SKILL_LEARN = Boolean.parseBoolean(pValue);
-				break;
-			case "removecastlecirclets":
-				REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(pValue);
-				break;
-			case "reputationscoreperkill":
-				REPUTATION_SCORE_PER_KILL = Integer.parseInt(pValue);
-				break;
-			case "altgamecancelbyhit":
-				ALT_GAME_CANCEL_BOW = pValue.equalsIgnoreCase("bow") || pValue.equalsIgnoreCase("all");
-				ALT_GAME_CANCEL_CAST = pValue.equalsIgnoreCase("cast") || pValue.equalsIgnoreCase("all");
-				break;
-			case "altshieldblocks":
-				ALT_GAME_SHIELD_BLOCKS = Boolean.parseBoolean(pValue);
-				break;
-			case "altperfectshieldblockrate":
-				ALT_PERFECT_SHLD_BLOCK = Integer.parseInt(pValue);
-				break;
-			case "delevel":
-				ALT_GAME_DELEVEL = Boolean.parseBoolean(pValue);
-				break;
-			case "magicfailures":
-				ALT_GAME_MAGICFAILURES = Boolean.parseBoolean(pValue);
-				break;
-			case "altmobagroinpeacezone":
-				ALT_MOB_AGRO_IN_PEACEZONE = Boolean.parseBoolean(pValue);
-				break;
-			case "altgameexponentxp":
-				ALT_GAME_EXPONENT_XP = Float.parseFloat(pValue);
-				break;
-			case "altgameexponentsp":
-				ALT_GAME_EXPONENT_SP = Float.parseFloat(pValue);
-				break;
-			case "allowclassmasters":
-				ALLOW_CLASS_MASTERS = Boolean.parseBoolean(pValue);
-				break;
-			case "allowentiretree":
-				ALLOW_ENTIRE_TREE = Boolean.parseBoolean(pValue);
-				break;
-			case "alternateclassmaster":
-				ALTERNATE_CLASS_MASTER = Boolean.parseBoolean(pValue);
-				break;
-			case "altpartyrange":
-				ALT_PARTY_RANGE = Integer.parseInt(pValue);
-				break;
-			case "altpartyrange2":
-				ALT_PARTY_RANGE2 = Integer.parseInt(pValue);
-				break;
-			case "altleavepartyleader":
-				ALT_LEAVE_PARTY_LEADER = Boolean.parseBoolean(pValue);
-				break;
-			case "craftingenabled":
-				IS_CRAFTING_ENABLED = Boolean.parseBoolean(pValue);
-				break;
-			case "craftmasterwork":
-				CRAFT_MASTERWORK = Boolean.parseBoolean(pValue);
-				break;
-			case "lifecrystalneeded":
-				LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(pValue);
-				break;
-			case "autoloot":
-				AUTO_LOOT = Boolean.parseBoolean(pValue);
-				break;
-			case "autolootraids":
-				AUTO_LOOT_RAIDS = Boolean.parseBoolean(pValue);
-				break;
-			case "autolootherbs":
-				AUTO_LOOT_HERBS = Boolean.parseBoolean(pValue);
-				break;
-			case "altkarmaplayercanbekilledinpeacezone":
-				ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(pValue);
-				break;
-			case "altkarmaplayercanshop":
-				ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.parseBoolean(pValue);
-				break;
-			case "altkarmaplayercanusegk":
-				ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.parseBoolean(pValue);
-				break;
-			case "altkarmaplayercanteleport":
-				ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(pValue);
-				break;
-			case "altkarmaplayercantrade":
-				ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(pValue);
-				break;
-			case "altkarmaplayercanusewarehouse":
-				ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(pValue);
-				break;
-			case "maxpersonalfamepoints":
-				MAX_PERSONAL_FAME_POINTS = Integer.parseInt(pValue);
-				break;
-			case "fortresszonefametaskfrequency":
-				FORTRESS_ZONE_FAME_TASK_FREQUENCY = Integer.parseInt(pValue);
-				break;
-			case "fortresszonefameaquirepoints":
-				FORTRESS_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue);
-				break;
-			case "castlezonefametaskfrequency":
-				CASTLE_ZONE_FAME_TASK_FREQUENCY = Integer.parseInt(pValue);
-				break;
-			case "castlezonefameaquirepoints":
-				CASTLE_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue);
-				break;
-			case "altcastlefordawn":
-				ALT_GAME_CASTLE_DAWN = Boolean.parseBoolean(pValue);
-				break;
-			case "altcastlefordusk":
-				ALT_GAME_CASTLE_DUSK = Boolean.parseBoolean(pValue);
-				break;
-			case "altrequireclancastle":
-				ALT_GAME_REQUIRE_CLAN_CASTLE = Boolean.parseBoolean(pValue);
-				break;
-			case "altfreeteleporting":
-				ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(pValue);
-				break;
-			case "altsubclasswithoutquests":
-				ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(pValue);
-				break;
-			case "altsubclasseverywhere":
-				ALT_GAME_SUBCLASS_EVERYWHERE = Boolean.parseBoolean(pValue);
-				break;
-			case "altmemberscanwithdrawfromclanwh":
-				ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Boolean.parseBoolean(pValue);
-				break;
-			case "dwarfrecipelimit":
-				DWARF_RECIPE_LIMIT = Integer.parseInt(pValue);
-				break;
-			case "commonrecipelimit":
-				COMMON_RECIPE_LIMIT = Integer.parseInt(pValue);
-				break;
-			case "championenable":
-				L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(pValue);
-				break;
-			case "championfrequency":
-				L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(pValue);
-				break;
-			case "championminlevel":
-				L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(pValue);
-				break;
-			case "championmaxlevel":
-				L2JMOD_CHAMP_MAX_LVL = Integer.parseInt(pValue);
-				break;
-			case "championhp":
-				L2JMOD_CHAMPION_HP = Integer.parseInt(pValue);
-				break;
-			case "championhpregen":
-				L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue);
-				break;
-			case "championrewardsexpsp":
-				L2JMOD_CHAMPION_REWARDS_EXP_SP = Float.parseFloat(pValue);
-				break;
-			case "championrewardschance":
-				L2JMOD_CHAMPION_REWARDS_CHANCE = Float.parseFloat(pValue);
-				break;
-			case "championrewardsamount":
-				L2JMOD_CHAMPION_REWARDS_AMOUNT = Float.parseFloat(pValue);
-				break;
-			case "championadenasrewardschance":
-				L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE = Float.parseFloat(pValue);
-				break;
-			case "championadenasrewardsamount":
-				L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT = Float.parseFloat(pValue);
-				break;
-			case "championatk":
-				L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue);
-				break;
-			case "championspdatk":
-				L2JMOD_CHAMPION_SPD_ATK = Float.parseFloat(pValue);
-				break;
-			case "championrewardlowerlvlitemchance":
-				L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "championrewardhigherlvlitemchance":
-				L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
-				break;
-			case "championrewarditemid":
-				L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(pValue);
-				break;
-			case "championrewarditemqty":
-				L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(pValue);
-				break;
-			case "championenableininstances":
-				L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = Boolean.parseBoolean(pValue);
-				break;
-			case "allowwedding":
-				L2JMOD_ALLOW_WEDDING = Boolean.parseBoolean(pValue);
-				break;
-			case "weddingprice":
-				L2JMOD_WEDDING_PRICE = Integer.parseInt(pValue);
-				break;
-			case "weddingpunishinfidelity":
-				L2JMOD_WEDDING_PUNISH_INFIDELITY = Boolean.parseBoolean(pValue);
-				break;
-			case "weddingteleport":
-				L2JMOD_WEDDING_TELEPORT = Boolean.parseBoolean(pValue);
-				break;
-			case "weddingteleportprice":
-				L2JMOD_WEDDING_TELEPORT_PRICE = Integer.parseInt(pValue);
-				break;
-			case "weddingteleportduration":
-				L2JMOD_WEDDING_TELEPORT_DURATION = Integer.parseInt(pValue);
-				break;
-			case "weddingallowsamesex":
-				L2JMOD_WEDDING_SAMESEX = Boolean.parseBoolean(pValue);
-				break;
-			case "weddingformalwear":
-				L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(pValue);
-				break;
-			case "weddingdivorcecosts":
-				L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(pValue);
-				break;
-			case "tvteventenabled":
-				TVT_EVENT_ENABLED = Boolean.parseBoolean(pValue);
-				break;
-			case "tvteventinterval":
-				TVT_EVENT_INTERVAL = pValue.split(",");
-				break;
-			case "tvteventparticipationtime":
-				TVT_EVENT_PARTICIPATION_TIME = Integer.parseInt(pValue);
-				break;
-			case "tvteventrunningtime":
-				TVT_EVENT_RUNNING_TIME = Integer.parseInt(pValue);
-				break;
-			case "tvteventparticipationnpcid":
-				TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(pValue);
-				break;
-			case "enablewarehousesortingclan":
-				L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.parseBoolean(pValue);
-				break;
-			case "enablewarehousesortingprivate":
-				L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.parseBoolean(pValue);
-				break;
-			case "enablemanapotionsupport":
-				L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(pValue);
-				break;
-			case "displayservertime":
-				L2JMOD_DISPLAY_SERVER_TIME = Boolean.parseBoolean(pValue);
-				break;
-			case "antifeedenable":
-				L2JMOD_ANTIFEED_ENABLE = Boolean.parseBoolean(pValue);
-				break;
-			case "antifeeddualbox":
-				L2JMOD_ANTIFEED_DUALBOX = Boolean.parseBoolean(pValue);
-				break;
-			case "antifeeddisconnectedasdualbox":
-				L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX = Boolean.parseBoolean(pValue);
-				break;
-			case "antifeedinterval":
-				L2JMOD_ANTIFEED_INTERVAL = 1000 * Integer.parseInt(pValue);
-				break;
-			case "cangmdropequipment":
-				KARMA_DROP_GM = Boolean.parseBoolean(pValue);
-				break;
-			case "awardpkkillpvppoint":
-				KARMA_AWARD_PK_KILL = Boolean.parseBoolean(pValue);
-				break;
-			case "minimumpkrequiredtodrop":
-				KARMA_PK_LIMIT = Integer.parseInt(pValue);
-				break;
-			case "pvpvsnormaltime":
-				PVP_NORMAL_TIME = Integer.parseInt(pValue);
-				break;
-			case "pvpvspvptime":
-				PVP_PVP_TIME = Integer.parseInt(pValue);
-				break;
-			case "globalchat":
-				DEFAULT_GLOBAL_CHAT = pValue;
-				break;
-			case "tradechat":
-				DEFAULT_TRADE_CHAT = pValue;
-				break;
-			default:
-				try
-				{
-					// TODO: stupid GB configs...
-					if (!pName.startsWith("Interval_") && !pName.startsWith("Random_"))
-					{
-						pName = pName.toUpperCase();
-					}
-					Field clazField = Config.class.getField(pName);
-					int modifiers = clazField.getModifiers();
-					// just in case :)
-					if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers) || Modifier.isFinal(modifiers))
-					{
-						throw new SecurityException("Cannot modify non public, non static or final config!");
-					}
-					
-					if (clazField.getType() == int.class)
-					{
-						clazField.setInt(clazField, Integer.parseInt(pValue));
-					}
-					else if (clazField.getType() == short.class)
-					{
-						clazField.setShort(clazField, Short.parseShort(pValue));
-					}
-					else if (clazField.getType() == byte.class)
-					{
-						clazField.setByte(clazField, Byte.parseByte(pValue));
-					}
-					else if (clazField.getType() == long.class)
-					{
-						clazField.setLong(clazField, Long.parseLong(pValue));
-					}
-					else if (clazField.getType() == float.class)
-					{
-						clazField.setFloat(clazField, Float.parseFloat(pValue));
-					}
-					else if (clazField.getType() == double.class)
-					{
-						clazField.setDouble(clazField, Double.parseDouble(pValue));
-					}
-					else if (clazField.getType() == boolean.class)
-					{
-						clazField.setBoolean(clazField, Boolean.parseBoolean(pValue));
-					}
-					else if (clazField.getType() == String.class)
-					{
-						clazField.set(clazField, pValue);
-					}
-					else
-					{
-						return false;
-					}
-				}
-				catch (NoSuchFieldException e)
-				{
-					return false;
-				}
-				catch (Exception e)
-				{
-					LOG.warn("Unable to set parameter value!", e);
-					return false;
-				}
-		}
-		return true;
-	}
-	
-	/**
-	 * Save hexadecimal ID of the server in the L2Properties file.<br>
-	 * Check {@link #HEXID_FILE}.
-	 * @param serverId the ID of the server whose hexId to save
-	 * @param hexId the hexadecimal ID to store
-	 */
-	public static void saveHexid(int serverId, String hexId)
-	{
-		Config.saveHexid(serverId, hexId, HEXID_FILE);
-	}
-	
-	/**
-	 * Save hexadecimal ID of the server in the L2Properties file.
-	 * @param serverId the ID of the server whose hexId to save
-	 * @param hexId the hexadecimal ID to store
-	 * @param fileName name of the L2Properties file
-	 */
-	public static void saveHexid(int serverId, String hexId, String fileName)
-	{
-		try
-		{
-			Properties hexSetting = new Properties();
-			File file = new File(fileName);
-			// Create a new empty file only if it doesn't exist
-			file.createNewFile();
-			try (OutputStream out = new FileOutputStream(file))
-			{
-				hexSetting.setProperty("ServerID", String.valueOf(serverId));
-				hexSetting.setProperty("HexID", hexId);
-				hexSetting.store(out, "the hexID to auth into login");
-			}
-		}
-		catch (Exception e)
-		{
-			LOG.warn("Failed to save hex id to {} file.", fileName, e);
-		}
-	}
-	
-	/**
-	 * Loads flood protector configurations.
-	 * @param properties the properties object containing the actual values of the flood protector configs
-	 */
-	private static void loadFloodProtectorConfigs(final PropertiesParser properties)
-	{
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ITEM, "UseItem", 4);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ROLL_DICE, "RollDice", 42);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_FIREWORK, "Firework", 42);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ITEM_PET_SUMMON, "ItemPetSummon", 16);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_HERO_VOICE, "HeroVoice", 100);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_GLOBAL_CHAT, "GlobalChat", 5);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SUBCLASS, "Subclass", 20);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_DROP_ITEM, "DropItem", 10);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SERVER_BYPASS, "ServerBypass", 5);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MULTISELL, "MultiSell", 1);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_TRANSACTION, "Transaction", 10);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MANUFACTURE, "Manufacture", 3);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MANOR, "Manor", 30);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SENDMAIL, "SendMail", 100);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_CHARACTER_SELECT, "CharacterSelect", 30);
-		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ITEM_AUCTION, "ItemAuction", 9);
-	}
-	
-	/**
-	 * Loads single flood protector configuration.
-	 * @param properties properties file reader
-	 * @param config flood protector configuration instance
-	 * @param configString flood protector configuration string that determines for which flood protector configuration should be read
-	 * @param defaultInterval default flood protector interval
-	 */
-	private static void loadFloodProtectorConfig(final PropertiesParser properties, final FloodProtectorConfig config, final String configString, final int defaultInterval)
-	{
-		config.FLOOD_PROTECTION_INTERVAL = properties.getInt(StringUtil.concat("FloodProtector", configString, "Interval"), defaultInterval);
-		config.LOG_FLOODING = properties.getBoolean(StringUtil.concat("FloodProtector", configString, "LogFlooding"), false);
-		config.PUNISHMENT_LIMIT = properties.getInt(StringUtil.concat("FloodProtector", configString, "PunishmentLimit"), 0);
-		config.PUNISHMENT_TYPE = properties.getString(StringUtil.concat("FloodProtector", configString, "PunishmentType"), "none");
-		config.PUNISHMENT_TIME = properties.getInt(StringUtil.concat("FloodProtector", configString, "PunishmentTime"), 0) * 60000;
-	}
-	
-	public static int getServerTypeId(String[] serverTypes)
-	{
-		int tType = 0;
-		for (String cType : serverTypes)
-		{
-			switch (cType.trim().toLowerCase())
-			{
-				case "normal":
-					tType |= 0x01;
-					break;
-				case "relax":
-					tType |= 0x02;
-					break;
-				case "test":
-					tType |= 0x04;
-					break;
-				case "nolabel":
-					tType |= 0x08;
-					break;
-				case "restricted":
-					tType |= 0x10;
-					break;
-				case "event":
-					tType |= 0x20;
-					break;
-				case "free":
-					tType |= 0x40;
-					break;
-				default:
-					break;
-			}
-		}
-		return tType;
-	}
-	
-	public static final class ClassMasterSettings
-	{
-		private final Map<Integer, List<ItemHolder>> _claimItems = new HashMap<>(3);
-		private final Map<Integer, List<ItemHolder>> _rewardItems = new HashMap<>(3);
-		private final Map<Integer, Boolean> _allowedClassChange = new HashMap<>(3);
-		
-		public ClassMasterSettings(String configLine)
-		{
-			parseConfigLine(configLine.trim());
-		}
-		
-		private void parseConfigLine(String configLine)
-		{
-			if (configLine.isEmpty())
-			{
-				return;
-			}
-			
-			final StringTokenizer st = new StringTokenizer(configLine, ";");
-			
-			while (st.hasMoreTokens())
-			{
-				// get allowed class change
-				final int job = Integer.parseInt(st.nextToken());
-				
-				_allowedClassChange.put(job, true);
-				
-				final List<ItemHolder> requiredItems = new ArrayList<>();
-				// parse items needed for class change
-				if (st.hasMoreTokens())
-				{
-					final StringTokenizer st2 = new StringTokenizer(st.nextToken(), "[],");
-					
-					while (st2.hasMoreTokens())
-					{
-						final StringTokenizer st3 = new StringTokenizer(st2.nextToken(), "()");
-						final int itemId = Integer.parseInt(st3.nextToken());
-						final int quantity = Integer.parseInt(st3.nextToken());
-						requiredItems.add(new ItemHolder(itemId, quantity));
-					}
-				}
-				
-				_claimItems.put(job, requiredItems);
-				
-				final List<ItemHolder> rewardItems = new ArrayList<>();
-				// parse gifts after class change
-				if (st.hasMoreTokens())
-				{
-					final StringTokenizer st2 = new StringTokenizer(st.nextToken(), "[],");
-					
-					while (st2.hasMoreTokens())
-					{
-						final StringTokenizer st3 = new StringTokenizer(st2.nextToken(), "()");
-						final int itemId = Integer.parseInt(st3.nextToken());
-						final int quantity = Integer.parseInt(st3.nextToken());
-						rewardItems.add(new ItemHolder(itemId, quantity));
-					}
-				}
-				
-				_rewardItems.put(job, rewardItems);
-			}
-		}
-		
-		public boolean isAllowed(int job)
-		{
-			if ((_allowedClassChange == null) || !_allowedClassChange.containsKey(job))
-			{
-				return false;
-			}
-			return _allowedClassChange.get(job);
-		}
-		
-		public List<ItemHolder> getRewardItems(int job)
-		{
-			return _rewardItems.get(job);
-		}
-		
-		public List<ItemHolder> getRequireItems(int job)
-		{
-			return _claimItems.get(job);
-		}
-	}
-	
-	/**
-	 * @param line the string line to parse
-	 * @return a parsed float map
-	 */
-	private static Map<Integer, Float> parseConfigLine(String line)
-	{
-		String[] propertySplit = line.split(",");
-		Map<Integer, Float> ret = new HashMap<>(propertySplit.length);
-		int i = 0;
-		for (String value : propertySplit)
-		{
-			ret.put(i++, Float.parseFloat(value));
-		}
-		return ret;
-	}
-	
-	/**
-	 * Parse a config value from its string representation to a two-dimensional int array.<br>
-	 * The format of the value to be parsed should be as follows: "item1Id,item1Amount;item2Id,item2Amount;...itemNId,itemNAmount".
-	 * @param line the value of the parameter to parse
-	 * @return the parsed list or {@code null} if nothing was parsed
-	 */
-	private static int[][] parseItemsList(String line)
-	{
-		final String[] propertySplit = line.split(";");
-		if (propertySplit.length == 0)
-		{
-			// nothing to do here
-			return null;
-		}
-		
-		int i = 0;
-		String[] valueSplit;
-		final int[][] result = new int[propertySplit.length][];
-		int[] tmp;
-		for (String value : propertySplit)
-		{
-			valueSplit = value.split(",");
-			if (valueSplit.length != 2)
-			{
-				LOG.warn("parseItemsList[Config.load()]: invalid entry -> {}, should be itemId,itemNumber. Skipping to the next entry in the list.", valueSplit[0]);
-				continue;
-			}
-			
-			tmp = new int[2];
-			try
-			{
-				tmp[0] = Integer.parseInt(valueSplit[0]);
-			}
-			catch (NumberFormatException e)
-			{
-				LOG.warn("parseItemsList[Config.load()]: invalid itemId -> {}, value must be an integer. Skipping to the next entry in the list.", valueSplit[0]);
-				continue;
-			}
-			try
-			{
-				tmp[1] = Integer.parseInt(valueSplit[1]);
-			}
-			catch (NumberFormatException e)
-			{
-				LOG.warn("parseItemsList[Config.load()]: invalid item number -> {}, value must be an integer. Skipping to the next entry in the list.", valueSplit[1]);
-				continue;
-			}
-			result[i++] = tmp;
-		}
-		return result;
-	}
-	
-	private static class IPConfigData implements IXmlReader
-	{
-		private static final List<String> _subnets = new ArrayList<>(5);
-		private static final List<String> _hosts = new ArrayList<>(5);
-		
-		public IPConfigData()
-		{
-			load();
-		}
-		
-		@Override
-		public void load()
-		{
-			GameServer.printSection("Network Configuration");
-			final File f = new File(IP_CONFIG_FILE);
-			if (f.exists())
-			{
-				LOG.info("Using existing ipconfig.xml.");
-				parseFile(new File(IP_CONFIG_FILE));
-			}
-			else
-			{
-				LOG.info("Using automatic network configuration.");
-				autoIpConfig();
-			}
-		}
-		
-		@Override
-		public void parseDocument(Document doc)
-		{
-			NamedNodeMap attrs;
-			for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
-			{
-				if ("gameserver".equalsIgnoreCase(n.getNodeName()))
-				{
-					for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
-					{
-						if ("define".equalsIgnoreCase(d.getNodeName()))
-						{
-							attrs = d.getAttributes();
-							_subnets.add(attrs.getNamedItem("subnet").getNodeValue());
-							_hosts.add(attrs.getNamedItem("address").getNodeValue());
-							
-							if (_hosts.size() != _subnets.size())
-							{
-								LOG.warn("Failed to load {} file - subnets does not match server addresses.", IP_CONFIG_FILE);
-							}
-						}
-					}
-					
-					Node att = n.getAttributes().getNamedItem("address");
-					if (att == null)
-					{
-						LOG.warn("Failed to load {} file - default server address is missing.", IP_CONFIG_FILE);
-						_hosts.add("127.0.0.1");
-					}
-					else
-					{
-						_hosts.add(att.getNodeValue());
-					}
-					_subnets.add("0.0.0.0/0");
-				}
-			}
-		}
-		
-		protected void autoIpConfig()
-		{
-			String externalIp = "127.0.0.1";
-			try
-			{
-				URL autoIp = new URL("http://ip1.dynupdate.no-ip.com:8245/");
-				try (BufferedReader in = new BufferedReader(new InputStreamReader(autoIp.openStream())))
-				{
-					externalIp = in.readLine();
-				}
-			}
-			catch (IOException e)
-			{
-				LOG.warn("Failed to connect to api.externalip.net please check your internet connection using 127.0.0.1!");
-				externalIp = "127.0.0.1";
-			}
-			
-			try
-			{
-				Enumeration<NetworkInterface> niList = NetworkInterface.getNetworkInterfaces();
-				
-				while (niList.hasMoreElements())
-				{
-					NetworkInterface ni = niList.nextElement();
-					
-					if (!ni.isUp() || ni.isVirtual())
-					{
-						continue;
-					}
-					
-					if (!ni.isLoopback() && ((ni.getHardwareAddress() == null) || (ni.getHardwareAddress().length != 6)))
-					{
-						continue;
-					}
-					
-					for (InterfaceAddress ia : ni.getInterfaceAddresses())
-					{
-						if (ia.getAddress() instanceof Inet6Address)
-						{
-							continue;
-						}
-						
-						final String hostAddress = ia.getAddress().getHostAddress();
-						final int subnetPrefixLength = ia.getNetworkPrefixLength();
-						final int subnetMaskInt = IntStream.rangeClosed(1, subnetPrefixLength).reduce((r, e) -> (r << 1) + 1).orElse(0) << (32 - subnetPrefixLength);
-						final int hostAddressInt = Arrays.stream(hostAddress.split("\\.")).mapToInt(Integer::parseInt).reduce((r, e) -> (r << 8) + e).orElse(0);
-						final int subnetAddressInt = hostAddressInt & subnetMaskInt;
-						final String subnetAddress = ((subnetAddressInt >> 24) & 0xFF) + "." + ((subnetAddressInt >> 16) & 0xFF) + "." + ((subnetAddressInt >> 8) & 0xFF) + "." + (subnetAddressInt & 0xFF);
-						final String subnet = subnetAddress + '/' + subnetPrefixLength;
-						if (!_subnets.contains(subnet) && !subnet.equals("0.0.0.0/0"))
-						{
-							_subnets.add(subnet);
-							_hosts.add(hostAddress);
-							LOG.info("Adding new subnet: " + subnet + " address: " + hostAddress);
-						}
-					}
-				}
-				
-				// External host and subnet
-				_hosts.add(externalIp);
-				_subnets.add("0.0.0.0/0");
-				LOG.info("Adding new subnet: 0.0.0.0/0 address: {}", externalIp);
-			}
-			catch (SocketException e)
-			{
-				LOG.error("Configuration failed please manually configure ipconfig.xml", e);
-				System.exit(0);
-			}
-		}
-		
-		protected List<String> getSubnets()
-		{
-			if (_subnets.isEmpty())
-			{
-				return Arrays.asList("0.0.0.0/0");
-			}
-			return _subnets;
-		}
-		
-		protected List<String> getHosts()
-		{
-			if (_hosts.isEmpty())
-			{
-				return Arrays.asList("127.0.0.1");
-			}
-			return _hosts;
-		}
-	}
-}

+ 0 - 32
src/main/java/com/l2jserver/Server.java

@@ -1,32 +0,0 @@
-/*
- * Copyright © 2004-2019 L2J Server
- * 
- * This file is part of L2J Server.
- * 
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver;
-
-/**
- * This class used to be the starter class, since LS/GS split, it only retains server mode
- */
-public class Server
-{
-	// constants for the server mode
-	private static final int MODE_NONE = 0;
-	public static final int MODE_GAMESERVER = 1;
-	public static final int MODE_LOGINSERVER = 2;
-	
-	public static int serverMode = MODE_NONE;
-}

+ 0 - 149
src/main/java/com/l2jserver/UPnPService.java

@@ -1,149 +0,0 @@
-/*
- * Copyright © 2004-2019 L2J Server
- * 
- * This file is part of L2J Server.
- * 
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.Map;
-
-import org.bitlet.weupnp.GatewayDevice;
-import org.bitlet.weupnp.GatewayDiscover;
-import org.bitlet.weupnp.PortMappingEntry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.SAXException;
-
-/**
- * @author UnAfraid
- */
-public class UPnPService
-{
-	private static final Logger LOG = LoggerFactory.getLogger(UPnPService.class);
-	private static final String PROTOCOL = "TCP";
-	
-	private final GatewayDiscover _gatewayDiscover = new GatewayDiscover();
-	private GatewayDevice _activeGW;
-	
-	protected UPnPService()
-	{
-		try
-		{
-			load();
-		}
-		catch (Exception e)
-		{
-			LOG.warn("{}: There was a problem while initializing the UPnP Service!", getClass().getSimpleName(), e);
-		}
-	}
-	
-	private void load() throws Exception
-	{
-		if (!Config.ENABLE_UPNP)
-		{
-			LOG.info("UPnP Service is disabled.");
-			return;
-		}
-		
-		LOG.info("Looking for UPnP Gateway Devices...");
-		
-		final Map<InetAddress, GatewayDevice> gateways = _gatewayDiscover.discover();
-		if (gateways.isEmpty())
-		{
-			LOG.info("No UPnP gateways found.");
-			return;
-		}
-		
-		// choose the first active gateway for the tests
-		_activeGW = _gatewayDiscover.getValidGateway();
-		if (_activeGW != null)
-		{
-			LOG.info("Using UPnP gateway: {}", _activeGW.getFriendlyName());
-		}
-		else
-		{
-			LOG.info("No active UPnP gateway found.");
-			return;
-		}
-		
-		LOG.info("Using local address: {} External address: {}", _activeGW.getLocalAddress().getHostAddress(), _activeGW.getExternalIPAddress());
-		
-		if (Server.serverMode == Server.MODE_GAMESERVER)
-		{
-			addPortMapping(Config.PORT_GAME, "L2j Game Server");
-		}
-		else if (Server.serverMode == Server.MODE_LOGINSERVER)
-		{
-			addPortMapping(Config.PORT_LOGIN, "L2j Login Server");
-		}
-	}
-	
-	public void removeAllPorts() throws Exception
-	{
-		if (_activeGW != null)
-		{
-			if (Server.serverMode == Server.MODE_GAMESERVER)
-			{
-				deletePortMapping(Config.PORT_GAME);
-			}
-			else if (Server.serverMode == Server.MODE_LOGINSERVER)
-			{
-				deletePortMapping(Config.PORT_LOGIN);
-			}
-		}
-	}
-	
-	private void addPortMapping(int port, String description) throws IOException, SAXException
-	{
-		final PortMappingEntry portMapping = new PortMappingEntry();
-		final InetAddress localAddress = _activeGW.getLocalAddress();
-		
-		// Attempt to re-map
-		if (_activeGW.getSpecificPortMappingEntry(port, PROTOCOL, portMapping))
-		{
-			_activeGW.deletePortMapping(port, PROTOCOL);
-		}
-		
-		if (_activeGW.addPortMapping(port, port, localAddress.getHostAddress(), PROTOCOL, description))
-		{
-			LOG.info("Mapping successful on {}:{}", localAddress.getHostAddress(), port);
-		}
-		else
-		{
-			LOG.info("Mapping failed on [{}:{}] - Already mapped?", localAddress.getHostAddress(), port);
-		}
-	}
-	
-	private void deletePortMapping(int port) throws IOException, SAXException
-	{
-		if (_activeGW.deletePortMapping(port, PROTOCOL))
-		{
-			LOG.info("Mapping was deleted from [{}:{}]", _activeGW.getLocalAddress().getHostAddress(), port);
-		}
-	}
-	
-	public static UPnPService getInstance()
-	{
-		return SingletonHolder._instance;
-	}
-	
-	private static class SingletonHolder
-	{
-		protected static final UPnPService _instance = new UPnPService();
-	}
-}

+ 0 - 69
src/main/java/com/l2jserver/commons/database/pool/IConnectionFactory.java

@@ -1,69 +0,0 @@
-/*
- * Copyright © 2004-2019 L2J Server
- * 
- * This file is part of L2J Server.
- * 
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.commons.database.pool;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-import javax.sql.DataSource;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Connection Factory interface.
- * @author Zoey76
- */
-public interface IConnectionFactory
-{
-	static final Logger LOG = LoggerFactory.getLogger(IConnectionFactory.class);
-	
-	/**
-	 * Gets the data source.
-	 * @return the data source
-	 */
-	DataSource getDataSource();
-	
-	/**
-	 * Closes the data source.<br>
-	 * <i>Same as shutdown.</i>
-	 */
-	void close();
-	
-	/**
-	 * Gets a connection from the pool.
-	 * @return a connection
-	 */
-	default Connection getConnection()
-	{
-		Connection con = null;
-		while (con == null)
-		{
-			try
-			{
-				con = getDataSource().getConnection();
-			}
-			catch (SQLException e)
-			{
-				LOG.warn("{}: Unable to get a connection!", getClass().getSimpleName(), e);
-			}
-		}
-		return con;
-	}
-}

+ 0 - 73
src/main/java/com/l2jserver/commons/database/pool/impl/BoneCPConnectionFactory.java

@@ -1,73 +0,0 @@
-/*
- * Copyright © 2004-2019 L2J Server
- * 
- * This file is part of L2J Server.
- * 
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.commons.database.pool.impl;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.sql.DataSource;
-
-import com.jolbox.bonecp.BoneCPDataSource;
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.IConnectionFactory;
-
-/**
- * BoneCP Connection Factory implementation.<br>
- * <b>Note that this class is not public to prevent external initialization.</b><br>
- * <b>Access it through {@link ConnectionFactory} and proper configuration.</b><br>
- * <b><font color="RED" size="3">Totally BETA and untested feature!</font></b>
- * @author Zoey76
- */
-enum BoneCPConnectionFactory implements IConnectionFactory
-{
-	INSTANCE;
-	
-	private static final int PARTITION_COUNT = 5;
-	
-	private final BoneCPDataSource _dataSource;
-	
-	BoneCPConnectionFactory()
-	{
-		_dataSource = new BoneCPDataSource();
-		_dataSource.setJdbcUrl(Config.DATABASE_URL);
-		_dataSource.setUsername(Config.DATABASE_LOGIN);
-		_dataSource.setPassword(Config.DATABASE_PASSWORD);
-		_dataSource.setPartitionCount(PARTITION_COUNT);
-		_dataSource.setMaxConnectionsPerPartition(Config.DATABASE_MAX_CONNECTIONS);
-		_dataSource.setIdleConnectionTestPeriod(Config.DATABASE_MAX_IDLE_TIME, TimeUnit.SECONDS);
-	}
-	
-	@Override
-	public void close()
-	{
-		try
-		{
-			_dataSource.close();
-		}
-		catch (Exception e)
-		{
-			LOG.warn("There has been a problem closing the data source!", e);
-		}
-	}
-	
-	@Override
-	public DataSource getDataSource()
-	{
-		return _dataSource;
-	}
-}

+ 0 - 129
src/main/java/com/l2jserver/commons/database/pool/impl/C3P0ConnectionFactory.java

@@ -1,129 +0,0 @@
-/*
- * Copyright © 2004-2019 L2J Server
- * 
- * This file is part of L2J Server.
- * 
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.commons.database.pool.impl;
-
-import java.beans.PropertyVetoException;
-import java.sql.SQLException;
-
-import javax.sql.DataSource;
-
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.IConnectionFactory;
-import com.mchange.v2.c3p0.ComboPooledDataSource;
-
-/**
- * C3P0 Connection Factory implementation.<br>
- * <b>Note that this class is not public to prevent external initialization.</b><br>
- * <b>Access it through {@link ConnectionFactory} and proper configuration.</b>
- * @author Zoey76
- */
-enum C3P0ConnectionFactory implements IConnectionFactory
-{
-	INSTANCE;
-	
-	private final ComboPooledDataSource _dataSource;
-	
-	C3P0ConnectionFactory()
-	{
-		if (Config.DATABASE_MAX_CONNECTIONS < 2)
-		{
-			Config.DATABASE_MAX_CONNECTIONS = 2;
-			LOG.warn("A minimum of {} database connections are required.", Config.DATABASE_MAX_CONNECTIONS);
-		}
-		
-		_dataSource = new ComboPooledDataSource();
-		_dataSource.setAutoCommitOnClose(true);
-		
-		_dataSource.setInitialPoolSize(10);
-		_dataSource.setMinPoolSize(10);
-		_dataSource.setMaxPoolSize(Math.max(10, Config.DATABASE_MAX_CONNECTIONS));
-		
-		_dataSource.setAcquireRetryAttempts(0); // try to obtain connections indefinitely (0 = never quit)
-		_dataSource.setAcquireRetryDelay(500); // 500 milliseconds wait before try to acquire connection again
-		_dataSource.setCheckoutTimeout(0); // 0 = wait indefinitely for new connection if pool is exhausted
-		_dataSource.setAcquireIncrement(5); // if pool is exhausted, get 5 more connections at a time
-		// cause there is a "long" delay on acquire connection
-		// so taking more than one connection at once will make connection pooling
-		// more effective.
-		
-		// this "connection_test_table" is automatically created if not already there
-		_dataSource.setAutomaticTestTable("connection_test_table");
-		_dataSource.setTestConnectionOnCheckin(false);
-		
-		// testing OnCheckin used with IdleConnectionTestPeriod is faster than testing on checkout
-		
-		_dataSource.setIdleConnectionTestPeriod(3600); // test idle connection every 60 sec
-		_dataSource.setMaxIdleTime(Config.DATABASE_MAX_IDLE_TIME); // 0 = idle connections never expire
-		// *THANKS* to connection testing configured above
-		// but I prefer to disconnect all connections not used
-		// for more than 1 hour
-		
-		// enables statement caching, there is a "semi-bug" in c3p0 0.9.0 but in 0.9.0.2 and later it's fixed
-		_dataSource.setMaxStatementsPerConnection(100);
-		
-		_dataSource.setBreakAfterAcquireFailure(false); // never fail if any way possible
-		// setting this to true will make
-		// c3p0 "crash" and refuse to work
-		// till restart thus making acquire
-		// errors "FATAL" ... we don't want that
-		// it should be possible to recover
-		try
-		{
-			_dataSource.setDriverClass(Config.DATABASE_DRIVER);
-		}
-		catch (PropertyVetoException e)
-		{
-			LOG.error("There has been a problem setting the driver class!", e);
-		}
-		_dataSource.setJdbcUrl(Config.DATABASE_URL);
-		_dataSource.setUser(Config.DATABASE_LOGIN);
-		_dataSource.setPassword(Config.DATABASE_PASSWORD);
-		
-		/* Test the connection */
-		try
-		{
-			_dataSource.getConnection().close();
-		}
-		catch (SQLException e)
-		{
-			LOG.warn("There has been a problem closing the test connection!", e);
-		}
-		
-		LOG.debug("Database connection working.");
-	}
-	
-	@Override
-	public void close()
-	{
-		try
-		{
-			_dataSource.close();
-		}
-		catch (Exception e)
-		{
-			LOG.warn("There has been a problem closing the data source!", e);
-		}
-	}
-	
-	@Override
-	public DataSource getDataSource()
-	{
-		return _dataSource;
-	}
-}

+ 0 - 73
src/main/java/com/l2jserver/commons/database/pool/impl/ConnectionFactory.java

@@ -1,73 +0,0 @@
-/*
- * Copyright © 2004-2019 L2J Server
- * 
- * This file is part of L2J Server.
- * 
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.commons.database.pool.impl;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.IConnectionFactory;
-
-/**
- * Connection Factory implementation.
- * @author Zoey76
- */
-public class ConnectionFactory
-{
-	private ConnectionFactory()
-	{
-		// Hide constructor.
-	}
-	
-	public static IConnectionFactory getInstance()
-	{
-		return SingletonHolder.INSTANCE;
-	}
-	
-	private static class SingletonHolder
-	{
-		private static final Logger LOG = LoggerFactory.getLogger(ConnectionFactory.class);
-		
-		protected static final IConnectionFactory INSTANCE;
-		
-		static
-		{
-			switch (Config.DATABASE_CONNECTION_POOL)
-			{
-				default:
-				case "HikariCP":
-				{
-					INSTANCE = HikariCPConnectionFactory.INSTANCE;
-					break;
-				}
-				case "C3P0":
-				{
-					INSTANCE = C3P0ConnectionFactory.INSTANCE;
-					break;
-				}
-				case "BoneCP":
-				{
-					INSTANCE = BoneCPConnectionFactory.INSTANCE;
-					break;
-				}
-			}
-			LOG.info("Using {} connection pool.", INSTANCE.getClass().getSimpleName().replace("ConnectionFactory", ""));
-		}
-	}
-}

+ 0 - 67
src/main/java/com/l2jserver/commons/database/pool/impl/HikariCPConnectionFactory.java

@@ -1,67 +0,0 @@
-/*
- * Copyright © 2004-2019 L2J Server
- * 
- * This file is part of L2J Server.
- * 
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.commons.database.pool.impl;
-
-import javax.sql.DataSource;
-
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.IConnectionFactory;
-import com.zaxxer.hikari.HikariDataSource;
-
-/**
- * HikariCP Connection Factory implementation.<br>
- * <b>Note that this class is not public to prevent external initialization.</b><br>
- * <b>Access it through {@link ConnectionFactory} and proper configuration.</b>
- * @author Zoey76
- */
-enum HikariCPConnectionFactory implements IConnectionFactory
-{
-	INSTANCE;
-	
-	private final HikariDataSource _dataSource;
-	
-	HikariCPConnectionFactory()
-	{
-		_dataSource = new HikariDataSource();
-		_dataSource.setJdbcUrl(Config.DATABASE_URL);
-		_dataSource.setUsername(Config.DATABASE_LOGIN);
-		_dataSource.setPassword(Config.DATABASE_PASSWORD);
-		_dataSource.setMaximumPoolSize(Config.DATABASE_MAX_CONNECTIONS);
-		_dataSource.setIdleTimeout(Config.DATABASE_MAX_IDLE_TIME);
-	}
-	
-	@Override
-	public void close()
-	{
-		try
-		{
-			_dataSource.close();
-		}
-		catch (Exception e)
-		{
-			LOG.warn("There has been a problem closing the data source!", e);
-		}
-	}
-	
-	@Override
-	public DataSource getDataSource()
-	{
-		return _dataSource;
-	}
-}

+ 1 - 1
src/main/java/com/l2jserver/gameserver/FortUpdater.java

@@ -21,7 +21,7 @@ package com.l2jserver.gameserver;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.model.L2Clan;
 import com.l2jserver.gameserver.model.entity.Fort;
 import com.l2jserver.gameserver.model.itemcontainer.Inventory;

+ 45 - 66
src/main/java/com/l2jserver/gameserver/GameServer.java

@@ -33,10 +33,10 @@ import java.util.logging.LogManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.Server;
 import com.l2jserver.UPnPService;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.cache.HtmCache;
 import com.l2jserver.gameserver.dao.factory.impl.DAOFactory;
 import com.l2jserver.gameserver.data.json.ExperienceData;
@@ -140,15 +140,14 @@ import com.l2jserver.gameserver.script.faenor.FaenorScriptEngine;
 import com.l2jserver.gameserver.scripting.ScriptEngineManager;
 import com.l2jserver.gameserver.taskmanager.KnownListUpdateTaskManager;
 import com.l2jserver.gameserver.taskmanager.TaskManager;
+import com.l2jserver.gameserver.util.DeadLockDetector;
 import com.l2jserver.mmocore.SelectorConfig;
 import com.l2jserver.mmocore.SelectorThread;
 import com.l2jserver.status.Status;
-import com.l2jserver.util.DeadLockDetector;
 import com.l2jserver.util.IPv4Filter;
 import com.l2jserver.util.Util;
 
-public final class GameServer
-{
+public final class GameServer {
 	private static final Logger LOG = LoggerFactory.getLogger(GameServer.class);
 	private static final String LOG_FOLDER = "log"; // Name of folder for log file
 	private static final String LOG_NAME = "./log.cfg"; // Name of log file
@@ -161,14 +160,12 @@ public final class GameServer
 	public static GameServer gameServer;
 	public static final Calendar dateTimeServerStarted = Calendar.getInstance();
 	
-	public GameServer() throws Exception
-	{
+	public GameServer() throws Exception {
 		long serverLoadStart = System.currentTimeMillis();
 		
 		LOG.info("{}: Used memory: {}MB.", getClass().getSimpleName(), getUsedMemoryMB());
 		
-		if (!IdFactory.getInstance().isInitialized())
-		{
+		if (!IdFactory.getInstance().isInitialized()) {
 			LOG.error("{}: Could not read object IDs from database. Please check your configuration.", getClass().getSimpleName());
 			throw new Exception("Could not initialize the ID factory!");
 		}
@@ -245,8 +242,7 @@ public final class GameServer
 		printSection("Geodata");
 		GeoData.getInstance();
 		
-		if (Config.PATHFINDING > 0)
-		{
+		if (Config.PATHFINDING > 0) {
 			PathFinding.getInstance();
 		}
 		
@@ -314,13 +310,11 @@ public final class GameServer
 		
 		QuestManager.getInstance().report();
 		
-		if (Config.SAVE_DROPPED_ITEM)
-		{
+		if (Config.SAVE_DROPPED_ITEM) {
 			ItemsOnGroundManager.getInstance();
 		}
 		
-		if ((Config.AUTODESTROY_ITEM_AFTER > 0) || (Config.HERB_AUTO_DESTROY_TIME > 0))
-		{
+		if ((Config.AUTODESTROY_ITEM_AFTER > 0) || (Config.HERB_AUTO_DESTROY_TIME > 0)) {
 			ItemsAutoDestroy.getInstance();
 		}
 		
@@ -335,8 +329,7 @@ public final class GameServer
 		
 		LOG.info("AutoSpawnHandler: Loaded {} handlers in total.", AutoSpawnHandler.getInstance().size());
 		
-		if (Config.L2JMOD_ALLOW_WEDDING)
-		{
+		if (Config.L2JMOD_ALLOW_WEDDING) {
 			CoupleManager.getInstance();
 		}
 		
@@ -344,8 +337,7 @@ public final class GameServer
 		
 		AntiFeedManager.getInstance().registerEvent(AntiFeedManager.GAME_ID);
 		
-		if (Config.ALLOW_MAIL)
-		{
+		if (Config.ALLOW_MAIL) {
 			MailManager.getInstance();
 		}
 		
@@ -358,19 +350,15 @@ public final class GameServer
 		TvTManager.getInstance();
 		KnownListUpdateTaskManager.getInstance();
 		
-		if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS)
-		{
+		if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS) {
 			OfflineTradersTable.getInstance().restoreOfflineTraders();
 		}
 		
-		if (Config.DEADLOCK_DETECTOR)
-		{
+		if (Config.DEADLOCK_DETECTOR) {
 			_deadDetectThread = new DeadLockDetector();
 			_deadDetectThread.setDaemon(true);
 			_deadDetectThread.start();
-		}
-		else
-		{
+		} else {
 			_deadDetectThread = null;
 		}
 		System.gc();
@@ -393,26 +381,19 @@ public final class GameServer
 		_selectorThread = new SelectorThread<>(sc, _gamePacketHandler, _gamePacketHandler, _gamePacketHandler, new IPv4Filter());
 		
 		InetAddress bindAddress = null;
-		if (!Config.GAMESERVER_HOSTNAME.equals("*"))
-		{
-			try
-			{
+		if (!Config.GAMESERVER_HOSTNAME.equals("*")) {
+			try {
 				bindAddress = InetAddress.getByName(Config.GAMESERVER_HOSTNAME);
-			}
-			catch (UnknownHostException e1)
-			{
+			} catch (UnknownHostException e1) {
 				LOG.error("{}: The GameServer bind address is invalid, using all avaliable IPs!", getClass().getSimpleName(), e1);
 			}
 		}
 		
-		try
-		{
+		try {
 			_selectorThread.openServerSocket(bindAddress, Config.PORT_GAME);
 			_selectorThread.start();
 			LOG.info("{}: is now listening on: {}:{}", getClass().getSimpleName(), Config.GAMESERVER_HOSTNAME, Config.PORT_GAME);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 			LOG.error("{}: Failed to open server socket!", getClass().getSimpleName(), e);
 			System.exit(1);
 		}
@@ -420,26 +401,25 @@ public final class GameServer
 		LOG.info("{}: Maximum numbers of connected players: {}", getClass().getSimpleName(), Config.MAXIMUM_ONLINE_USERS);
 		LOG.info("{}: Server loaded in {} seconds.", getClass().getSimpleName(), TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - serverLoadStart));
 		
-		printSection("UPnP");
-		UPnPService.getInstance();
+		if (Config.ENABLE_UPNP) {
+			printSection("UPnP");
+			UPnPService.getInstance().load(Config.PORT_GAME, "L2J Game Server");
+		}
 	}
 	
-	public static void main(String[] args) throws Exception
-	{
+	public static void main(String[] args) throws Exception {
 		Server.serverMode = Server.MODE_GAMESERVER;
 		
 		// Initialize configurations.
 		Config.load();
 		
 		final String dp = Util.parseArg(args, DATAPACK, true);
-		if (dp != null)
-		{
+		if (dp != null) {
 			Config.DATAPACK_ROOT = new File(dp);
 		}
 		
 		final String gd = Util.parseArg(args, GEODATA, true);
-		if (gd != null)
-		{
+		if (gd != null) {
 			Config.GEODATA_PATH = Paths.get(gd);
 		}
 		
@@ -448,52 +428,51 @@ public final class GameServer
 		logFolder.mkdir();
 		
 		// Create input stream for log file -- or store file data into memory
-		try (InputStream is = new FileInputStream(new File(LOG_NAME)))
-		{
+		try (InputStream is = new FileInputStream(new File(LOG_NAME))) {
 			LogManager.getLogManager().readConfiguration(is);
 		}
 		
 		printSection("Database");
 		DAOFactory.getInstance();
-		ConnectionFactory.getInstance();
+		
+		ConnectionFactory.builder() //
+			.withDriver(Config.DATABASE_DRIVER) //
+			.withUrl(Config.DATABASE_URL) //
+			.withUser(Config.DATABASE_LOGIN) //
+			.withPassword(Config.DATABASE_PASSWORD) //
+			.withConnectionPool(Config.DATABASE_CONNECTION_POOL) //
+			.withMaxIdleTime(Config.DATABASE_MAX_IDLE_TIME) //
+			.withMaxPoolSize(Config.DATABASE_MAX_CONNECTIONS) //
+			.build();
 		
 		gameServer = new GameServer();
 		
-		if (Config.IS_TELNET_ENABLED)
-		{
+		if (Config.IS_TELNET_ENABLED) {
 			new Status(Server.serverMode).start();
-		}
-		else
-		{
+		} else {
 			LOG.info("{}: Telnet server is currently disabled.", GameServer.class.getSimpleName());
 		}
 	}
 	
-	public long getUsedMemoryMB()
-	{
+	public long getUsedMemoryMB() {
 		return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576;
 	}
 	
-	public SelectorThread<L2GameClient> getSelectorThread()
-	{
+	public SelectorThread<L2GameClient> getSelectorThread() {
 		return _selectorThread;
 	}
 	
-	public L2GamePacketHandler getL2GamePacketHandler()
-	{
+	public L2GamePacketHandler getL2GamePacketHandler() {
 		return _gamePacketHandler;
 	}
 	
-	public DeadLockDetector getDeadLockDetectorThread()
-	{
+	public DeadLockDetector getDeadLockDetectorThread() {
 		return _deadDetectThread;
 	}
 	
-	public static void printSection(String s)
-	{
+	public static void printSection(String s) {
 		s = "=[ " + s + " ]";
-		while (s.length() < 61)
-		{
+		while (s.length() < 61) {
 			s = "-" + s;
 		}
 		LOG.info(s);

+ 1 - 1
src/main/java/com/l2jserver/gameserver/GeoData.java

@@ -24,7 +24,7 @@ import java.nio.file.Path;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.data.xml.impl.DoorData;
 import com.l2jserver.gameserver.model.L2Object;
 import com.l2jserver.gameserver.model.L2World;

+ 1 - 1
src/main/java/com/l2jserver/gameserver/ItemsAutoDestroy.java

@@ -21,7 +21,7 @@ package com.l2jserver.gameserver;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.enums.ItemLocation;
 import com.l2jserver.gameserver.instancemanager.ItemsOnGroundManager;
 import com.l2jserver.gameserver.model.L2World;

+ 106 - 237
src/main/java/com/l2jserver/gameserver/LoginServerThread.java

@@ -31,9 +31,6 @@ import java.security.KeyFactory;
 import java.security.interfaces.RSAPublicKey;
 import java.security.spec.RSAKeyGenParameterSpec;
 import java.security.spec.RSAPublicKeySpec;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.List;
@@ -44,8 +41,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.model.L2World;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.network.L2GameClient;
@@ -78,8 +75,7 @@ import com.l2jserver.util.Util;
 import com.l2jserver.util.crypt.NewCrypt;
 import com.l2jserver.util.network.BaseSendablePacket;
 
-public class LoginServerThread extends Thread
-{
+public class LoginServerThread extends Thread {
 	protected static final Logger LOG = LoggerFactory.getLogger(LoginServerThread.class);
 	protected static final Logger LOG_ACCOUNTING = LoggerFactory.getLogger("accounting");
 	
@@ -116,20 +112,16 @@ public class LoginServerThread extends Thread
 	/**
 	 * Instantiates a new login server thread.
 	 */
-	protected LoginServerThread()
-	{
+	protected LoginServerThread() {
 		super("LoginServerThread");
 		_port = Config.GAME_SERVER_LOGIN_PORT;
 		_gamePort = Config.PORT_GAME;
 		_hostname = Config.GAME_SERVER_LOGIN_HOST;
 		_hexID = Config.HEX_ID;
-		if (_hexID == null)
-		{
+		if (_hexID == null) {
 			_requestID = Config.REQUEST_ID;
 			_hexID = Util.generateHex(16);
-		}
-		else
-		{
+		} else {
 			_requestID = Config.SERVER_ID;
 		}
 		_acceptAlternate = Config.ACCEPT_ALTERNATE_ID;
@@ -141,16 +133,13 @@ public class LoginServerThread extends Thread
 	}
 	
 	@Override
-	public void run()
-	{
-		while (!isInterrupted())
-		{
+	public void run() {
+		while (!isInterrupted()) {
 			int lengthHi = 0;
 			int lengthLo = 0;
 			int length = 0;
 			boolean checksumOk = false;
-			try
-			{
+			try {
 				// Connection
 				LOG.info("Connecting to login on {}:{}", _hostname, _port);
 				_loginSocket = new Socket(_hostname, _port);
@@ -160,19 +149,16 @@ public class LoginServerThread extends Thread
 				// init Blowfish
 				byte[] blowfishKey = Util.generateHex(40);
 				// Protect the new blowfish key what cannot begin with zero
-				if (blowfishKey[0] == 0)
-				{
+				if (blowfishKey[0] == 0) {
 					blowfishKey[0] = (byte) Rnd.get(32, 64);
 				}
 				_blowfish = new NewCrypt("_;v.]05-31!|+-%xT!^[$\00");
-				while (!isInterrupted())
-				{
+				while (!isInterrupted()) {
 					lengthLo = in.read();
 					lengthHi = in.read();
 					length = (lengthHi * 256) + lengthLo;
 					
-					if (lengthHi < 0)
-					{
+					if (lengthHi < 0) {
 						LOG.info("LoginServerThread: Login terminated the connection.");
 						break;
 					}
@@ -182,15 +168,13 @@ public class LoginServerThread extends Thread
 					int receivedBytes = 0;
 					int newBytes = 0;
 					int left = length - 2;
-					while ((newBytes != -1) && (receivedBytes < (length - 2)))
-					{
+					while ((newBytes != -1) && (receivedBytes < (length - 2))) {
 						newBytes = in.read(incoming, receivedBytes, left);
 						receivedBytes = receivedBytes + newBytes;
 						left -= newBytes;
 					}
 					
-					if (receivedBytes != (length - 2))
-					{
+					if (receivedBytes != (length - 2)) {
 						LOG.warn("Incomplete Packet is sent to the server, closing connection.(LS)");
 						break;
 					}
@@ -199,19 +183,16 @@ public class LoginServerThread extends Thread
 					_blowfish.decrypt(incoming, 0, incoming.length);
 					checksumOk = NewCrypt.verifyChecksum(incoming);
 					
-					if (!checksumOk)
-					{
+					if (!checksumOk) {
 						LOG.warn("Incorrect packet checksum, ignoring packet (LS)");
 						break;
 					}
 					
 					int packetType = incoming[0] & 0xff;
-					switch (packetType)
-					{
+					switch (packetType) {
 						case 0x00:
 							InitLS init = new InitLS(incoming);
-							if (init.getRevision() != REVISION)
-							{
+							if (init.getRevision() != REVISION) {
 								// TODO: revision mismatch
 								LOG.warn("/!\\ Revision mismatch between LS and GS /!\\");
 								break;
@@ -219,15 +200,12 @@ public class LoginServerThread extends Thread
 							
 							RSAPublicKey publicKey;
 							
-							try
-							{
+							try {
 								KeyFactory kfac = KeyFactory.getInstance("RSA");
 								BigInteger modulus = new BigInteger(init.getRSAKey());
 								RSAPublicKeySpec kspec1 = new RSAPublicKeySpec(modulus, RSAKeyGenParameterSpec.F4);
 								publicKey = (RSAPublicKey) kfac.generatePublic(kspec1);
-							}
-							catch (GeneralSecurityException e)
-							{
+							} catch (GeneralSecurityException e) {
 								LOG.warn("Trouble while init the public key send by login");
 								break;
 							}
@@ -249,41 +227,28 @@ public class LoginServerThread extends Thread
 							Config.saveHexid(serverID, hexToString(_hexID));
 							LOG.info("Registered on login as Server {}: {}", serverID, _serverName);
 							ServerStatus st = new ServerStatus();
-							if (Config.SERVER_LIST_BRACKET)
-							{
+							if (Config.SERVER_LIST_BRACKET) {
 								st.addAttribute(ServerStatus.SERVER_LIST_SQUARE_BRACKET, ServerStatus.ON);
-							}
-							else
-							{
+							} else {
 								st.addAttribute(ServerStatus.SERVER_LIST_SQUARE_BRACKET, ServerStatus.OFF);
 							}
 							st.addAttribute(ServerStatus.SERVER_TYPE, Config.SERVER_LIST_TYPE);
-							if (Config.SERVER_GMONLY)
-							{
+							if (Config.SERVER_GMONLY) {
 								st.addAttribute(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_GM_ONLY);
-							}
-							else
-							{
+							} else {
 								st.addAttribute(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_AUTO);
 							}
-							if (Config.SERVER_LIST_AGE == 15)
-							{
+							if (Config.SERVER_LIST_AGE == 15) {
 								st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_15);
-							}
-							else if (Config.SERVER_LIST_AGE == 18)
-							{
+							} else if (Config.SERVER_LIST_AGE == 18) {
 								st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_18);
-							}
-							else
-							{
+							} else {
 								st.addAttribute(ServerStatus.SERVER_AGE, ServerStatus.SERVER_AGE_ALL);
 							}
 							sendPacket(st);
-							if (L2World.getInstance().getAllPlayersCount() > 0)
-							{
+							if (L2World.getInstance().getAllPlayersCount() > 0) {
 								final List<String> playerList = new ArrayList<>();
-								for (L2PcInstance player : L2World.getInstance().getPlayers())
-								{
+								for (L2PcInstance player : L2World.getInstance().getPlayers()) {
 									playerList.add(player.getAccountName());
 								}
 								sendPacket(new PlayerInGame(playerList));
@@ -293,20 +258,15 @@ public class LoginServerThread extends Thread
 							PlayerAuthResponse par = new PlayerAuthResponse(incoming);
 							String account = par.getAccount();
 							WaitingClient wcToRemove = null;
-							synchronized (_waitingClients)
-							{
-								for (WaitingClient wc : _waitingClients)
-								{
-									if (wc.account.equals(account))
-									{
+							synchronized (_waitingClients) {
+								for (WaitingClient wc : _waitingClients) {
+									if (wc.account.equals(account)) {
 										wcToRemove = wc;
 									}
 								}
 							}
-							if (wcToRemove != null)
-							{
-								if (par.isAuthed())
-								{
+							if (wcToRemove != null) {
+								if (par.isAuthed()) {
 									PlayerInGame pig = new PlayerInGame(par.getAccount());
 									sendPacket(pig);
 									wcToRemove.gameClient.setState(GameClientState.AUTHED);
@@ -314,9 +274,7 @@ public class LoginServerThread extends Thread
 									CharSelectionInfo cl = new CharSelectionInfo(wcToRemove.account, wcToRemove.gameClient.getSessionId().playOkID1);
 									wcToRemove.gameClient.getConnection().sendPacket(cl);
 									wcToRemove.gameClient.setCharSelection(cl.getCharInfo());
-								}
-								else
-								{
+								} else {
 									LOG.warn("Session key is not correct. Closing connection for account {}.", wcToRemove.account);
 									// wcToRemove.gameClient.getConnection().sendPacket(new LoginFail(LoginFail.SYSTEM_ERROR_LOGIN_LATER));
 									wcToRemove.gameClient.close(new LoginFail(LoginFail.SYSTEM_ERROR_LOGIN_LATER));
@@ -338,40 +296,25 @@ public class LoginServerThread extends Thread
 							break;
 					}
 				}
-			}
-			catch (UnknownHostException e)
-			{
+			} catch (UnknownHostException e) {
 				LOG.warn("Unknown host!", e);
-			}
-			catch (SocketException e)
-			{
+			} catch (SocketException e) {
 				LOG.warn("LoginServer not avaible, trying to reconnect...");
-			}
-			catch (IOException e)
-			{
+			} catch (IOException e) {
 				LOG.warn("Disconnected from Login, Trying to reconnect!", e);
-			}
-			finally
-			{
-				try
-				{
+			} finally {
+				try {
 					_loginSocket.close();
-					if (isInterrupted())
-					{
+					if (isInterrupted()) {
 						return;
 					}
-				}
-				catch (Exception e)
-				{
+				} catch (Exception e) {
 				}
 			}
 			
-			try
-			{
+			try {
 				Thread.sleep(5000); // 5 seconds tempo.
-			}
-			catch (InterruptedException e)
-			{
+			} catch (InterruptedException e) {
 				return; // never swallow an interrupt!
 			}
 		}
@@ -383,20 +326,15 @@ public class LoginServerThread extends Thread
 	 * @param client the game client
 	 * @param key the session key
 	 */
-	public void addWaitingClientAndSendRequest(String acc, L2GameClient client, SessionKey key)
-	{
+	public void addWaitingClientAndSendRequest(String acc, L2GameClient client, SessionKey key) {
 		WaitingClient wc = new WaitingClient(acc, client, key);
-		synchronized (_waitingClients)
-		{
+		synchronized (_waitingClients) {
 			_waitingClients.add(wc);
 		}
 		PlayerAuthRequest par = new PlayerAuthRequest(acc, key);
-		try
-		{
+		try {
 			sendPacket(par);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 			LOG.warn("Error while sending player auth request!");
 		}
 	}
@@ -405,20 +343,15 @@ public class LoginServerThread extends Thread
 	 * Removes the waiting client.
 	 * @param client the client
 	 */
-	public void removeWaitingClient(L2GameClient client)
-	{
+	public void removeWaitingClient(L2GameClient client) {
 		WaitingClient toRemove = null;
-		synchronized (_waitingClients)
-		{
-			for (WaitingClient c : _waitingClients)
-			{
-				if (c.gameClient == client)
-				{
+		synchronized (_waitingClients) {
+			for (WaitingClient c : _waitingClients) {
+				if (c.gameClient == client) {
 					toRemove = c;
 				}
 			}
-			if (toRemove != null)
-			{
+			if (toRemove != null) {
 				_waitingClients.remove(toRemove);
 			}
 		}
@@ -428,23 +361,16 @@ public class LoginServerThread extends Thread
 	 * Send logout for the given account.
 	 * @param account the account
 	 */
-	public void sendLogout(String account)
-	{
-		if (account == null)
-		{
+	public void sendLogout(String account) {
+		if (account == null) {
 			return;
 		}
 		PlayerLogout pl = new PlayerLogout(account);
-		try
-		{
+		try {
 			sendPacket(pl);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 			LOG.warn("Error while sending logout packet to login!");
-		}
-		finally
-		{
+		} finally {
 			_accountsInGameServer.remove(account);
 		}
 	}
@@ -455,8 +381,7 @@ public class LoginServerThread extends Thread
 	 * @param client the client
 	 * @return {@code true} if account was not already logged in, {@code false} otherwise
 	 */
-	public boolean addGameServerLogin(String account, L2GameClient client)
-	{
+	public boolean addGameServerLogin(String account, L2GameClient client) {
 		return _accountsInGameServer.putIfAbsent(account, client) == null;
 	}
 	
@@ -465,15 +390,11 @@ public class LoginServerThread extends Thread
 	 * @param account the account
 	 * @param level the access level
 	 */
-	public void sendAccessLevel(String account, int level)
-	{
+	public void sendAccessLevel(String account, int level) {
 		ChangeAccessLevel cal = new ChangeAccessLevel(account, level);
-		try
-		{
+		try {
 			sendPacket(cal);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 		}
 	}
 	
@@ -482,15 +403,11 @@ public class LoginServerThread extends Thread
 	 * @param account the account
 	 * @param address the address
 	 */
-	public void sendClientTracert(String account, String[] address)
-	{
+	public void sendClientTracert(String account, String[] address) {
 		PlayerTracert ptc = new PlayerTracert(account, address[0], address[1], address[2], address[3], address[4]);
-		try
-		{
+		try {
 			sendPacket(ptc);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 		}
 	}
 	
@@ -500,15 +417,11 @@ public class LoginServerThread extends Thread
 	 * @param mailId the mail id
 	 * @param args the args
 	 */
-	public void sendMail(String account, String mailId, String... args)
-	{
+	public void sendMail(String account, String mailId, String... args) {
 		SendMail sem = new SendMail(account, mailId, args);
-		try
-		{
+		try {
 			sendPacket(sem);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 		}
 	}
 	
@@ -518,15 +431,11 @@ public class LoginServerThread extends Thread
 	 * @param ip the ip
 	 * @param time the time
 	 */
-	public void sendTempBan(String account, String ip, long time)
-	{
+	public void sendTempBan(String account, String ip, long time) {
 		TempBan tbn = new TempBan(account, ip, time);
-		try
-		{
+		try {
 			sendPacket(tbn);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 		}
 	}
 	
@@ -535,8 +444,7 @@ public class LoginServerThread extends Thread
 	 * @param hex the hex value
 	 * @return the hex value as string
 	 */
-	private String hexToString(byte[] hex)
-	{
+	private String hexToString(byte[] hex) {
 		return new BigInteger(hex).toString(16);
 	}
 	
@@ -544,11 +452,9 @@ public class LoginServerThread extends Thread
 	 * Kick player for the given account.
 	 * @param account the account
 	 */
-	public void doKickPlayer(String account)
-	{
+	public void doKickPlayer(String account) {
 		L2GameClient client = _accountsInGameServer.get(account);
-		if (client != null)
-		{
+		if (client != null) {
 			LOG_ACCOUNTING.warn("Kicked by login: {}", client);
 			client.setAditionalClosePacket(SystemMessage.getSystemMessage(SystemMessageId.ANOTHER_LOGIN_WITH_ACCOUNT));
 			client.closeNow();
@@ -559,40 +465,30 @@ public class LoginServerThread extends Thread
 	 * Gets the chars on server.
 	 * @param account the account
 	 */
-	private void getCharsOnServer(String account)
-	{
+	private void getCharsOnServer(String account) {
 		
 		int chars = 0;
 		List<Long> charToDel = new ArrayList<>();
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT deletetime FROM characters WHERE account_name=?"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT deletetime FROM characters WHERE account_name=?")) {
 			ps.setString(1, account);
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					chars++;
 					long delTime = rs.getLong("deletetime");
-					if (delTime != 0)
-					{
+					if (delTime != 0) {
 						charToDel.add(delTime);
 					}
 				}
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (SQLException e) {
 			LOG.warn("Exception: getCharsOnServer!", e);
 		}
 		
 		ReplyCharacters rec = new ReplyCharacters(account, chars, charToDel);
-		try
-		{
+		try {
 			sendPacket(rec);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 		}
 	}
 	
@@ -601,8 +497,7 @@ public class LoginServerThread extends Thread
 	 * @param sl the sendable packet
 	 * @throws IOException Signals that an I/O exception has occurred.
 	 */
-	private void sendPacket(BaseSendablePacket sl) throws IOException
-	{
+	private void sendPacket(BaseSendablePacket sl) throws IOException {
 		byte[] data = sl.getContent();
 		NewCrypt.appendChecksum(data);
 		_blowfish.crypt(data, 0, data.length);
@@ -621,8 +516,7 @@ public class LoginServerThread extends Thread
 	 * Sets the max player.
 	 * @param maxPlayer The maxPlayer to set.
 	 */
-	public void setMaxPlayer(int maxPlayer)
-	{
+	public void setMaxPlayer(int maxPlayer) {
 		sendServerStatus(ServerStatus.MAX_PLAYERS, maxPlayer);
 		_maxPlayer = maxPlayer;
 	}
@@ -631,8 +525,7 @@ public class LoginServerThread extends Thread
 	 * Gets the max player.
 	 * @return Returns the maxPlayer.
 	 */
-	public int getMaxPlayer()
-	{
+	public int getMaxPlayer() {
 		return _maxPlayer;
 	}
 	
@@ -641,32 +534,24 @@ public class LoginServerThread extends Thread
 	 * @param id the id
 	 * @param value the value
 	 */
-	public void sendServerStatus(int id, int value)
-	{
+	public void sendServerStatus(int id, int value) {
 		ServerStatus ss = new ServerStatus();
 		ss.addAttribute(id, value);
-		try
-		{
+		try {
 			sendPacket(ss);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 		}
 	}
 	
 	/**
 	 * Send Server Type Config to LS.
 	 */
-	public void sendServerType()
-	{
+	public void sendServerType() {
 		ServerStatus ss = new ServerStatus();
 		ss.addAttribute(ServerStatus.SERVER_TYPE, Config.SERVER_LIST_TYPE);
-		try
-		{
+		try {
 			sendPacket(ss);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 		}
 	}
 	
@@ -677,15 +562,11 @@ public class LoginServerThread extends Thread
 	 * @param oldpass the old pass
 	 * @param newpass the new pass
 	 */
-	public void sendChangePassword(String accountName, String charName, String oldpass, String newpass)
-	{
+	public void sendChangePassword(String accountName, String charName, String oldpass, String newpass) {
 		ChangePassword cp = new ChangePassword(accountName, charName, oldpass, newpass);
-		try
-		{
+		try {
 			sendPacket(cp);
-		}
-		catch (IOException e)
-		{
+		} catch (IOException e) {
 		}
 	}
 	
@@ -693,8 +574,7 @@ public class LoginServerThread extends Thread
 	 * Gets the status string.
 	 * @return the status string
 	 */
-	public String getStatusString()
-	{
+	public String getStatusString() {
 		return ServerStatus.STATUS_STRING[_status];
 	}
 	
@@ -702,8 +582,7 @@ public class LoginServerThread extends Thread
 	 * Gets the server name.
 	 * @return the server name.
 	 */
-	public String getServerName()
-	{
+	public String getServerName() {
 		return _serverName;
 	}
 	
@@ -711,10 +590,8 @@ public class LoginServerThread extends Thread
 	 * Sets the server status.
 	 * @param status the new server status
 	 */
-	public void setServerStatus(int status)
-	{
-		switch (status)
-		{
+	public void setServerStatus(int status) {
+		switch (status) {
 			case ServerStatus.STATUS_AUTO:
 				sendServerStatus(ServerStatus.SERVER_LIST_STATUS, ServerStatus.STATUS_AUTO);
 				_status = status;
@@ -744,13 +621,11 @@ public class LoginServerThread extends Thread
 		}
 	}
 	
-	public L2GameClient getClient(String name)
-	{
+	public L2GameClient getClient(String name) {
 		return name != null ? _accountsInGameServer.get(name) : null;
 	}
 	
-	public static class SessionKey
-	{
+	public static class SessionKey {
 		public int playOkID1;
 		public int playOkID2;
 		public int loginOkID1;
@@ -763,8 +638,7 @@ public class LoginServerThread extends Thread
 		 * @param playOK1 the play o k1
 		 * @param playOK2 the play o k2
 		 */
-		public SessionKey(int loginOK1, int loginOK2, int playOK1, int playOK2)
-		{
+		public SessionKey(int loginOK1, int loginOK2, int playOK1, int playOK2) {
 			playOkID1 = playOK1;
 			playOkID2 = playOK2;
 			loginOkID1 = loginOK1;
@@ -772,14 +646,12 @@ public class LoginServerThread extends Thread
 		}
 		
 		@Override
-		public String toString()
-		{
+		public String toString() {
 			return "PlayOk: " + playOkID1 + " " + playOkID2 + " LoginOk:" + loginOkID1 + " " + loginOkID2;
 		}
 	}
 	
-	private static class WaitingClient
-	{
+	private static class WaitingClient {
 		public String account;
 		public L2GameClient gameClient;
 		public SessionKey session;
@@ -790,8 +662,7 @@ public class LoginServerThread extends Thread
 		 * @param client the client
 		 * @param key the key
 		 */
-		public WaitingClient(String acc, L2GameClient client, SessionKey key)
-		{
+		public WaitingClient(String acc, L2GameClient client, SessionKey key) {
 			account = acc;
 			gameClient = client;
 			session = key;
@@ -802,13 +673,11 @@ public class LoginServerThread extends Thread
 	 * Gets the single instance of LoginServerThread.
 	 * @return single instance of LoginServerThread
 	 */
-	public static LoginServerThread getInstance()
-	{
+	public static LoginServerThread getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final LoginServerThread _instance = new LoginServerThread();
 	}
 }

+ 1 - 1
src/main/java/com/l2jserver/gameserver/RecipeController.java

@@ -25,7 +25,7 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Logger;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.data.xml.impl.RecipeData;
 import com.l2jserver.gameserver.datatables.ItemTable;
 import com.l2jserver.gameserver.enums.StatType;

File diff suppressed because it is too large
+ 154 - 327
src/main/java/com/l2jserver/gameserver/SevenSigns.java


File diff suppressed because it is too large
+ 158 - 324
src/main/java/com/l2jserver/gameserver/SevenSignsFestival.java


+ 77 - 163
src/main/java/com/l2jserver/gameserver/Shutdown.java

@@ -23,9 +23,9 @@ import java.util.concurrent.TimeUnit;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.UPnPService;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.data.sql.impl.ClanTable;
 import com.l2jserver.gameserver.data.sql.impl.OfflineTradersTable;
 import com.l2jserver.gameserver.datatables.BotReportTable;
@@ -54,9 +54,10 @@ import com.l2jserver.gameserver.util.Broadcast;
  * It closes all open client connections and saves all data.
  * @version $Revision: 1.2.4.5 $ $Date: 2005/03/27 15:29:09 $
  */
-public class Shutdown extends Thread
-{
+public class Shutdown extends Thread {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(Shutdown.class);
+	
 	private static Shutdown _counterInstance = null;
 	
 	private int _secondsShut;
@@ -65,8 +66,7 @@ public class Shutdown extends Thread
 	private static final int GM_SHUTDOWN = 1;
 	private static final int GM_RESTART = 2;
 	private static final int ABORT = 3;
-	private static final String[] MODE_TEXT =
-	{
+	private static final String[] MODE_TEXT = {
 		"SIGTERM",
 		"shutting down",
 		"restarting",
@@ -77,30 +77,23 @@ public class Shutdown extends Thread
 	 * This function starts a shutdown count down from Telnet (Copied from Function startShutdown())
 	 * @param seconds seconds until shutdown
 	 */
-	private void SendServerQuit(int seconds)
-	{
+	private void SendServerQuit(int seconds) {
 		SystemMessage sysm = SystemMessage.getSystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECONDS);
 		sysm.addInt(seconds);
 		Broadcast.toAllOnlinePlayers(sysm);
 	}
 	
-	public void startTelnetShutdown(String IP, int seconds, boolean restart)
-	{
+	public void startTelnetShutdown(String IP, int seconds, boolean restart) {
 		LOG.warn("IP: {} issued shutdown command. {} in {} seconds!", IP, MODE_TEXT[_shutdownMode], seconds);
 		
-		if (restart)
-		{
+		if (restart) {
 			_shutdownMode = GM_RESTART;
-		}
-		else
-		{
+		} else {
 			_shutdownMode = GM_SHUTDOWN;
 		}
 		
-		if (_shutdownMode > 0)
-		{
-			switch (seconds)
-			{
+		if (_shutdownMode > 0) {
+			switch (seconds) {
 				case 540:
 				case 480:
 				case 420:
@@ -123,8 +116,7 @@ public class Shutdown extends Thread
 			}
 		}
 		
-		if (_counterInstance != null)
-		{
+		if (_counterInstance != null) {
 			_counterInstance._abort();
 		}
 		_counterInstance = new Shutdown(seconds, restart);
@@ -135,12 +127,10 @@ public class Shutdown extends Thread
 	 * This function aborts a running countdown
 	 * @param IP IP Which Issued shutdown command
 	 */
-	public void telnetAbort(String IP)
-	{
+	public void telnetAbort(String IP) {
 		LOG.warn("IP: {} issued shutdown ABORT. {} has been stopped!", IP, MODE_TEXT[_shutdownMode]);
 		
-		if (_counterInstance != null)
-		{
+		if (_counterInstance != null) {
 			_counterInstance._abort();
 			Broadcast.toAllOnlinePlayers("Server aborts " + MODE_TEXT[_shutdownMode] + " and continues normal operation!", false);
 		}
@@ -149,8 +139,7 @@ public class Shutdown extends Thread
 	/**
 	 * Default constructor is only used internal to create the shutdown-hook instance
 	 */
-	protected Shutdown()
-	{
+	protected Shutdown() {
 		_secondsShut = -1;
 		_shutdownMode = SIGTERM;
 	}
@@ -160,19 +149,14 @@ public class Shutdown extends Thread
 	 * @param seconds how many seconds until shutdown
 	 * @param restart true is the server shall restart after shutdown
 	 */
-	public Shutdown(int seconds, boolean restart)
-	{
-		if (seconds < 0)
-		{
+	public Shutdown(int seconds, boolean restart) {
+		if (seconds < 0) {
 			seconds = 0;
 		}
 		_secondsShut = seconds;
-		if (restart)
-		{
+		if (restart) {
 			_shutdownMode = GM_RESTART;
-		}
-		else
-		{
+		} else {
 			_shutdownMode = GM_SHUTDOWN;
 		}
 	}
@@ -183,75 +167,54 @@ public class Shutdown extends Thread
 	 * We start the countdown, and when we finished it, and it was not aborted, we tell the shutdown-hook why we call exit, and then call exit when the exit status of the server is 1, startServer.sh / startServer.bat will restart the server.
 	 */
 	@Override
-	public void run()
-	{
-		if (this == getInstance())
-		{
+	public void run() {
+		if (this == getInstance()) {
 			TimeCounter tc = new TimeCounter();
 			TimeCounter tc1 = new TimeCounter();
 			
-			try
-			{
+			try {
 				UPnPService.getInstance().removeAllPorts();
 				LOG.info("UPnP Service: All ports mappings deleted ({}ms).", tc.getEstimatedTimeAndRestartCounter());
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				LOG.warn("Error while removing UPnP port mappings!", e);
 			}
 			
-			try
-			{
-				if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS)
-				{
+			try {
+				if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS) {
 					OfflineTradersTable.getInstance().storeOffliners();
 					LOG.info("Offline Traders Table: Offline shops stored({}ms).", tc.getEstimatedTimeAndRestartCounter());
 				}
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				LOG.warn("Error saving offline shops!", e);
 			}
 			
-			try
-			{
+			try {
 				disconnectAllCharacters();
 				LOG.info("All players disconnected and saved({}ms).", tc.getEstimatedTimeAndRestartCounter());
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				// ignore
 			}
 			
 			// ensure all services are stopped
-			try
-			{
+			try {
 				GameTimeController.getInstance().stopTimer();
 				LOG.info("Game Time Controller: Timer stopped({}ms).", tc.getEstimatedTimeAndRestartCounter());
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				// ignore
 			}
 			
 			// stop all thread pools
-			try
-			{
+			try {
 				ThreadPoolManager.getInstance().shutdown();
 				LOG.info("Thread Pool Manager: Manager has been shut down({}ms).", tc.getEstimatedTimeAndRestartCounter());
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				// ignore
 			}
 			
-			try
-			{
+			try {
 				LoginServerThread.getInstance().interrupt();
 				LOG.info("Login Server Thread: Thread interruped({}ms).", tc.getEstimatedTimeAndRestartCounter());
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				// ignore
 			}
 			
@@ -260,13 +223,10 @@ public class Shutdown extends Thread
 			tc.restartCounter();
 			
 			// saveData sends messages to exit players, so shutdown selector after it
-			try
-			{
+			try {
 				GameServer.gameServer.getSelectorThread().shutdown();
 				LOG.info("Game Server: Selector thread has been shut down({}ms).", tc.getEstimatedTimeAndRestartCounter());
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				// ignore
 			}
 			
@@ -275,25 +235,19 @@ public class Shutdown extends Thread
 			LOG.info("ConnectionFactory: Database connection has been shutdown({}ms).", tc.getEstimatedTimeAndRestartCounter());
 			
 			// server will quit, when this function ends.
-			if (getInstance()._shutdownMode == GM_RESTART)
-			{
+			if (getInstance()._shutdownMode == GM_RESTART) {
 				Runtime.getRuntime().halt(2);
-			}
-			else
-			{
+			} else {
 				Runtime.getRuntime().halt(0);
 			}
 			
 			LOG.info("The server has been successfully shut down in {}seconds.", TimeUnit.MILLISECONDS.toSeconds(tc1.getEstimatedTime()));
-		}
-		else
-		{
+		} else {
 			// gm shutdown: send warnings and then call exit to start shutdown sequence
 			countdown();
 			// last point where logging is operational :(
 			LOG.warn("GM shutdown countdown is over. {} NOW!", MODE_TEXT[_shutdownMode]);
-			switch (_shutdownMode)
-			{
+			switch (_shutdownMode) {
 				case GM_SHUTDOWN:
 					getInstance().setMode(GM_SHUTDOWN);
 					System.exit(0);
@@ -315,23 +269,17 @@ public class Shutdown extends Thread
 	 * @param seconds seconds until shutdown
 	 * @param restart true if the server will restart after shutdown
 	 */
-	public void startShutdown(L2PcInstance activeChar, int seconds, boolean restart)
-	{
-		if (restart)
-		{
+	public void startShutdown(L2PcInstance activeChar, int seconds, boolean restart) {
+		if (restart) {
 			_shutdownMode = GM_RESTART;
-		}
-		else
-		{
+		} else {
 			_shutdownMode = GM_SHUTDOWN;
 		}
 		
 		LOG.warn("GM: {}({}) issued shutdown command. {} in {} seconds!", activeChar.getName(), activeChar.getObjectId(), MODE_TEXT[_shutdownMode], seconds);
 		
-		if (_shutdownMode > 0)
-		{
-			switch (seconds)
-			{
+		if (_shutdownMode > 0) {
+			switch (seconds) {
 				case 540:
 				case 480:
 				case 420:
@@ -354,8 +302,7 @@ public class Shutdown extends Thread
 			}
 		}
 		
-		if (_counterInstance != null)
-		{
+		if (_counterInstance != null) {
 			_counterInstance._abort();
 		}
 		
@@ -368,11 +315,9 @@ public class Shutdown extends Thread
 	 * This function aborts a running countdown.
 	 * @param activeChar GM who issued the abort command
 	 */
-	public void abort(L2PcInstance activeChar)
-	{
+	public void abort(L2PcInstance activeChar) {
 		LOG.warn("GM: {}({}) issued shutdown ABORT. {} has been stopped!", activeChar.getName(), activeChar.getObjectId(), MODE_TEXT[_shutdownMode]);
-		if (_counterInstance != null)
-		{
+		if (_counterInstance != null) {
 			_counterInstance._abort();
 			Broadcast.toAllOnlinePlayers("Server aborts " + MODE_TEXT[_shutdownMode] + " and continues normal operation!", false);
 		}
@@ -382,31 +327,25 @@ public class Shutdown extends Thread
 	 * Set the shutdown mode.
 	 * @param mode what mode shall be set
 	 */
-	private void setMode(int mode)
-	{
+	private void setMode(int mode) {
 		_shutdownMode = mode;
 	}
 	
 	/**
 	 * Set shutdown mode to ABORT.
 	 */
-	private void _abort()
-	{
+	private void _abort() {
 		_shutdownMode = ABORT;
 	}
 	
 	/**
 	 * This counts the countdown and reports it to all players countdown is aborted if mode changes to ABORT.
 	 */
-	private void countdown()
-	{
-		try
-		{
-			while (_secondsShut > 0)
-			{
+	private void countdown() {
+		try {
+			while (_secondsShut > 0) {
 				
-				switch (_secondsShut)
-				{
+				switch (_secondsShut) {
 					case 540:
 						SendServerQuit(540);
 						break;
@@ -463,14 +402,11 @@ public class Shutdown extends Thread
 				int delay = 1000; // milliseconds
 				Thread.sleep(delay);
 				
-				if (_shutdownMode == ABORT)
-				{
+				if (_shutdownMode == ABORT) {
 					break;
 				}
 			}
-		}
-		catch (InterruptedException e)
-		{
+		} catch (InterruptedException e) {
 			// this will never happen
 		}
 	}
@@ -478,10 +414,8 @@ public class Shutdown extends Thread
 	/**
 	 * This sends a last byebye, disconnects all players and saves data.
 	 */
-	private void saveData()
-	{
-		switch (_shutdownMode)
-		{
+	private void saveData() {
+		switch (_shutdownMode) {
 			case SIGTERM:
 				LOG.info("SIGTERM received. Shutting down NOW!");
 				break;
@@ -495,8 +429,7 @@ public class Shutdown extends Thread
 		
 		TimeCounter tc = new TimeCounter();
 		// Seven Signs data is now saved along with Festival data.
-		if (!SevenSigns.getInstance().isSealValidationPeriod())
-		{
+		if (!SevenSigns.getInstance().isSealValidationPeriod()) {
 			SevenSignsFestival.getInstance().saveFestivalData(false);
 			LOG.info("SevenSignsFestival: Festival data saved({}ms).", tc.getEstimatedTimeAndRestartCounter());
 		}
@@ -526,8 +459,7 @@ public class Shutdown extends Thread
 		LOG.info("Cursed Weapons Manager: Data saved({}ms).", tc.getEstimatedTimeAndRestartCounter());
 		
 		// Save all manor data
-		if (!Config.ALT_MANOR_SAVE_ALL_ACTIONS)
-		{
+		if (!Config.ALT_MANOR_SAVE_ALL_ACTIONS) {
 			CastleManorManager.getInstance().storeMe();
 			LOG.info("Castle Manor Manager: Data saved({}ms).", tc.getEstimatedTimeAndRestartCounter());
 		}
@@ -544,8 +476,7 @@ public class Shutdown extends Thread
 		LOG.info("Global Variables Manager: Variables saved({}ms).", tc.getEstimatedTimeAndRestartCounter());
 		
 		// Save items on ground before closing
-		if (Config.SAVE_DROPPED_ITEM)
-		{
+		if (Config.SAVE_DROPPED_ITEM) {
 			ItemsOnGroundManager.getInstance().saveInDb();
 			LOG.info("Items On Ground Manager: Data saved({}ms).", tc.getEstimatedTimeAndRestartCounter());
 			ItemsOnGroundManager.getInstance().cleanUp();
@@ -553,18 +484,14 @@ public class Shutdown extends Thread
 		}
 		
 		// Save bot reports to database
-		if (Config.BOTREPORT_ENABLE)
-		{
+		if (Config.BOTREPORT_ENABLE) {
 			BotReportTable.getInstance().saveReportedCharData();
 			LOG.info("Bot Report Table: Successfully saved reports to database!");
 		}
 		
-		try
-		{
+		try {
 			Thread.sleep(5000);
-		}
-		catch (InterruptedException e)
-		{
+		} catch (InterruptedException e) {
 			// never happens :p
 		}
 	}
@@ -572,24 +499,18 @@ public class Shutdown extends Thread
 	/**
 	 * This disconnects all clients from the server.
 	 */
-	private void disconnectAllCharacters()
-	{
-		for (L2PcInstance player : L2World.getInstance().getPlayers())
-		{
+	private void disconnectAllCharacters() {
+		for (L2PcInstance player : L2World.getInstance().getPlayers()) {
 			// Logout Character
-			try
-			{
+			try {
 				L2GameClient client = player.getClient();
-				if ((client != null) && !client.isDetached())
-				{
+				if ((client != null) && !client.isDetached()) {
 					client.close(ServerClose.STATIC_PACKET);
 					client.setActiveChar(null);
 					player.setClient(null);
 				}
 				player.deleteMe();
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				LOG.warn("Failed logour char {}", player, e);
 			}
 		}
@@ -599,29 +520,24 @@ public class Shutdown extends Thread
 	 * A simple class used to track down the estimated time of method executions.<br>
 	 * Once this class is created, it saves the start time, and when you want to get the estimated time, use the getEstimatedTime() method.
 	 */
-	private static final class TimeCounter
-	{
+	private static final class TimeCounter {
 		private long _startTime;
 		
-		protected TimeCounter()
-		{
+		protected TimeCounter() {
 			restartCounter();
 		}
 		
-		protected void restartCounter()
-		{
+		protected void restartCounter() {
 			_startTime = System.currentTimeMillis();
 		}
 		
-		protected long getEstimatedTimeAndRestartCounter()
-		{
+		protected long getEstimatedTimeAndRestartCounter() {
 			final long toReturn = System.currentTimeMillis() - _startTime;
 			restartCounter();
 			return toReturn;
 		}
 		
-		protected long getEstimatedTime()
-		{
+		protected long getEstimatedTime() {
 			return System.currentTimeMillis() - _startTime;
 		}
 	}
@@ -630,13 +546,11 @@ public class Shutdown extends Thread
 	 * Get the shutdown-hook instance the shutdown-hook instance is created by the first call of this function, but it has to be registered externally.<br>
 	 * @return instance of Shutdown, to be used as shutdown hook
 	 */
-	public static Shutdown getInstance()
-	{
+	public static Shutdown getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final Shutdown _instance = new Shutdown();
 	}
 }

+ 1 - 1
src/main/java/com/l2jserver/gameserver/ThreadPoolManager.java

@@ -31,7 +31,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.util.StringUtil;
 
 /**

+ 1 - 1
src/main/java/com/l2jserver/gameserver/ai/L2AttackableAI.java

@@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.GameTimeController;
 import com.l2jserver.gameserver.GeoData;
 import com.l2jserver.gameserver.ThreadPoolManager;

+ 1 - 1
src/main/java/com/l2jserver/gameserver/ai/L2CharacterAI.java

@@ -31,7 +31,7 @@ import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_REST;
 import java.util.ArrayList;
 import java.util.List;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.GameTimeController;
 import com.l2jserver.gameserver.GeoData;
 import com.l2jserver.gameserver.ThreadPoolManager;

+ 1 - 1
src/main/java/com/l2jserver/gameserver/ai/L2SummonAI.java

@@ -24,7 +24,7 @@ import static com.l2jserver.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE;
 
 import java.util.concurrent.Future;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.GeoData;
 import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.model.L2Object;

+ 1 - 1
src/main/java/com/l2jserver/gameserver/cache/HtmCache.java

@@ -28,7 +28,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.util.Util;
 import com.l2jserver.util.file.filter.HTMLFilter;
 

+ 1 - 1
src/main/java/com/l2jserver/gameserver/cache/WarehouseCacheManager.java

@@ -21,7 +21,7 @@ package com.l2jserver.gameserver.cache;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 

+ 37 - 88
src/main/java/com/l2jserver/gameserver/communitybbs/BB/Forum.java

@@ -18,9 +18,6 @@
  */
 package com.l2jserver.gameserver.communitybbs.BB;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -29,12 +26,12 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.communitybbs.Manager.ForumsBBSManager;
 import com.l2jserver.gameserver.communitybbs.Manager.TopicBBSManager;
 
-public final class Forum
-{
+public final class Forum {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(Forum.class);
 	
 	// type
@@ -65,21 +62,12 @@ public final class Forum
 	 * @param Forumid
 	 * @param FParent
 	 */
-	public Forum(int Forumid, Forum FParent)
-	{
+	public Forum(int Forumid, Forum FParent) {
 		_forumId = Forumid;
 		_fParent = FParent;
 	}
 	
-	/**
-	 * @param name
-	 * @param parent
-	 * @param type
-	 * @param perm
-	 * @param OwnerID
-	 */
-	public Forum(String name, Forum parent, int type, int perm, int OwnerID)
-	{
+	public Forum(String name, Forum parent, int type, int perm, int OwnerID) {
 		_forumName = name;
 		_forumId = ForumsBBSManager.getInstance().getANewID();
 		_forumType = type;
@@ -92,16 +80,12 @@ public final class Forum
 		_loaded = true;
 	}
 	
-	private void load()
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT * FROM forums WHERE forum_id=?"))
-		{
+	private void load() {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT * FROM forums WHERE forum_id=?")) {
 			ps.setInt(1, _forumId);
-			try (ResultSet rs = ps.executeQuery())
-			{
-				if (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				if (rs.next()) {
 					_forumName = rs.getString("forum_name");
 					_forumPost = rs.getInt("forum_post");
 					_forumType = rs.getInt("forum_type");
@@ -109,91 +93,68 @@ public final class Forum
 					_ownerID = rs.getInt("forum_owner_id");
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not get from database forum ID {}!", _forumId, e);
 		}
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT * FROM topic WHERE topic_forum_id=? ORDER BY topic_id DESC"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT * FROM topic WHERE topic_forum_id=? ORDER BY topic_id DESC")) {
 			ps.setInt(1, _forumId);
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					Topic t = new Topic(Topic.ConstructorType.RESTORE, rs.getInt("topic_id"), rs.getInt("topic_forum_id"), rs.getString("topic_name"), rs.getLong("topic_date"), rs.getString("topic_ownername"), rs.getInt("topic_ownerid"), rs.getInt("topic_type"), rs.getInt("topic_reply"));
 					_topic.put(t.getID(), t);
-					if (t.getID() > TopicBBSManager.getInstance().getMaxID(this))
-					{
+					if (t.getID() > TopicBBSManager.getInstance().getMaxID(this)) {
 						TopicBBSManager.getInstance().setMaxID(t.getID(), this);
 					}
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not get from database topics for forum ID {}", _forumId, e);
 		}
 	}
 	
-	private void getChildren()
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT forum_id FROM forums WHERE forum_parent=?"))
-		{
+	private void getChildren() {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT forum_id FROM forums WHERE forum_parent=?")) {
 			ps.setInt(1, _forumId);
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					final Forum f = new Forum(rs.getInt("forum_id"), this);
 					_children.add(f);
 					ForumsBBSManager.getInstance().addForum(f);
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not get from database child forums for forum ID {}", _forumId, e);
 		}
 	}
 	
-	public int getTopicSize()
-	{
+	public int getTopicSize() {
 		vload();
 		return _topic.size();
 	}
 	
-	public Topic getTopic(int j)
-	{
+	public Topic getTopic(int j) {
 		vload();
 		return _topic.get(j);
 	}
 	
-	public void addTopic(Topic t)
-	{
+	public void addTopic(Topic t) {
 		vload();
 		_topic.put(t.getID(), t);
 	}
 	
-	/**
-	 * @return the forum Id
-	 */
-	public int getID()
-	{
+	public int getID() {
 		return _forumId;
 	}
 	
-	public String getName()
-	{
+	public String getName() {
 		vload();
 		return _forumName;
 	}
 	
-	public int getType()
-	{
+	public int getType() {
 		vload();
 		return _forumType;
 	}
@@ -202,26 +163,18 @@ public final class Forum
 	 * @param name the forum name
 	 * @return the forum for the given name
 	 */
-	public Forum getChildByName(String name)
-	{
+	public Forum getChildByName(String name) {
 		vload();
 		return _children.stream().filter(f -> f.getName().equals(name)).findFirst().orElse(null);
 	}
 	
-	/**
-	 * @param id
-	 */
-	public void rmTopicByID(int id)
-	{
+	public void rmTopicByID(int id) {
 		_topic.remove(id);
-		
 	}
 	
-	public void insertIntoDb()
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("INSERT INTO forums (forum_id,forum_name,forum_parent,forum_post,forum_type,forum_perm,forum_owner_id) VALUES (?,?,?,?,?,?,?)"))
-		{
+	public void insertIntoDb() {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("INSERT INTO forums (forum_id,forum_name,forum_parent,forum_post,forum_type,forum_perm,forum_owner_id) VALUES (?,?,?,?,?,?,?)")) {
 			ps.setInt(1, _forumId);
 			ps.setString(2, _forumName);
 			ps.setInt(3, _fParent.getID());
@@ -230,17 +183,13 @@ public final class Forum
 			ps.setInt(6, _forumPerm);
 			ps.setInt(7, _ownerID);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not save forum ID {} in database!", _forumId, e);
 		}
 	}
 	
-	public void vload()
-	{
-		if (!_loaded)
-		{
+	public void vload() {
+		if (!_loaded) {
 			load();
 			getChildren();
 			_loaded = true;

+ 25 - 56
src/main/java/com/l2jserver/gameserver/communitybbs/BB/Post.java

@@ -18,27 +18,23 @@
  */
 package com.l2jserver.gameserver.communitybbs.BB;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.communitybbs.Manager.PostBBSManager;
 
 /**
  * @author Maktakien
  */
-public class Post
-{
+public class Post {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(Post.class);
 	
-	public static class CPost
-	{
+	public static class CPost {
 		public int postId;
 		public String postOwner;
 		public int postOwnerId;
@@ -58,8 +54,7 @@ public class Post
 	 * @param _PostForumID
 	 * @param txt
 	 */
-	public Post(String _PostOwner, int _PostOwnerID, long date, int tid, int _PostForumID, String txt)
-	{
+	public Post(String _PostOwner, int _PostOwnerID, long date, int tid, int _PostForumID, String txt) {
 		final CPost cp = new CPost();
 		cp.postId = 0;
 		cp.postOwner = _PostOwner;
@@ -73,16 +68,13 @@ public class Post
 		
 	}
 	
-	public Post(Topic t)
-	{
+	public Post(Topic t) {
 		load(t);
 	}
 	
-	public void insertindb(CPost cp)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)"))
-		{
+	public void insertindb(CPost cp) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("INSERT INTO posts (post_id,post_owner_name,post_ownerid,post_date,post_topic_id,post_forum_id,post_txt) values (?,?,?,?,?,?,?)")) {
 			ps.setInt(1, cp.postId);
 			ps.setString(2, cp.postOwner);
 			ps.setInt(3, cp.postOwnerId);
@@ -91,48 +83,34 @@ public class Post
 			ps.setInt(6, cp.postForumId);
 			ps.setString(7, cp.postTxt);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not save post ID {} in database!", cp.postId, e);
 		}
 	}
 	
-	public CPost getCPost(int id)
-	{
+	public CPost getCPost(int id) {
 		return _post.get(id);
 	}
 	
-	public void deleteme(Topic t)
-	{
+	public void deleteme(Topic t) {
 		PostBBSManager.getInstance().delPostByTopic(t);
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("DELETE FROM posts WHERE post_forum_id=? AND post_topic_id=?"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("DELETE FROM posts WHERE post_forum_id=? AND post_topic_id=?")) {
 			ps.setInt(1, t.getForumID());
 			ps.setInt(2, t.getID());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Unable to delete post for topic ID {} in forum ID {} from database!", t.getForumID(), t.getID(), e);
 		}
 	}
 	
-	/**
-	 * @param t
-	 */
-	private void load(Topic t)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT * FROM posts WHERE post_forum_id=? AND post_topic_id=? ORDER BY post_id ASC"))
-		{
+	private void load(Topic t) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT * FROM posts WHERE post_forum_id=? AND post_topic_id=? ORDER BY post_id ASC")) {
 			ps.setInt(1, t.getForumID());
 			ps.setInt(2, t.getID());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					final CPost cp = new CPost();
 					cp.postId = rs.getInt("post_id");
 					cp.postOwner = rs.getString("post_owner_name");
@@ -144,30 +122,21 @@ public class Post
 					_post.add(cp);
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Unable to get post from topic ID {} in forum ID {} from database!", t.getForumID(), t.getID(), e);
 		}
 	}
 	
-	/**
-	 * @param i
-	 */
-	public void updatetxt(int i)
-	{
+	public void updatetxt(int i) {
 		final CPost cp = getCPost(i);
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("UPDATE posts SET post_txt=? WHERE post_id=? AND post_topic_id=? AND post_forum_id=?"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("UPDATE posts SET post_txt=? WHERE post_id=? AND post_topic_id=? AND post_forum_id=?")) {
 			ps.setString(1, cp.postTxt);
 			ps.setInt(2, cp.postId);
 			ps.setInt(3, cp.postTopicId);
 			ps.setInt(4, cp.postForumId);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Unable to store post ID {} in database!", cp.postId, e);
 		}
 	}

+ 22 - 65
src/main/java/com/l2jserver/gameserver/communitybbs/BB/Topic.java

@@ -18,17 +18,14 @@
  */
 package com.l2jserver.gameserver.communitybbs.BB;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.communitybbs.Manager.TopicBBSManager;
 
-public class Topic
-{
+public class Topic {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(Topic.class);
 	
 	public static final int MORMAL = 0;
@@ -43,19 +40,7 @@ public class Topic
 	private final int _type;
 	private final int _cReply;
 	
-	/**
-	 * @param ct
-	 * @param id
-	 * @param fid
-	 * @param name
-	 * @param date
-	 * @param oname
-	 * @param oid
-	 * @param type
-	 * @param Creply
-	 */
-	public Topic(ConstructorType ct, int id, int fid, String name, long date, String oname, int oid, int type, int Creply)
-	{
+	public Topic(ConstructorType ct, int id, int fid, String name, long date, String oname, int oid, int type, int Creply) {
 		_id = id;
 		_forumId = fid;
 		_topicName = name;
@@ -66,18 +51,14 @@ public class Topic
 		_cReply = Creply;
 		TopicBBSManager.getInstance().addTopic(this);
 		
-		if (ct == ConstructorType.CREATE)
-		{
-			
+		if (ct == ConstructorType.CREATE) {
 			insertindb();
 		}
 	}
 	
-	public void insertindb()
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)"))
-		{
+	public void insertindb() {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("INSERT INTO topic (topic_id,topic_forum_id,topic_name,topic_date,topic_ownername,topic_ownerid,topic_type,topic_reply) values (?,?,?,?,?,?,?,?)")) {
 			ps.setInt(1, _id);
 			ps.setInt(2, _forumId);
 			ps.setString(3, _topicName);
@@ -87,70 +68,46 @@ public class Topic
 			ps.setInt(7, _type);
 			ps.setInt(8, _cReply);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Error while saving new Topic to database!", e);
 		}
 	}
 	
-	public enum ConstructorType
-	{
+	public enum ConstructorType {
 		RESTORE,
 		CREATE
 	}
 	
-	/**
-	 * @return the topic Id
-	 */
-	public int getID()
-	{
+	public int getID() {
 		return _id;
 	}
 	
-	public int getForumID()
-	{
+	public int getForumID() {
 		return _forumId;
 	}
 	
-	/**
-	 * @return the topic name
-	 */
-	public String getName()
-	{
+	public String getName() {
 		return _topicName;
 	}
 	
-	public String getOwnerName()
-	{
+	public String getOwnerName() {
 		return _ownerName;
 	}
 	
-	/**
-	 * @param f
-	 */
-	public void deleteme(Forum f)
-	{
+	public long getDate() {
+		return _date;
+	}
+	
+	public void deleteme(Forum f) {
 		TopicBBSManager.getInstance().delTopic(this);
 		f.rmTopicByID(getID());
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("DELETE FROM topic WHERE topic_id=? AND topic_forum_id=?"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("DELETE FROM topic WHERE topic_id=? AND topic_forum_id=?")) {
 			ps.setInt(1, getID());
 			ps.setInt(2, f.getID());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Error while deleting topic ID {} from database!", getID(), e);
 		}
 	}
-	
-	/**
-	 * @return the topic date
-	 */
-	public long getDate()
-	{
-		return _date;
-	}
 }

+ 23 - 41
src/main/java/com/l2jserver/gameserver/communitybbs/Manager/ForumsBBSManager.java

@@ -18,43 +18,37 @@
  */
 package com.l2jserver.gameserver.communitybbs.Manager;
 
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.Statement;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.communitybbs.BB.Forum;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
-public class ForumsBBSManager extends BaseBBSManager
-{
+public class ForumsBBSManager extends BaseBBSManager {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(ForumsBBSManager.class);
+	
 	private final List<Forum> _table = new CopyOnWriteArrayList<>();
+	
 	private int _lastid = 1;
 	
 	/**
 	 * Instantiates a new forums bbs manager.
 	 */
-	protected ForumsBBSManager()
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			Statement s = con.createStatement();
-			ResultSet rs = s.executeQuery("SELECT forum_id FROM forums WHERE forum_type = 0"))
-		{
-			while (rs.next())
-			{
+	protected ForumsBBSManager() {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var s = con.createStatement();
+			var rs = s.executeQuery("SELECT forum_id FROM forums WHERE forum_type = 0")) {
+			while (rs.next()) {
 				int forumId = rs.getInt("forum_id");
 				Forum f = new Forum(forumId, null);
 				addForum(f);
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Data error on Forum (root)!", e);
 		}
 	}
@@ -62,8 +56,7 @@ public class ForumsBBSManager extends BaseBBSManager
 	/**
 	 * Inits the root.
 	 */
-	public void initRoot()
-	{
+	public void initRoot() {
 		_table.forEach(f -> f.vload());
 		LOG.info("Loaded " + _table.size() + " forums. Last forum id used: " + _lastid);
 	}
@@ -72,24 +65,20 @@ public class ForumsBBSManager extends BaseBBSManager
 	 * Adds the forum.
 	 * @param ff the forum
 	 */
-	public void addForum(Forum ff)
-	{
-		if (ff == null)
-		{
+	public void addForum(Forum ff) {
+		if (ff == null) {
 			return;
 		}
 		
 		_table.add(ff);
 		
-		if (ff.getID() > _lastid)
-		{
+		if (ff.getID() > _lastid) {
 			_lastid = ff.getID();
 		}
 	}
 	
 	@Override
-	public void parsecmd(String command, L2PcInstance activeChar)
-	{
+	public void parsecmd(String command, L2PcInstance activeChar) {
 	}
 	
 	/**
@@ -97,8 +86,7 @@ public class ForumsBBSManager extends BaseBBSManager
 	 * @param name the forum name
 	 * @return the forum by name
 	 */
-	public Forum getForumByName(String name)
-	{
+	public Forum getForumByName(String name) {
 		return _table.stream().filter(f -> f.getName().equals(name)).findFirst().orElse(null);
 	}
 	
@@ -111,8 +99,7 @@ public class ForumsBBSManager extends BaseBBSManager
 	 * @param oid the oid
 	 * @return the new forum
 	 */
-	public Forum createNewForum(String name, Forum parent, int type, int perm, int oid)
-	{
+	public Forum createNewForum(String name, Forum parent, int type, int perm, int oid) {
 		Forum forum = new Forum(name, parent, type, perm, oid);
 		forum.insertIntoDb();
 		return forum;
@@ -122,8 +109,7 @@ public class ForumsBBSManager extends BaseBBSManager
 	 * Gets the a new Id.
 	 * @return the a new Id
 	 */
-	public int getANewID()
-	{
+	public int getANewID() {
 		return ++_lastid;
 	}
 	
@@ -132,14 +118,12 @@ public class ForumsBBSManager extends BaseBBSManager
 	 * @param idf the the forum Id
 	 * @return the forum by Id
 	 */
-	public Forum getForumByID(int idf)
-	{
+	public Forum getForumByID(int idf) {
 		return _table.stream().filter(f -> f.getID() == idf).findFirst().orElse(null);
 	}
 	
 	@Override
-	public void parsewrite(String ar1, String ar2, String ar3, String ar4, String ar5, L2PcInstance activeChar)
-	{
+	public void parsewrite(String ar1, String ar2, String ar3, String ar4, String ar5, L2PcInstance activeChar) {
 		
 	}
 	
@@ -147,13 +131,11 @@ public class ForumsBBSManager extends BaseBBSManager
 	 * Gets the single instance of ForumsBBSManager.
 	 * @return single instance of ForumsBBSManager
 	 */
-	public static ForumsBBSManager getInstance()
-	{
+	public static ForumsBBSManager getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final ForumsBBSManager _instance = new ForumsBBSManager();
 	}
 }

File diff suppressed because it is too large
+ 23 - 53
src/main/java/com/l2jserver/gameserver/communitybbs/Manager/PostBBSManager.java


File diff suppressed because it is too large
+ 42 - 94
src/main/java/com/l2jserver/gameserver/communitybbs/Manager/TopicBBSManager.java


+ 3712 - 0
src/main/java/com/l2jserver/gameserver/config/Config.java

@@ -0,0 +1,3712 @@
+/*
+ * Copyright © 2004-2019 L2J Server
+ *
+ * This file is part of L2J Server.
+ *
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.config;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.math.BigInteger;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.InterfaceAddress;
+import java.net.NetworkInterface;
+import java.net.SocketException;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+import com.l2jserver.gameserver.GameServer;
+import com.l2jserver.gameserver.enums.IllegalActionPunishmentType;
+import com.l2jserver.gameserver.model.L2World;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+import com.l2jserver.gameserver.model.itemcontainer.Inventory;
+import com.l2jserver.gameserver.util.FloodProtectorConfig;
+import com.l2jserver.gameserver.util.IXmlReader;
+import com.l2jserver.gameserver.util.Util;
+import com.l2jserver.util.PropertiesParser;
+import com.l2jserver.util.StringUtil;
+
+/**
+ * This class loads all the game server related configurations from files.<br>
+ * The files are usually located in config folder in server root folder.<br>
+ * Each configuration has a default value (that should reflect retail behavior).
+ */
+public final class Config {
+	private static final Logger LOG = LoggerFactory.getLogger(Config.class);
+	
+	/**
+	 * Informs(logs) the scripts being loaded.<BR>
+	 * Apply only when executing script from files.<BR>
+	 */
+	public static final boolean VERBOSE_LOADING = false;
+	
+	// --------------------------------------------------
+	// Constants
+	// --------------------------------------------------
+	public static final String EOL = System.lineSeparator();
+	
+	// --------------------------------------------------
+	// L2J Property File Definitions
+	// --------------------------------------------------
+	public static final String CHARACTER_CONFIG_FILE = "./config/Character.properties";
+	public static final String FEATURE_CONFIG_FILE = "./config/Feature.properties";
+	public static final String FORTSIEGE_CONFIGURATION_FILE = "./config/FortSiege.properties";
+	public static final String GENERAL_CONFIG_FILE = "./config/General.properties";
+	public static final String HEXID_FILE = "./config/hexid.txt";
+	public static final String ID_CONFIG_FILE = "./config/IdFactory.properties";
+	public static final String L2JMOD_CONFIG_FILE = "./config/L2JMods.properties";
+	public static final String LOGIN_CONFIGURATION_FILE = "./config/LoginServer.properties";
+	public static final String NPC_CONFIG_FILE = "./config/NPC.properties";
+	public static final String PVP_CONFIG_FILE = "./config/PVP.properties";
+	public static final String RATES_CONFIG_FILE = "./config/Rates.properties";
+	public static final String CONFIGURATION_FILE = "./config/Server.properties";
+	public static final String IP_CONFIG_FILE = "./config/ipconfig.xml";
+	public static final String SIEGE_CONFIGURATION_FILE = "./config/Siege.properties";
+	public static final String TW_CONFIGURATION_FILE = "./config/TerritoryWar.properties";
+	public static final String TELNET_FILE = "./config/Telnet.properties";
+	public static final String FLOOD_PROTECTOR_FILE = "./config/FloodProtector.properties";
+	public static final String MMO_CONFIG_FILE = "./config/MMO.properties";
+	public static final String OLYMPIAD_CONFIG_FILE = "./config/Olympiad.properties";
+	public static final String GRANDBOSS_CONFIG_FILE = "./config/GrandBoss.properties";
+	public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.properties";
+	public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt";
+	public static final String EMAIL_CONFIG_FILE = "./config/Email.properties";
+	public static final String CH_SIEGE_FILE = "./config/ConquerableHallSiege.properties";
+	public static final String GEODATA_FILE = "./config/GeoData.properties";
+	// --------------------------------------------------
+	// L2J Variable Definitions
+	// --------------------------------------------------
+	public static boolean ALT_GAME_DELEVEL;
+	public static boolean DECREASE_SKILL_LEVEL;
+	public static double ALT_WEIGHT_LIMIT;
+	public static int RUN_SPD_BOOST;
+	public static int DEATH_PENALTY_CHANCE;
+	public static double RESPAWN_RESTORE_CP;
+	public static double RESPAWN_RESTORE_HP;
+	public static double RESPAWN_RESTORE_MP;
+	public static boolean ENABLE_MODIFY_SKILL_DURATION;
+	public static Map<Integer, Integer> SKILL_DURATION_LIST;
+	public static boolean ENABLE_MODIFY_SKILL_REUSE;
+	public static Map<Integer, Integer> SKILL_REUSE_LIST;
+	public static boolean AUTO_LEARN_SKILLS;
+	public static boolean AUTO_LEARN_FS_SKILLS;
+	public static boolean AUTO_LOOT_HERBS;
+	public static byte BUFFS_MAX_AMOUNT;
+	public static byte TRIGGERED_BUFFS_MAX_AMOUNT;
+	public static byte DANCES_MAX_AMOUNT;
+	public static boolean DANCE_CANCEL_BUFF;
+	public static boolean DANCE_CONSUME_ADDITIONAL_MP;
+	public static boolean ALT_STORE_DANCES;
+	public static boolean AUTO_LEARN_DIVINE_INSPIRATION;
+	public static boolean ALT_GAME_CANCEL_BOW;
+	public static boolean ALT_GAME_CANCEL_CAST;
+	public static boolean ALT_GAME_MAGICFAILURES;
+	public static int PLAYER_FAKEDEATH_UP_PROTECTION;
+	public static boolean STORE_SKILL_COOLTIME;
+	public static boolean SUBCLASS_STORE_SKILL_COOLTIME;
+	public static boolean SUMMON_STORE_SKILL_COOLTIME;
+	public static boolean ALT_GAME_SHIELD_BLOCKS;
+	public static int ALT_PERFECT_SHLD_BLOCK;
+	public static long EFFECT_TICK_RATIO;
+	public static boolean ALLOW_CLASS_MASTERS;
+	public static ClassMasterSettings CLASS_MASTER_SETTINGS;
+	public static boolean ALLOW_ENTIRE_TREE;
+	public static boolean ALTERNATE_CLASS_MASTER;
+	public static boolean LIFE_CRYSTAL_NEEDED;
+	public static boolean ES_SP_BOOK_NEEDED;
+	public static boolean DIVINE_SP_BOOK_NEEDED;
+	public static boolean ALT_GAME_SKILL_LEARN;
+	public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
+	public static boolean ALT_GAME_SUBCLASS_EVERYWHERE;
+	public static boolean ALLOW_TRANSFORM_WITHOUT_QUEST;
+	public static int FEE_DELETE_TRANSFER_SKILLS;
+	public static int FEE_DELETE_SUBCLASS_SKILLS;
+	public static boolean RESTORE_SERVITOR_ON_RECONNECT;
+	public static boolean RESTORE_PET_ON_RECONNECT;
+	public static double MAX_BONUS_EXP;
+	public static double MAX_BONUS_SP;
+	public static int MAX_RUN_SPEED;
+	public static int MAX_PCRIT_RATE;
+	public static int MAX_MCRIT_RATE;
+	public static int MAX_PATK_SPEED;
+	public static int MAX_MATK_SPEED;
+	public static int MAX_EVASION;
+	public static int MIN_ABNORMAL_STATE_SUCCESS_RATE;
+	public static int MAX_ABNORMAL_STATE_SUCCESS_RATE;
+	public static int MAX_PLAYER_LEVEL;
+	public static int MAX_PET_LEVEL;
+	public static byte MAX_SUBCLASS;
+	public static int BASE_SUBCLASS_LEVEL;
+	public static int MAX_SUBCLASS_LEVEL;
+	public static int MAX_PVTSTORESELL_SLOTS_DWARF;
+	public static int MAX_PVTSTORESELL_SLOTS_OTHER;
+	public static int MAX_PVTSTOREBUY_SLOTS_DWARF;
+	public static int MAX_PVTSTOREBUY_SLOTS_OTHER;
+	public static int INVENTORY_MAXIMUM_NO_DWARF;
+	public static int INVENTORY_MAXIMUM_DWARF;
+	public static int INVENTORY_MAXIMUM_GM;
+	public static int INVENTORY_MAXIMUM_QUEST_ITEMS;
+	public static int WAREHOUSE_SLOTS_DWARF;
+	public static int WAREHOUSE_SLOTS_NO_DWARF;
+	public static int WAREHOUSE_SLOTS_CLAN;
+	public static int ALT_FREIGHT_SLOTS;
+	public static int ALT_FREIGHT_PRICE;
+	public static boolean ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE;
+	public static boolean ALT_GAME_KARMA_PLAYER_CAN_SHOP;
+	public static boolean ALT_GAME_KARMA_PLAYER_CAN_TELEPORT;
+	public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_GK;
+	public static boolean ALT_GAME_KARMA_PLAYER_CAN_TRADE;
+	public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE;
+	public static int MAX_PERSONAL_FAME_POINTS;
+	public static int FORTRESS_ZONE_FAME_TASK_FREQUENCY;
+	public static int FORTRESS_ZONE_FAME_AQUIRE_POINTS;
+	public static int CASTLE_ZONE_FAME_TASK_FREQUENCY;
+	public static int CASTLE_ZONE_FAME_AQUIRE_POINTS;
+	public static boolean FAME_FOR_DEAD_PLAYERS;
+	public static boolean IS_CRAFTING_ENABLED;
+	public static boolean CRAFT_MASTERWORK;
+	public static int DWARF_RECIPE_LIMIT;
+	public static int COMMON_RECIPE_LIMIT;
+	public static boolean ALT_GAME_CREATION;
+	public static double ALT_GAME_CREATION_SPEED;
+	public static double ALT_GAME_CREATION_XP_RATE;
+	public static double ALT_GAME_CREATION_RARE_XPSP_RATE;
+	public static double ALT_GAME_CREATION_SP_RATE;
+	public static boolean ALT_BLACKSMITH_USE_RECIPES;
+	public static int ALT_CLAN_LEADER_DATE_CHANGE;
+	public static String ALT_CLAN_LEADER_HOUR_CHANGE;
+	public static boolean ALT_CLAN_LEADER_INSTANT_ACTIVATION;
+	public static int ALT_CLAN_JOIN_DAYS;
+	public static int ALT_CLAN_CREATE_DAYS;
+	public static int ALT_CLAN_DISSOLVE_DAYS;
+	public static int ALT_ALLY_JOIN_DAYS_WHEN_LEAVED;
+	public static int ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED;
+	public static int ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED;
+	public static int ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED;
+	public static int ALT_MAX_NUM_OF_CLANS_IN_ALLY;
+	public static int ALT_CLAN_MEMBERS_FOR_WAR;
+	public static boolean ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH;
+	public static boolean REMOVE_CASTLE_CIRCLETS;
+	public static int ALT_PARTY_RANGE;
+	public static int ALT_PARTY_RANGE2;
+	public static boolean ALT_LEAVE_PARTY_LEADER;
+	public static boolean INITIAL_EQUIPMENT_EVENT;
+	public static long STARTING_ADENA;
+	public static int STARTING_LEVEL;
+	public static int STARTING_SP;
+	public static long MAX_ADENA;
+	public static boolean AUTO_LOOT;
+	public static boolean AUTO_LOOT_RAIDS;
+	public static int LOOT_RAIDS_PRIVILEGE_INTERVAL;
+	public static int LOOT_RAIDS_PRIVILEGE_CC_SIZE;
+	public static int UNSTUCK_INTERVAL;
+	public static int TELEPORT_WATCHDOG_TIMEOUT;
+	public static int PLAYER_SPAWN_PROTECTION;
+	public static List<Integer> SPAWN_PROTECTION_ALLOWED_ITEMS;
+	public static int PLAYER_TELEPORT_PROTECTION;
+	public static boolean RANDOM_RESPAWN_IN_TOWN_ENABLED;
+	public static boolean OFFSET_ON_TELEPORT_ENABLED;
+	public static int MAX_OFFSET_ON_TELEPORT;
+	public static boolean PETITIONING_ALLOWED;
+	public static int MAX_PETITIONS_PER_PLAYER;
+	public static int MAX_PETITIONS_PENDING;
+	public static boolean ALT_GAME_FREE_TELEPORT;
+	public static int DELETE_DAYS;
+	public static float ALT_GAME_EXPONENT_XP;
+	public static float ALT_GAME_EXPONENT_SP;
+	public static String PARTY_XP_CUTOFF_METHOD;
+	public static double PARTY_XP_CUTOFF_PERCENT;
+	public static int PARTY_XP_CUTOFF_LEVEL;
+	public static int[][] PARTY_XP_CUTOFF_GAPS;
+	public static int[] PARTY_XP_CUTOFF_GAP_PERCENTS;
+	public static boolean DISABLE_TUTORIAL;
+	public static boolean EXPERTISE_PENALTY;
+	public static boolean STORE_RECIPE_SHOPLIST;
+	public static boolean STORE_UI_SETTINGS;
+	public static Set<String> FORBIDDEN_NAMES;
+	public static boolean SILENCE_MODE_EXCLUDE;
+	public static boolean ALT_VALIDATE_TRIGGER_SKILLS;
+	
+	// --------------------------------------------------
+	// ClanHall Settings
+	// --------------------------------------------------
+	public static long CH_TELE_FEE_RATIO;
+	public static int CH_TELE1_FEE;
+	public static int CH_TELE2_FEE;
+	public static long CH_ITEM_FEE_RATIO;
+	public static int CH_ITEM1_FEE;
+	public static int CH_ITEM2_FEE;
+	public static int CH_ITEM3_FEE;
+	public static long CH_MPREG_FEE_RATIO;
+	public static int CH_MPREG1_FEE;
+	public static int CH_MPREG2_FEE;
+	public static int CH_MPREG3_FEE;
+	public static int CH_MPREG4_FEE;
+	public static int CH_MPREG5_FEE;
+	public static long CH_HPREG_FEE_RATIO;
+	public static int CH_HPREG1_FEE;
+	public static int CH_HPREG2_FEE;
+	public static int CH_HPREG3_FEE;
+	public static int CH_HPREG4_FEE;
+	public static int CH_HPREG5_FEE;
+	public static int CH_HPREG6_FEE;
+	public static int CH_HPREG7_FEE;
+	public static int CH_HPREG8_FEE;
+	public static int CH_HPREG9_FEE;
+	public static int CH_HPREG10_FEE;
+	public static int CH_HPREG11_FEE;
+	public static int CH_HPREG12_FEE;
+	public static int CH_HPREG13_FEE;
+	public static long CH_EXPREG_FEE_RATIO;
+	public static int CH_EXPREG1_FEE;
+	public static int CH_EXPREG2_FEE;
+	public static int CH_EXPREG3_FEE;
+	public static int CH_EXPREG4_FEE;
+	public static int CH_EXPREG5_FEE;
+	public static int CH_EXPREG6_FEE;
+	public static int CH_EXPREG7_FEE;
+	public static long CH_SUPPORT_FEE_RATIO;
+	public static int CH_SUPPORT1_FEE;
+	public static int CH_SUPPORT2_FEE;
+	public static int CH_SUPPORT3_FEE;
+	public static int CH_SUPPORT4_FEE;
+	public static int CH_SUPPORT5_FEE;
+	public static int CH_SUPPORT6_FEE;
+	public static int CH_SUPPORT7_FEE;
+	public static int CH_SUPPORT8_FEE;
+	public static long CH_CURTAIN_FEE_RATIO;
+	public static int CH_CURTAIN1_FEE;
+	public static int CH_CURTAIN2_FEE;
+	public static long CH_FRONT_FEE_RATIO;
+	public static int CH_FRONT1_FEE;
+	public static int CH_FRONT2_FEE;
+	public static boolean CH_BUFF_FREE;
+	// --------------------------------------------------
+	// Castle Settings
+	// --------------------------------------------------
+	public static long CS_TELE_FEE_RATIO;
+	public static int CS_TELE1_FEE;
+	public static int CS_TELE2_FEE;
+	public static long CS_MPREG_FEE_RATIO;
+	public static int CS_MPREG1_FEE;
+	public static int CS_MPREG2_FEE;
+	public static long CS_HPREG_FEE_RATIO;
+	public static int CS_HPREG1_FEE;
+	public static int CS_HPREG2_FEE;
+	public static long CS_EXPREG_FEE_RATIO;
+	public static int CS_EXPREG1_FEE;
+	public static int CS_EXPREG2_FEE;
+	public static long CS_SUPPORT_FEE_RATIO;
+	public static int CS_SUPPORT1_FEE;
+	public static int CS_SUPPORT2_FEE;
+	public static List<Integer> SIEGE_HOUR_LIST;
+	public static int OUTER_DOOR_UPGRADE_PRICE2;
+	public static int OUTER_DOOR_UPGRADE_PRICE3;
+	public static int OUTER_DOOR_UPGRADE_PRICE5;
+	public static int INNER_DOOR_UPGRADE_PRICE2;
+	public static int INNER_DOOR_UPGRADE_PRICE3;
+	public static int INNER_DOOR_UPGRADE_PRICE5;
+	public static int WALL_UPGRADE_PRICE2;
+	public static int WALL_UPGRADE_PRICE3;
+	public static int WALL_UPGRADE_PRICE5;
+	public static int TRAP_UPGRADE_PRICE1;
+	public static int TRAP_UPGRADE_PRICE2;
+	public static int TRAP_UPGRADE_PRICE3;
+	public static int TRAP_UPGRADE_PRICE4;
+	
+	// --------------------------------------------------
+	// Fortress Settings
+	// --------------------------------------------------
+	public static long FS_TELE_FEE_RATIO;
+	public static int FS_TELE1_FEE;
+	public static int FS_TELE2_FEE;
+	public static long FS_MPREG_FEE_RATIO;
+	public static int FS_MPREG1_FEE;
+	public static int FS_MPREG2_FEE;
+	public static long FS_HPREG_FEE_RATIO;
+	public static int FS_HPREG1_FEE;
+	public static int FS_HPREG2_FEE;
+	public static long FS_EXPREG_FEE_RATIO;
+	public static int FS_EXPREG1_FEE;
+	public static int FS_EXPREG2_FEE;
+	public static long FS_SUPPORT_FEE_RATIO;
+	public static int FS_SUPPORT1_FEE;
+	public static int FS_SUPPORT2_FEE;
+	public static int FS_BLOOD_OATH_COUNT;
+	public static int FS_UPDATE_FRQ;
+	public static int FS_MAX_SUPPLY_LEVEL;
+	public static int FS_FEE_FOR_CASTLE;
+	public static int FS_MAX_OWN_TIME;
+	// --------------------------------------------------
+	// Feature Settings
+	// --------------------------------------------------
+	public static int TAKE_FORT_POINTS;
+	public static int LOOSE_FORT_POINTS;
+	public static int TAKE_CASTLE_POINTS;
+	public static int LOOSE_CASTLE_POINTS;
+	public static int CASTLE_DEFENDED_POINTS;
+	public static int FESTIVAL_WIN_POINTS;
+	public static int HERO_POINTS;
+	public static int ROYAL_GUARD_COST;
+	public static int KNIGHT_UNIT_COST;
+	public static int KNIGHT_REINFORCE_COST;
+	public static int BALLISTA_POINTS;
+	public static int BLOODALLIANCE_POINTS;
+	public static int BLOODOATH_POINTS;
+	public static int KNIGHTSEPAULETTE_POINTS;
+	public static int REPUTATION_SCORE_PER_KILL;
+	public static int JOIN_ACADEMY_MIN_REP_SCORE;
+	public static int JOIN_ACADEMY_MAX_REP_SCORE;
+	public static int RAID_RANKING_1ST;
+	public static int RAID_RANKING_2ND;
+	public static int RAID_RANKING_3RD;
+	public static int RAID_RANKING_4TH;
+	public static int RAID_RANKING_5TH;
+	public static int RAID_RANKING_6TH;
+	public static int RAID_RANKING_7TH;
+	public static int RAID_RANKING_8TH;
+	public static int RAID_RANKING_9TH;
+	public static int RAID_RANKING_10TH;
+	public static int RAID_RANKING_UP_TO_50TH;
+	public static int RAID_RANKING_UP_TO_100TH;
+	public static int CLAN_LEVEL_6_COST;
+	public static int CLAN_LEVEL_7_COST;
+	public static int CLAN_LEVEL_8_COST;
+	public static int CLAN_LEVEL_9_COST;
+	public static int CLAN_LEVEL_10_COST;
+	public static int CLAN_LEVEL_11_COST;
+	public static int CLAN_LEVEL_6_REQUIREMENT;
+	public static int CLAN_LEVEL_7_REQUIREMENT;
+	public static int CLAN_LEVEL_8_REQUIREMENT;
+	public static int CLAN_LEVEL_9_REQUIREMENT;
+	public static int CLAN_LEVEL_10_REQUIREMENT;
+	public static int CLAN_LEVEL_11_REQUIREMENT;
+	public static boolean ALLOW_WYVERN_ALWAYS;
+	public static boolean ALLOW_WYVERN_DURING_SIEGE;
+	
+	// --------------------------------------------------
+	// General Settings
+	// --------------------------------------------------
+	public static boolean EVERYBODY_HAS_ADMIN_RIGHTS;
+	public static boolean SERVER_LIST_BRACKET;
+	public static int SERVER_LIST_TYPE;
+	public static int SERVER_LIST_AGE;
+	public static boolean SERVER_GMONLY;
+	public static boolean GM_HERO_AURA;
+	public static boolean GM_STARTUP_INVULNERABLE;
+	public static boolean GM_STARTUP_INVISIBLE;
+	public static boolean GM_STARTUP_SILENCE;
+	public static boolean GM_STARTUP_AUTO_LIST;
+	public static boolean GM_STARTUP_DIET_MODE;
+	public static boolean GM_ITEM_RESTRICTION;
+	public static boolean GM_SKILL_RESTRICTION;
+	public static boolean GM_TRADE_RESTRICTED_ITEMS;
+	public static boolean GM_RESTART_FIGHTING;
+	public static boolean GM_ANNOUNCER_NAME;
+	public static boolean GM_CRITANNOUNCER_NAME;
+	public static boolean GM_GIVE_SPECIAL_SKILLS;
+	public static boolean GM_GIVE_SPECIAL_AURA_SKILLS;
+	public static boolean GAMEGUARD_ENFORCE;
+	public static boolean GAMEGUARD_PROHIBITACTION;
+	public static boolean LOG_CHAT;
+	public static boolean LOG_AUTO_ANNOUNCEMENTS;
+	public static boolean LOG_ITEMS;
+	public static boolean LOG_ITEMS_SMALL_LOG;
+	public static boolean LOG_ITEM_ENCHANTS;
+	public static boolean LOG_SKILL_ENCHANTS;
+	public static boolean GMAUDIT;
+	public static boolean SKILL_CHECK_ENABLE;
+	public static boolean SKILL_CHECK_REMOVE;
+	public static boolean SKILL_CHECK_GM;
+	public static boolean DEBUG;
+	public static boolean DEBUG_INSTANCES;
+	public static boolean HTML_ACTION_CACHE_DEBUG;
+	public static boolean PACKET_HANDLER_DEBUG;
+	public static boolean DEVELOPER;
+	public static boolean NO_HANDLERS;
+	public static boolean NO_QUESTS;
+	public static boolean ALT_DEV_NO_SPAWNS;
+	public static boolean ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS;
+	public static boolean ALT_DEV_SHOW_SCRIPTS_LOAD_IN_LOGS;
+	public static int THREAD_P_EFFECTS;
+	public static int THREAD_P_GENERAL;
+	public static int THREAD_E_EVENTS;
+	public static int GENERAL_PACKET_THREAD_CORE_SIZE;
+	public static int IO_PACKET_THREAD_CORE_SIZE;
+	public static int GENERAL_THREAD_CORE_SIZE;
+	public static int AI_MAX_THREAD;
+	public static int EVENT_MAX_THREAD;
+	public static int CLIENT_PACKET_QUEUE_SIZE;
+	public static int CLIENT_PACKET_QUEUE_MAX_BURST_SIZE;
+	public static int CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND;
+	public static int CLIENT_PACKET_QUEUE_MEASURE_INTERVAL;
+	public static int CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND;
+	public static int CLIENT_PACKET_QUEUE_MAX_FLOODS_PER_MIN;
+	public static int CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN;
+	public static int CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN;
+	public static int CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN;
+	public static boolean DEADLOCK_DETECTOR;
+	public static int DEADLOCK_CHECK_INTERVAL;
+	public static boolean RESTART_ON_DEADLOCK;
+	public static boolean ALLOW_DISCARDITEM;
+	public static int AUTODESTROY_ITEM_AFTER;
+	public static int HERB_AUTO_DESTROY_TIME;
+	public static List<Integer> LIST_PROTECTED_ITEMS;
+	public static boolean DATABASE_CLEAN_UP;
+	public static long CONNECTION_CLOSE_TIME;
+	public static int CHAR_STORE_INTERVAL;
+	public static boolean LAZY_ITEMS_UPDATE;
+	public static boolean UPDATE_ITEMS_ON_CHAR_STORE;
+	public static boolean DESTROY_DROPPED_PLAYER_ITEM;
+	public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM;
+	public static boolean SAVE_DROPPED_ITEM;
+	public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD;
+	public static int SAVE_DROPPED_ITEM_INTERVAL;
+	public static boolean CLEAR_DROPPED_ITEM_TABLE;
+	public static boolean AUTODELETE_INVALID_QUEST_DATA;
+	public static boolean PRECISE_DROP_CALCULATION;
+	public static boolean MULTIPLE_ITEM_DROP;
+	public static boolean FORCE_INVENTORY_UPDATE;
+	public static boolean LAZY_CACHE;
+	public static boolean CACHE_CHAR_NAMES;
+	public static int MIN_NPC_ANIMATION;
+	public static int MAX_NPC_ANIMATION;
+	public static int MIN_MONSTER_ANIMATION;
+	public static int MAX_MONSTER_ANIMATION;
+	public static boolean ENABLE_FALLING_DAMAGE;
+	public static boolean GRIDS_ALWAYS_ON;
+	public static int GRID_NEIGHBOR_TURNON_TIME;
+	public static int GRID_NEIGHBOR_TURNOFF_TIME;
+	public static boolean MOVE_BASED_KNOWNLIST;
+	public static long KNOWNLIST_UPDATE_INTERVAL;
+	public static int PEACE_ZONE_MODE;
+	public static String DEFAULT_GLOBAL_CHAT;
+	public static String DEFAULT_TRADE_CHAT;
+	public static boolean ALLOW_WAREHOUSE;
+	public static boolean WAREHOUSE_CACHE;
+	public static int WAREHOUSE_CACHE_TIME;
+	public static boolean ALLOW_REFUND;
+	public static boolean ALLOW_MAIL;
+	public static boolean ALLOW_ATTACHMENTS;
+	public static boolean ALLOW_WEAR;
+	public static int WEAR_DELAY;
+	public static int WEAR_PRICE;
+	public static int INSTANCE_FINISH_TIME;
+	public static boolean RESTORE_PLAYER_INSTANCE;
+	public static boolean ALLOW_SUMMON_IN_INSTANCE;
+	public static int EJECT_DEAD_PLAYER_TIME;
+	public static boolean ALLOW_LOTTERY;
+	public static boolean ALLOW_RACE;
+	public static boolean ALLOW_WATER;
+	public static boolean ALLOW_RENTPET;
+	public static boolean ALLOWFISHING;
+	public static boolean ALLOW_BOAT;
+	public static int BOAT_BROADCAST_RADIUS;
+	public static boolean ALLOW_CURSED_WEAPONS;
+	public static boolean ALLOW_MANOR;
+	public static boolean ALLOW_PET_WALKERS;
+	public static boolean SERVER_NEWS;
+	public static boolean ENABLE_COMMUNITY_BOARD;
+	public static String BBS_DEFAULT;
+	public static boolean USE_SAY_FILTER;
+	public static String CHAT_FILTER_CHARS;
+	public static int[] BAN_CHAT_CHANNELS;
+	public static int ALT_OLY_START_TIME;
+	public static int ALT_OLY_MIN;
+	public static int ALT_OLY_MAX_BUFFS;
+	public static long ALT_OLY_CPERIOD;
+	public static long ALT_OLY_BATTLE;
+	public static long ALT_OLY_WPERIOD;
+	public static long ALT_OLY_VPERIOD;
+	public static int ALT_OLY_START_POINTS;
+	public static int ALT_OLY_WEEKLY_POINTS;
+	public static int ALT_OLY_CLASSED;
+	public static int ALT_OLY_NONCLASSED;
+	public static int ALT_OLY_TEAMS;
+	public static int ALT_OLY_REG_DISPLAY;
+	public static int[][] ALT_OLY_CLASSED_REWARD;
+	public static int[][] ALT_OLY_NONCLASSED_REWARD;
+	public static int[][] ALT_OLY_TEAM_REWARD;
+	public static int ALT_OLY_COMP_RITEM;
+	public static int ALT_OLY_MIN_MATCHES;
+	public static int ALT_OLY_GP_PER_POINT;
+	public static int ALT_OLY_HERO_POINTS;
+	public static int ALT_OLY_RANK1_POINTS;
+	public static int ALT_OLY_RANK2_POINTS;
+	public static int ALT_OLY_RANK3_POINTS;
+	public static int ALT_OLY_RANK4_POINTS;
+	public static int ALT_OLY_RANK5_POINTS;
+	public static int ALT_OLY_MAX_POINTS;
+	public static int ALT_OLY_DIVIDER_CLASSED;
+	public static int ALT_OLY_DIVIDER_NON_CLASSED;
+	public static int ALT_OLY_MAX_WEEKLY_MATCHES;
+	public static int ALT_OLY_MAX_WEEKLY_MATCHES_NON_CLASSED;
+	public static int ALT_OLY_MAX_WEEKLY_MATCHES_CLASSED;
+	public static int ALT_OLY_MAX_WEEKLY_MATCHES_TEAM;
+	public static boolean ALT_OLY_LOG_FIGHTS;
+	public static boolean ALT_OLY_SHOW_MONTHLY_WINNERS;
+	public static boolean ALT_OLY_ANNOUNCE_GAMES;
+	public static List<Integer> LIST_OLY_RESTRICTED_ITEMS;
+	public static int ALT_OLY_ENCHANT_LIMIT;
+	public static int ALT_OLY_WAIT_TIME;
+	public static int ALT_MANOR_REFRESH_TIME;
+	public static int ALT_MANOR_REFRESH_MIN;
+	public static int ALT_MANOR_APPROVE_TIME;
+	public static int ALT_MANOR_APPROVE_MIN;
+	public static int ALT_MANOR_MAINTENANCE_MIN;
+	public static boolean ALT_MANOR_SAVE_ALL_ACTIONS;
+	public static int ALT_MANOR_SAVE_PERIOD_RATE;
+	public static long ALT_LOTTERY_PRIZE;
+	public static long ALT_LOTTERY_TICKET_PRICE;
+	public static float ALT_LOTTERY_5_NUMBER_RATE;
+	public static float ALT_LOTTERY_4_NUMBER_RATE;
+	public static float ALT_LOTTERY_3_NUMBER_RATE;
+	public static long ALT_LOTTERY_2_AND_1_NUMBER_PRIZE;
+	public static boolean ALT_ITEM_AUCTION_ENABLED;
+	public static int ALT_ITEM_AUCTION_EXPIRED_AFTER;
+	public static long ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID;
+	public static int FS_TIME_ATTACK;
+	public static int FS_TIME_COOLDOWN;
+	public static int FS_TIME_ENTRY;
+	public static int FS_TIME_WARMUP;
+	public static int FS_PARTY_MEMBER_COUNT;
+	public static int RIFT_MIN_PARTY_SIZE;
+	public static int RIFT_SPAWN_DELAY;
+	public static int RIFT_MAX_JUMPS;
+	public static int RIFT_AUTO_JUMPS_TIME_MIN;
+	public static int RIFT_AUTO_JUMPS_TIME_MAX;
+	public static float RIFT_BOSS_ROOM_TIME_MUTIPLY;
+	public static int RIFT_ENTER_COST_RECRUIT;
+	public static int RIFT_ENTER_COST_SOLDIER;
+	public static int RIFT_ENTER_COST_OFFICER;
+	public static int RIFT_ENTER_COST_CAPTAIN;
+	public static int RIFT_ENTER_COST_COMMANDER;
+	public static int RIFT_ENTER_COST_HERO;
+	public static IllegalActionPunishmentType DEFAULT_PUNISH;
+	public static int DEFAULT_PUNISH_PARAM;
+	public static boolean ONLY_GM_ITEMS_FREE;
+	public static boolean JAIL_IS_PVP;
+	public static boolean JAIL_DISABLE_CHAT;
+	public static boolean JAIL_DISABLE_TRANSACTION;
+	public static boolean CUSTOM_SPAWNLIST_TABLE;
+	public static boolean SAVE_GMSPAWN_ON_CUSTOM;
+	public static boolean CUSTOM_NPC_DATA;
+	public static boolean CUSTOM_TELEPORT_TABLE;
+	public static boolean CUSTOM_NPCBUFFER_TABLES;
+	public static boolean CUSTOM_SKILLS_LOAD;
+	public static boolean CUSTOM_ITEMS_LOAD;
+	public static boolean CUSTOM_MULTISELL_LOAD;
+	public static boolean CUSTOM_BUYLIST_LOAD;
+	public static int ALT_BIRTHDAY_GIFT;
+	public static String ALT_BIRTHDAY_MAIL_SUBJECT;
+	public static String ALT_BIRTHDAY_MAIL_TEXT;
+	public static boolean ENABLE_BLOCK_CHECKER_EVENT;
+	public static int MIN_BLOCK_CHECKER_TEAM_MEMBERS;
+	public static boolean HBCE_FAIR_PLAY;
+	public static boolean HELLBOUND_WITHOUT_QUEST;
+	public static int PLAYER_MOVEMENT_BLOCK_TIME;
+	public static int NORMAL_ENCHANT_COST_MULTIPLIER;
+	public static int SAFE_ENCHANT_COST_MULTIPLIER;
+	public static boolean BOTREPORT_ENABLE;
+	public static String[] BOTREPORT_RESETPOINT_HOUR;
+	public static long BOTREPORT_REPORT_DELAY;
+	public static boolean BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS;
+	
+	// --------------------------------------------------
+	// FloodProtector Settings
+	// --------------------------------------------------
+	public static FloodProtectorConfig FLOOD_PROTECTOR_USE_ITEM;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_ROLL_DICE;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_FIREWORK;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_ITEM_PET_SUMMON;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_HERO_VOICE;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_GLOBAL_CHAT;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_SUBCLASS;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_DROP_ITEM;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_SERVER_BYPASS;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_MULTISELL;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_TRANSACTION;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_MANUFACTURE;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_MANOR;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_SENDMAIL;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_CHARACTER_SELECT;
+	public static FloodProtectorConfig FLOOD_PROTECTOR_ITEM_AUCTION;
+	// --------------------------------------------------
+	// L2JMods Settings
+	// --------------------------------------------------
+	public static boolean L2JMOD_CHAMPION_ENABLE;
+	public static boolean L2JMOD_CHAMPION_PASSIVE;
+	public static int L2JMOD_CHAMPION_FREQUENCY;
+	public static String L2JMOD_CHAMP_TITLE;
+	public static int L2JMOD_CHAMP_MIN_LVL;
+	public static int L2JMOD_CHAMP_MAX_LVL;
+	public static int L2JMOD_CHAMPION_HP;
+	public static float L2JMOD_CHAMPION_REWARDS_EXP_SP;
+	public static float L2JMOD_CHAMPION_REWARDS_CHANCE;
+	public static float L2JMOD_CHAMPION_REWARDS_AMOUNT;
+	public static float L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE;
+	public static float L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT;
+	public static float L2JMOD_CHAMPION_HP_REGEN;
+	public static float L2JMOD_CHAMPION_ATK;
+	public static float L2JMOD_CHAMPION_SPD_ATK;
+	public static int L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE;
+	public static int L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE;
+	public static int L2JMOD_CHAMPION_REWARD_ID;
+	public static int L2JMOD_CHAMPION_REWARD_QTY;
+	public static boolean L2JMOD_CHAMPION_ENABLE_VITALITY;
+	public static boolean L2JMOD_CHAMPION_ENABLE_IN_INSTANCES;
+	public static boolean TVT_EVENT_ENABLED;
+	public static boolean TVT_EVENT_IN_INSTANCE;
+	public static String TVT_EVENT_INSTANCE_FILE;
+	public static String[] TVT_EVENT_INTERVAL;
+	public static int TVT_EVENT_PARTICIPATION_TIME;
+	public static int TVT_EVENT_RUNNING_TIME;
+	public static int TVT_EVENT_PARTICIPATION_NPC_ID;
+	public static int[] TVT_EVENT_PARTICIPATION_NPC_COORDINATES = new int[4];
+	public static int[] TVT_EVENT_PARTICIPATION_FEE = new int[2];
+	public static int TVT_EVENT_MIN_PLAYERS_IN_TEAMS;
+	public static int TVT_EVENT_MAX_PLAYERS_IN_TEAMS;
+	public static int TVT_EVENT_RESPAWN_TELEPORT_DELAY;
+	public static int TVT_EVENT_START_LEAVE_TELEPORT_DELAY;
+	public static String TVT_EVENT_TEAM_1_NAME;
+	public static int[] TVT_EVENT_TEAM_1_COORDINATES = new int[3];
+	public static String TVT_EVENT_TEAM_2_NAME;
+	public static int[] TVT_EVENT_TEAM_2_COORDINATES = new int[3];
+	public static List<int[]> TVT_EVENT_REWARDS;
+	public static boolean TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED;
+	public static boolean TVT_EVENT_SCROLL_ALLOWED;
+	public static boolean TVT_EVENT_POTIONS_ALLOWED;
+	public static boolean TVT_EVENT_SUMMON_BY_ITEM_ALLOWED;
+	public static List<Integer> TVT_DOORS_IDS_TO_OPEN;
+	public static List<Integer> TVT_DOORS_IDS_TO_CLOSE;
+	public static boolean TVT_REWARD_TEAM_TIE;
+	public static byte TVT_EVENT_MIN_LVL;
+	public static byte TVT_EVENT_MAX_LVL;
+	public static int TVT_EVENT_EFFECTS_REMOVAL;
+	public static Map<Integer, Integer> TVT_EVENT_FIGHTER_BUFFS;
+	public static Map<Integer, Integer> TVT_EVENT_MAGE_BUFFS;
+	public static int TVT_EVENT_MAX_PARTICIPANTS_PER_IP;
+	public static boolean TVT_ALLOW_VOICED_COMMAND;
+	public static boolean L2JMOD_ALLOW_WEDDING;
+	public static int L2JMOD_WEDDING_PRICE;
+	public static boolean L2JMOD_WEDDING_PUNISH_INFIDELITY;
+	public static boolean L2JMOD_WEDDING_TELEPORT;
+	public static int L2JMOD_WEDDING_TELEPORT_PRICE;
+	public static int L2JMOD_WEDDING_TELEPORT_DURATION;
+	public static boolean L2JMOD_WEDDING_SAMESEX;
+	public static boolean L2JMOD_WEDDING_FORMALWEAR;
+	public static int L2JMOD_WEDDING_DIVORCE_COSTS;
+	public static boolean L2JMOD_HELLBOUND_STATUS;
+	public static boolean BANKING_SYSTEM_ENABLED;
+	public static int BANKING_SYSTEM_GOLDBARS;
+	public static int BANKING_SYSTEM_ADENA;
+	public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_CLAN;
+	public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE;
+	public static boolean OFFLINE_TRADE_ENABLE;
+	public static boolean OFFLINE_CRAFT_ENABLE;
+	public static boolean OFFLINE_MODE_IN_PEACE_ZONE;
+	public static boolean OFFLINE_MODE_NO_DAMAGE;
+	public static boolean RESTORE_OFFLINERS;
+	public static int OFFLINE_MAX_DAYS;
+	public static boolean OFFLINE_DISCONNECT_FINISHED;
+	public static boolean OFFLINE_SET_NAME_COLOR;
+	public static int OFFLINE_NAME_COLOR;
+	public static boolean OFFLINE_FAME;
+	public static boolean L2JMOD_ENABLE_MANA_POTIONS_SUPPORT;
+	public static boolean L2JMOD_DISPLAY_SERVER_TIME;
+	public static boolean WELCOME_MESSAGE_ENABLED;
+	public static String WELCOME_MESSAGE_TEXT;
+	public static int WELCOME_MESSAGE_TIME;
+	public static boolean L2JMOD_ANTIFEED_ENABLE;
+	public static boolean L2JMOD_ANTIFEED_DUALBOX;
+	public static boolean L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX;
+	public static int L2JMOD_ANTIFEED_INTERVAL;
+	public static boolean ANNOUNCE_PK_PVP;
+	public static boolean ANNOUNCE_PK_PVP_NORMAL_MESSAGE;
+	public static String ANNOUNCE_PK_MSG;
+	public static String ANNOUNCE_PVP_MSG;
+	public static boolean L2JMOD_CHAT_ADMIN;
+	public static boolean L2JMOD_MULTILANG_ENABLE;
+	public static List<String> L2JMOD_MULTILANG_ALLOWED = new ArrayList<>();
+	public static String L2JMOD_MULTILANG_DEFAULT;
+	public static boolean L2JMOD_MULTILANG_VOICED_ALLOW;
+	public static boolean L2JMOD_MULTILANG_SM_ENABLE;
+	public static List<String> L2JMOD_MULTILANG_SM_ALLOWED = new ArrayList<>();
+	public static boolean L2JMOD_MULTILANG_NS_ENABLE;
+	public static List<String> L2JMOD_MULTILANG_NS_ALLOWED = new ArrayList<>();
+	public static boolean L2WALKER_PROTECTION;
+	public static boolean L2JMOD_DEBUG_VOICE_COMMAND;
+	public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
+	public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
+	public static int L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP;
+	public static Map<Integer, Integer> L2JMOD_DUALBOX_CHECK_WHITELIST;
+	public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD;
+	// --------------------------------------------------
+	// NPC Settings
+	// --------------------------------------------------
+	public static boolean ANNOUNCE_MAMMON_SPAWN;
+	public static boolean ALT_MOB_AGRO_IN_PEACEZONE;
+	public static boolean ALT_ATTACKABLE_NPCS;
+	public static boolean ALT_GAME_VIEWNPC;
+	public static int MAX_DRIFT_RANGE;
+	public static boolean DEEPBLUE_DROP_RULES;
+	public static boolean DEEPBLUE_DROP_RULES_RAID;
+	public static boolean SHOW_NPC_LVL;
+	public static boolean SHOW_CREST_WITHOUT_QUEST;
+	public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
+	public static int MIN_NPC_LVL_DMG_PENALTY;
+	public static Map<Integer, Float> NPC_DMG_PENALTY;
+	public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY;
+	public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY;
+	public static int MIN_NPC_LVL_MAGIC_PENALTY;
+	public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY;
+	public static int DECAY_TIME_TASK;
+	public static int DEFAULT_CORPSE_TIME;
+	public static int SPOILED_CORPSE_EXTEND_TIME;
+	public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
+	public static boolean GUARD_ATTACK_AGGRO_MOB;
+	public static boolean ALLOW_WYVERN_UPGRADER;
+	public static List<Integer> LIST_PET_RENT_NPC;
+	public static double RAID_HP_REGEN_MULTIPLIER;
+	public static double RAID_MP_REGEN_MULTIPLIER;
+	public static double RAID_PDEFENCE_MULTIPLIER;
+	public static double RAID_MDEFENCE_MULTIPLIER;
+	public static double RAID_PATTACK_MULTIPLIER;
+	public static double RAID_MATTACK_MULTIPLIER;
+	public static double RAID_MINION_RESPAWN_TIMER;
+	public static Map<Integer, Integer> MINIONS_RESPAWN_TIME;
+	public static float RAID_MIN_RESPAWN_MULTIPLIER;
+	public static float RAID_MAX_RESPAWN_MULTIPLIER;
+	public static boolean RAID_DISABLE_CURSE;
+	public static int RAID_CHAOS_TIME;
+	public static int GRAND_CHAOS_TIME;
+	public static int MINION_CHAOS_TIME;
+	public static int INVENTORY_MAXIMUM_PET;
+	public static double PET_HP_REGEN_MULTIPLIER;
+	public static double PET_MP_REGEN_MULTIPLIER;
+	public static int DROP_ADENA_MIN_LEVEL_DIFFERENCE;
+	public static int DROP_ADENA_MAX_LEVEL_DIFFERENCE;
+	public static double DROP_ADENA_MIN_LEVEL_GAP_CHANCE;
+	public static int DROP_ITEM_MIN_LEVEL_DIFFERENCE;
+	public static int DROP_ITEM_MAX_LEVEL_DIFFERENCE;
+	public static double DROP_ITEM_MIN_LEVEL_GAP_CHANCE;
+	
+	// --------------------------------------------------
+	// PvP Settings
+	// --------------------------------------------------
+	public static boolean KARMA_DROP_GM;
+	public static boolean KARMA_AWARD_PK_KILL;
+	public static int KARMA_PK_LIMIT;
+	public static String KARMA_NONDROPPABLE_PET_ITEMS;
+	public static String KARMA_NONDROPPABLE_ITEMS;
+	public static int[] KARMA_LIST_NONDROPPABLE_PET_ITEMS;
+	public static int[] KARMA_LIST_NONDROPPABLE_ITEMS;
+	
+	// --------------------------------------------------
+	// Rate Settings
+	// --------------------------------------------------
+	public static float RATE_XP;
+	public static float RATE_SP;
+	public static float RATE_PARTY_XP;
+	public static float RATE_PARTY_SP;
+	public static float RATE_HB_TRUST_INCREASE;
+	public static float RATE_HB_TRUST_DECREASE;
+	public static float RATE_EXTRACTABLE;
+	public static int RATE_DROP_MANOR;
+	public static float RATE_QUEST_DROP;
+	public static float RATE_QUEST_REWARD;
+	public static float RATE_QUEST_REWARD_XP;
+	public static float RATE_QUEST_REWARD_SP;
+	public static float RATE_QUEST_REWARD_ADENA;
+	public static boolean RATE_QUEST_REWARD_USE_MULTIPLIERS;
+	public static float RATE_QUEST_REWARD_POTION;
+	public static float RATE_QUEST_REWARD_SCROLL;
+	public static float RATE_QUEST_REWARD_RECIPE;
+	public static float RATE_QUEST_REWARD_MATERIAL;
+	public static float RATE_DEATH_DROP_AMOUNT_MULTIPLIER;
+	public static float RATE_CORPSE_DROP_AMOUNT_MULTIPLIER;
+	public static float RATE_HERB_DROP_AMOUNT_MULTIPLIER;
+	public static float RATE_RAID_DROP_AMOUNT_MULTIPLIER;
+	public static float RATE_DEATH_DROP_CHANCE_MULTIPLIER;
+	public static float RATE_CORPSE_DROP_CHANCE_MULTIPLIER;
+	public static float RATE_HERB_DROP_CHANCE_MULTIPLIER;
+	public static float RATE_RAID_DROP_CHANCE_MULTIPLIER;
+	public static Map<Integer, Float> RATE_DROP_AMOUNT_MULTIPLIER;
+	public static Map<Integer, Float> RATE_DROP_CHANCE_MULTIPLIER;
+	public static float RATE_KARMA_LOST;
+	public static float RATE_KARMA_EXP_LOST;
+	public static float RATE_SIEGE_GUARDS_PRICE;
+	public static float RATE_DROP_COMMON_HERBS;
+	public static float RATE_DROP_HP_HERBS;
+	public static float RATE_DROP_MP_HERBS;
+	public static float RATE_DROP_SPECIAL_HERBS;
+	public static int PLAYER_DROP_LIMIT;
+	public static int PLAYER_RATE_DROP;
+	public static int PLAYER_RATE_DROP_ITEM;
+	public static int PLAYER_RATE_DROP_EQUIP;
+	public static int PLAYER_RATE_DROP_EQUIP_WEAPON;
+	public static float PET_XP_RATE;
+	public static int PET_FOOD_RATE;
+	public static float SINEATER_XP_RATE;
+	public static int KARMA_DROP_LIMIT;
+	public static int KARMA_RATE_DROP;
+	public static int KARMA_RATE_DROP_ITEM;
+	public static int KARMA_RATE_DROP_EQUIP;
+	public static int KARMA_RATE_DROP_EQUIP_WEAPON;
+	
+	// --------------------------------------------------
+	// Seven Signs Settings
+	// --------------------------------------------------
+	public static boolean ALT_GAME_CASTLE_DAWN;
+	public static boolean ALT_GAME_CASTLE_DUSK;
+	public static boolean ALT_GAME_REQUIRE_CLAN_CASTLE;
+	public static int ALT_FESTIVAL_MIN_PLAYER;
+	public static int ALT_MAXIMUM_PLAYER_CONTRIB;
+	public static long ALT_FESTIVAL_MANAGER_START;
+	public static long ALT_FESTIVAL_LENGTH;
+	public static long ALT_FESTIVAL_CYCLE_LENGTH;
+	public static long ALT_FESTIVAL_FIRST_SPAWN;
+	public static long ALT_FESTIVAL_FIRST_SWARM;
+	public static long ALT_FESTIVAL_SECOND_SPAWN;
+	public static long ALT_FESTIVAL_SECOND_SWARM;
+	public static long ALT_FESTIVAL_CHEST_SPAWN;
+	public static double ALT_SIEGE_DAWN_GATES_PDEF_MULT;
+	public static double ALT_SIEGE_DUSK_GATES_PDEF_MULT;
+	public static double ALT_SIEGE_DAWN_GATES_MDEF_MULT;
+	public static double ALT_SIEGE_DUSK_GATES_MDEF_MULT;
+	public static boolean ALT_STRICT_SEVENSIGNS;
+	public static boolean ALT_SEVENSIGNS_LAZY_UPDATE;
+	public static int SSQ_DAWN_TICKET_QUANTITY;
+	public static int SSQ_DAWN_TICKET_PRICE;
+	public static int SSQ_DAWN_TICKET_BUNDLE;
+	public static int SSQ_MANORS_AGREEMENT_ID;
+	public static int SSQ_JOIN_DAWN_ADENA_FEE;
+	
+	// --------------------------------------------------
+	// Server Settings
+	// --------------------------------------------------
+	public static boolean ENABLE_UPNP;
+	public static int PORT_GAME;
+	public static int PORT_LOGIN;
+	public static String LOGIN_BIND_ADDRESS;
+	public static int LOGIN_TRY_BEFORE_BAN;
+	public static int LOGIN_BLOCK_AFTER_BAN;
+	public static String GAMESERVER_HOSTNAME;
+	public static String DATABASE_ENGINE;
+	public static String DATABASE_DRIVER;
+	public static String DATABASE_URL;
+	public static String DATABASE_LOGIN;
+	public static String DATABASE_PASSWORD;
+	public static String DATABASE_CONNECTION_POOL;
+	public static int DATABASE_MAX_CONNECTIONS;
+	public static int DATABASE_MAX_IDLE_TIME;
+	public static int MAXIMUM_ONLINE_USERS;
+	public static Pattern PLAYER_NAME_TEMPLATE;
+	public static Pattern PET_NAME_TEMPLATE;
+	public static Pattern CLAN_NAME_TEMPLATE;
+	public static int MAX_CHARACTERS_NUMBER_PER_ACCOUNT;
+	public static File DATAPACK_ROOT;
+	public static boolean ACCEPT_ALTERNATE_ID;
+	public static int REQUEST_ID;
+	public static boolean RESERVE_HOST_ON_LOGIN = false;
+	public static List<Integer> PROTOCOL_LIST;
+	public static boolean LOGIN_SERVER_SCHEDULE_RESTART;
+	public static long LOGIN_SERVER_SCHEDULE_RESTART_TIME;
+	
+	// --------------------------------------------------
+	// MMO Settings
+	// --------------------------------------------------
+	public static int MMO_SELECTOR_SLEEP_TIME;
+	public static int MMO_MAX_SEND_PER_PASS;
+	public static int MMO_MAX_READ_PER_PASS;
+	public static int MMO_HELPER_BUFFER_COUNT;
+	public static boolean MMO_TCP_NODELAY;
+	
+	// --------------------------------------------------
+	// Vitality Settings
+	// --------------------------------------------------
+	public static boolean ENABLE_VITALITY;
+	public static boolean RECOVER_VITALITY_ON_RECONNECT;
+	public static boolean ENABLE_DROP_VITALITY_HERBS;
+	public static float RATE_VITALITY_LEVEL_1;
+	public static float RATE_VITALITY_LEVEL_2;
+	public static float RATE_VITALITY_LEVEL_3;
+	public static float RATE_VITALITY_LEVEL_4;
+	public static float RATE_DROP_VITALITY_HERBS;
+	public static float RATE_RECOVERY_VITALITY_PEACE_ZONE;
+	public static float RATE_VITALITY_LOST;
+	public static float RATE_VITALITY_GAIN;
+	public static float RATE_RECOVERY_ON_RECONNECT;
+	public static int STARTING_VITALITY_POINTS;
+	
+	// --------------------------------------------------
+	// No classification assigned to the following yet
+	// --------------------------------------------------
+	public static int MAX_ITEM_IN_PACKET;
+	public static boolean CHECK_KNOWN;
+	public static int GAME_SERVER_LOGIN_PORT;
+	public static String GAME_SERVER_LOGIN_HOST;
+	public static List<String> GAME_SERVER_SUBNETS;
+	public static List<String> GAME_SERVER_HOSTS;
+	public static int PVP_NORMAL_TIME;
+	public static int PVP_PVP_TIME;
+	
+	public static enum IdFactoryType {
+		Compaction,
+		BitSet,
+		Stack
+	}
+	
+	public static IdFactoryType IDFACTORY_TYPE;
+	public static boolean BAD_ID_CHECKING;
+	
+	public static double ENCHANT_CHANCE_ELEMENT_STONE;
+	public static double ENCHANT_CHANCE_ELEMENT_CRYSTAL;
+	public static double ENCHANT_CHANCE_ELEMENT_JEWEL;
+	public static double ENCHANT_CHANCE_ELEMENT_ENERGY;
+	public static int[] ENCHANT_BLACKLIST;
+	public static int AUGMENTATION_NG_SKILL_CHANCE;
+	public static int AUGMENTATION_NG_GLOW_CHANCE;
+	public static int AUGMENTATION_MID_SKILL_CHANCE;
+	public static int AUGMENTATION_MID_GLOW_CHANCE;
+	public static int AUGMENTATION_HIGH_SKILL_CHANCE;
+	public static int AUGMENTATION_HIGH_GLOW_CHANCE;
+	public static int AUGMENTATION_TOP_SKILL_CHANCE;
+	public static int AUGMENTATION_TOP_GLOW_CHANCE;
+	public static int AUGMENTATION_BASESTAT_CHANCE;
+	public static int AUGMENTATION_ACC_SKILL_CHANCE;
+	public static boolean RETAIL_LIKE_AUGMENTATION;
+	public static int[] RETAIL_LIKE_AUGMENTATION_NG_CHANCE;
+	public static int[] RETAIL_LIKE_AUGMENTATION_MID_CHANCE;
+	public static int[] RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE;
+	public static int[] RETAIL_LIKE_AUGMENTATION_TOP_CHANCE;
+	public static boolean RETAIL_LIKE_AUGMENTATION_ACCESSORY;
+	public static int[] AUGMENTATION_BLACKLIST;
+	public static boolean ALT_ALLOW_AUGMENT_PVP_ITEMS;
+	public static double HP_REGEN_MULTIPLIER;
+	public static double MP_REGEN_MULTIPLIER;
+	public static double CP_REGEN_MULTIPLIER;
+	public static boolean IS_TELNET_ENABLED;
+	public static boolean SHOW_LICENCE;
+	public static boolean ACCEPT_NEW_GAMESERVER;
+	public static int SERVER_ID;
+	public static byte[] HEX_ID;
+	public static boolean AUTO_CREATE_ACCOUNTS;
+	public static boolean FLOOD_PROTECTION;
+	public static int FAST_CONNECTION_LIMIT;
+	public static int NORMAL_CONNECTION_TIME;
+	public static int FAST_CONNECTION_TIME;
+	public static int MAX_CONNECTION_PER_IP;
+	
+	// GrandBoss Settings
+	
+	// Antharas
+	public static int ANTHARAS_WAIT_TIME;
+	public static int ANTHARAS_SPAWN_INTERVAL;
+	public static int ANTHARAS_SPAWN_RANDOM;
+	
+	// Valakas
+	public static int VALAKAS_WAIT_TIME;
+	public static int VALAKAS_SPAWN_INTERVAL;
+	public static int VALAKAS_SPAWN_RANDOM;
+	
+	// Baium
+	public static int BAIUM_SPAWN_INTERVAL;
+	public static int BAIUM_SPAWN_RANDOM;
+	
+	// Core
+	public static int CORE_SPAWN_INTERVAL;
+	public static int CORE_SPAWN_RANDOM;
+	
+	// Offen
+	public static int ORFEN_SPAWN_INTERVAL;
+	public static int ORFEN_SPAWN_RANDOM;
+	
+	// Queen Ant
+	public static int QUEEN_ANT_SPAWN_INTERVAL;
+	public static int QUEEN_ANT_SPAWN_RANDOM;
+	
+	// Beleth
+	public static int BELETH_MIN_PLAYERS;
+	public static int BELETH_SPAWN_INTERVAL;
+	public static int BELETH_SPAWN_RANDOM;
+	
+	// Gracia Seeds Settings
+	public static int SOD_TIAT_KILL_COUNT;
+	public static long SOD_STAGE_2_LENGTH;
+	
+	// chatfilter
+	public static List<String> FILTER_LIST;
+	
+	// Email
+	public static String EMAIL_SERVERINFO_NAME;
+	public static String EMAIL_SERVERINFO_ADDRESS;
+	public static boolean EMAIL_SYS_ENABLED;
+	public static String EMAIL_SYS_HOST;
+	public static int EMAIL_SYS_PORT;
+	public static boolean EMAIL_SYS_SMTP_AUTH;
+	public static String EMAIL_SYS_FACTORY;
+	public static boolean EMAIL_SYS_FACTORY_CALLBACK;
+	public static String EMAIL_SYS_USERNAME;
+	public static String EMAIL_SYS_PASSWORD;
+	public static String EMAIL_SYS_ADDRESS;
+	public static String EMAIL_SYS_SELECTQUERY;
+	public static String EMAIL_SYS_DBFIELD;
+	
+	// Conquerable Halls Settings
+	public static int CHS_CLAN_MINLEVEL;
+	public static int CHS_MAX_ATTACKERS;
+	public static int CHS_MAX_FLAGS_PER_CLAN;
+	public static boolean CHS_ENABLE_FAME;
+	public static int CHS_FAME_AMOUNT;
+	public static int CHS_FAME_FREQUENCY;
+	
+	// GeoData Settings
+	public static int PATHFINDING;
+	public static File PATHNODE_DIR;
+	public static String PATHFIND_BUFFERS;
+	public static float LOW_WEIGHT;
+	public static float MEDIUM_WEIGHT;
+	public static float HIGH_WEIGHT;
+	public static boolean ADVANCED_DIAGONAL_STRATEGY;
+	public static float DIAGONAL_WEIGHT;
+	public static int MAX_POSTFILTER_PASSES;
+	public static boolean DEBUG_PATH;
+	public static boolean FORCE_GEODATA;
+	public static int COORD_SYNCHRONIZE;
+	public static Path GEODATA_PATH;
+	public static boolean TRY_LOAD_UNSPECIFIED_REGIONS;
+	public static Map<String, Boolean> GEODATA_REGIONS;
+	
+	public static void load() {
+		FLOOD_PROTECTOR_USE_ITEM = new FloodProtectorConfig("UseItemFloodProtector");
+		FLOOD_PROTECTOR_ROLL_DICE = new FloodProtectorConfig("RollDiceFloodProtector");
+		FLOOD_PROTECTOR_FIREWORK = new FloodProtectorConfig("FireworkFloodProtector");
+		FLOOD_PROTECTOR_ITEM_PET_SUMMON = new FloodProtectorConfig("ItemPetSummonFloodProtector");
+		FLOOD_PROTECTOR_HERO_VOICE = new FloodProtectorConfig("HeroVoiceFloodProtector");
+		FLOOD_PROTECTOR_GLOBAL_CHAT = new FloodProtectorConfig("GlobalChatFloodProtector");
+		FLOOD_PROTECTOR_SUBCLASS = new FloodProtectorConfig("SubclassFloodProtector");
+		FLOOD_PROTECTOR_DROP_ITEM = new FloodProtectorConfig("DropItemFloodProtector");
+		FLOOD_PROTECTOR_SERVER_BYPASS = new FloodProtectorConfig("ServerBypassFloodProtector");
+		FLOOD_PROTECTOR_MULTISELL = new FloodProtectorConfig("MultiSellFloodProtector");
+		FLOOD_PROTECTOR_TRANSACTION = new FloodProtectorConfig("TransactionFloodProtector");
+		FLOOD_PROTECTOR_MANUFACTURE = new FloodProtectorConfig("ManufactureFloodProtector");
+		FLOOD_PROTECTOR_MANOR = new FloodProtectorConfig("ManorFloodProtector");
+		FLOOD_PROTECTOR_SENDMAIL = new FloodProtectorConfig("SendMailFloodProtector");
+		FLOOD_PROTECTOR_CHARACTER_SELECT = new FloodProtectorConfig("CharacterSelectFloodProtector");
+		FLOOD_PROTECTOR_ITEM_AUCTION = new FloodProtectorConfig("ItemAuctionFloodProtector");
+		
+		final PropertiesParser serverSettings = new PropertiesParser(CONFIGURATION_FILE);
+		
+		ENABLE_UPNP = serverSettings.getBoolean("EnableUPnP", true);
+		GAMESERVER_HOSTNAME = serverSettings.getString("GameserverHostname", "*");
+		PORT_GAME = serverSettings.getInt("GameserverPort", 7777);
+		
+		GAME_SERVER_LOGIN_PORT = serverSettings.getInt("LoginPort", 9014);
+		GAME_SERVER_LOGIN_HOST = serverSettings.getString("LoginHost", "127.0.0.1");
+		
+		REQUEST_ID = serverSettings.getInt("RequestServerID", 0);
+		ACCEPT_ALTERNATE_ID = serverSettings.getBoolean("AcceptAlternateID", true);
+		
+		DATABASE_ENGINE = serverSettings.getString("Database", "MySQL");
+		DATABASE_DRIVER = serverSettings.getString("Driver", "com.mysql.jdbc.Driver");
+		DATABASE_URL = serverSettings.getString("URL", "jdbc:mysql://localhost/l2jgs?useSSL=false&serverTimezone=UTC");
+		DATABASE_LOGIN = serverSettings.getString("Login", "root");
+		DATABASE_PASSWORD = serverSettings.getString("Password", "toor");
+		DATABASE_CONNECTION_POOL = serverSettings.getString("ConnectionPool", "HikariCP");
+		DATABASE_MAX_CONNECTIONS = serverSettings.getInt("MaximumDbConnections", 10);
+		DATABASE_MAX_IDLE_TIME = serverSettings.getInt("MaximumDbIdleTime", 0);
+		
+		try {
+			DATAPACK_ROOT = new File(serverSettings.getString("DatapackRoot", ".").replaceAll("\\\\", "/")).getCanonicalFile();
+		} catch (IOException e) {
+			LOG.warn("Error setting datapack root!", e);
+			DATAPACK_ROOT = new File(".");
+		}
+		
+		PLAYER_NAME_TEMPLATE = Pattern.compile(serverSettings.getString("PlayerNameTemplate", "[a-zA-Z0-9]*"));
+		PET_NAME_TEMPLATE = Pattern.compile(serverSettings.getString("PetNameTemplate", "[a-zA-Z0-9]*"));
+		CLAN_NAME_TEMPLATE = Pattern.compile(serverSettings.getString("ClanNameTemplate", "[a-zA-Z0-9]*"));
+		
+		MAX_CHARACTERS_NUMBER_PER_ACCOUNT = serverSettings.getInt("CharMaxNumber", 7);
+		MAXIMUM_ONLINE_USERS = serverSettings.getInt("MaximumOnlineUsers", 100);
+		
+		String[] protocols = serverSettings.getString("AllowedProtocolRevisions", "267;268;271;273").split(";");
+		PROTOCOL_LIST = new ArrayList<>(protocols.length);
+		for (String protocol : protocols) {
+			try {
+				PROTOCOL_LIST.add(Integer.parseInt(protocol.trim()));
+			} catch (NumberFormatException e) {
+				LOG.warn("Wrong config protocol version: {}, skipped.", protocol);
+			}
+		}
+		
+		// Hosts and Subnets
+		IPConfigData ipcd = new IPConfigData();
+		GAME_SERVER_SUBNETS = ipcd.getSubnets();
+		GAME_SERVER_HOSTS = ipcd.getHosts();
+		
+		// Load Feature L2Properties file (if exists)
+		final PropertiesParser Feature = new PropertiesParser(FEATURE_CONFIG_FILE);
+		
+		CH_TELE_FEE_RATIO = Feature.getLong("ClanHallTeleportFunctionFeeRatio", 604800000);
+		CH_TELE1_FEE = Feature.getInt("ClanHallTeleportFunctionFeeLvl1", 7000);
+		CH_TELE2_FEE = Feature.getInt("ClanHallTeleportFunctionFeeLvl2", 14000);
+		CH_SUPPORT_FEE_RATIO = Feature.getLong("ClanHallSupportFunctionFeeRatio", 86400000);
+		CH_SUPPORT1_FEE = Feature.getInt("ClanHallSupportFeeLvl1", 2500);
+		CH_SUPPORT2_FEE = Feature.getInt("ClanHallSupportFeeLvl2", 5000);
+		CH_SUPPORT3_FEE = Feature.getInt("ClanHallSupportFeeLvl3", 7000);
+		CH_SUPPORT4_FEE = Feature.getInt("ClanHallSupportFeeLvl4", 11000);
+		CH_SUPPORT5_FEE = Feature.getInt("ClanHallSupportFeeLvl5", 21000);
+		CH_SUPPORT6_FEE = Feature.getInt("ClanHallSupportFeeLvl6", 36000);
+		CH_SUPPORT7_FEE = Feature.getInt("ClanHallSupportFeeLvl7", 37000);
+		CH_SUPPORT8_FEE = Feature.getInt("ClanHallSupportFeeLvl8", 52000);
+		CH_MPREG_FEE_RATIO = Feature.getLong("ClanHallMpRegenerationFunctionFeeRatio", 86400000);
+		CH_MPREG1_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl1", 2000);
+		CH_MPREG2_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl2", 3750);
+		CH_MPREG3_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl3", 6500);
+		CH_MPREG4_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl4", 13750);
+		CH_MPREG5_FEE = Feature.getInt("ClanHallMpRegenerationFeeLvl5", 20000);
+		CH_HPREG_FEE_RATIO = Feature.getLong("ClanHallHpRegenerationFunctionFeeRatio", 86400000);
+		CH_HPREG1_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl1", 700);
+		CH_HPREG2_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl2", 800);
+		CH_HPREG3_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl3", 1000);
+		CH_HPREG4_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl4", 1166);
+		CH_HPREG5_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl5", 1500);
+		CH_HPREG6_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl6", 1750);
+		CH_HPREG7_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl7", 2000);
+		CH_HPREG8_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl8", 2250);
+		CH_HPREG9_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl9", 2500);
+		CH_HPREG10_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl10", 3250);
+		CH_HPREG11_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl11", 3270);
+		CH_HPREG12_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl12", 4250);
+		CH_HPREG13_FEE = Feature.getInt("ClanHallHpRegenerationFeeLvl13", 5166);
+		CH_EXPREG_FEE_RATIO = Feature.getLong("ClanHallExpRegenerationFunctionFeeRatio", 86400000);
+		CH_EXPREG1_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl1", 3000);
+		CH_EXPREG2_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl2", 6000);
+		CH_EXPREG3_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl3", 9000);
+		CH_EXPREG4_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl4", 15000);
+		CH_EXPREG5_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl5", 21000);
+		CH_EXPREG6_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl6", 23330);
+		CH_EXPREG7_FEE = Feature.getInt("ClanHallExpRegenerationFeeLvl7", 30000);
+		CH_ITEM_FEE_RATIO = Feature.getLong("ClanHallItemCreationFunctionFeeRatio", 86400000);
+		CH_ITEM1_FEE = Feature.getInt("ClanHallItemCreationFunctionFeeLvl1", 30000);
+		CH_ITEM2_FEE = Feature.getInt("ClanHallItemCreationFunctionFeeLvl2", 70000);
+		CH_ITEM3_FEE = Feature.getInt("ClanHallItemCreationFunctionFeeLvl3", 140000);
+		CH_CURTAIN_FEE_RATIO = Feature.getLong("ClanHallCurtainFunctionFeeRatio", 604800000);
+		CH_CURTAIN1_FEE = Feature.getInt("ClanHallCurtainFunctionFeeLvl1", 2000);
+		CH_CURTAIN2_FEE = Feature.getInt("ClanHallCurtainFunctionFeeLvl2", 2500);
+		CH_FRONT_FEE_RATIO = Feature.getLong("ClanHallFrontPlatformFunctionFeeRatio", 259200000);
+		CH_FRONT1_FEE = Feature.getInt("ClanHallFrontPlatformFunctionFeeLvl1", 1300);
+		CH_FRONT2_FEE = Feature.getInt("ClanHallFrontPlatformFunctionFeeLvl2", 4000);
+		CH_BUFF_FREE = Feature.getBoolean("AltClanHallMpBuffFree", false);
+		SIEGE_HOUR_LIST = new ArrayList<>();
+		for (String hour : Feature.getString("SiegeHourList", "").split(",")) {
+			if (Util.isDigit(hour)) {
+				SIEGE_HOUR_LIST.add(Integer.parseInt(hour));
+			}
+		}
+		CS_TELE_FEE_RATIO = Feature.getLong("CastleTeleportFunctionFeeRatio", 604800000);
+		CS_TELE1_FEE = Feature.getInt("CastleTeleportFunctionFeeLvl1", 1000);
+		CS_TELE2_FEE = Feature.getInt("CastleTeleportFunctionFeeLvl2", 10000);
+		CS_SUPPORT_FEE_RATIO = Feature.getLong("CastleSupportFunctionFeeRatio", 604800000);
+		CS_SUPPORT1_FEE = Feature.getInt("CastleSupportFeeLvl1", 49000);
+		CS_SUPPORT2_FEE = Feature.getInt("CastleSupportFeeLvl2", 120000);
+		CS_MPREG_FEE_RATIO = Feature.getLong("CastleMpRegenerationFunctionFeeRatio", 604800000);
+		CS_MPREG1_FEE = Feature.getInt("CastleMpRegenerationFeeLvl1", 45000);
+		CS_MPREG2_FEE = Feature.getInt("CastleMpRegenerationFeeLvl2", 65000);
+		CS_HPREG_FEE_RATIO = Feature.getLong("CastleHpRegenerationFunctionFeeRatio", 604800000);
+		CS_HPREG1_FEE = Feature.getInt("CastleHpRegenerationFeeLvl1", 12000);
+		CS_HPREG2_FEE = Feature.getInt("CastleHpRegenerationFeeLvl2", 20000);
+		CS_EXPREG_FEE_RATIO = Feature.getLong("CastleExpRegenerationFunctionFeeRatio", 604800000);
+		CS_EXPREG1_FEE = Feature.getInt("CastleExpRegenerationFeeLvl1", 63000);
+		CS_EXPREG2_FEE = Feature.getInt("CastleExpRegenerationFeeLvl2", 70000);
+		
+		OUTER_DOOR_UPGRADE_PRICE2 = Feature.getInt("OuterDoorUpgradePriceLvl2", 3000000);
+		OUTER_DOOR_UPGRADE_PRICE3 = Feature.getInt("OuterDoorUpgradePriceLvl3", 4000000);
+		OUTER_DOOR_UPGRADE_PRICE5 = Feature.getInt("OuterDoorUpgradePriceLvl5", 5000000);
+		INNER_DOOR_UPGRADE_PRICE2 = Feature.getInt("InnerDoorUpgradePriceLvl2", 750000);
+		INNER_DOOR_UPGRADE_PRICE3 = Feature.getInt("InnerDoorUpgradePriceLvl3", 900000);
+		INNER_DOOR_UPGRADE_PRICE5 = Feature.getInt("InnerDoorUpgradePriceLvl5", 1000000);
+		WALL_UPGRADE_PRICE2 = Feature.getInt("WallUpgradePriceLvl2", 1600000);
+		WALL_UPGRADE_PRICE3 = Feature.getInt("WallUpgradePriceLvl3", 1800000);
+		WALL_UPGRADE_PRICE5 = Feature.getInt("WallUpgradePriceLvl5", 2000000);
+		TRAP_UPGRADE_PRICE1 = Feature.getInt("TrapUpgradePriceLvl1", 3000000);
+		TRAP_UPGRADE_PRICE2 = Feature.getInt("TrapUpgradePriceLvl2", 4000000);
+		TRAP_UPGRADE_PRICE3 = Feature.getInt("TrapUpgradePriceLvl3", 5000000);
+		TRAP_UPGRADE_PRICE4 = Feature.getInt("TrapUpgradePriceLvl4", 6000000);
+		
+		FS_TELE_FEE_RATIO = Feature.getLong("FortressTeleportFunctionFeeRatio", 604800000);
+		FS_TELE1_FEE = Feature.getInt("FortressTeleportFunctionFeeLvl1", 1000);
+		FS_TELE2_FEE = Feature.getInt("FortressTeleportFunctionFeeLvl2", 10000);
+		FS_SUPPORT_FEE_RATIO = Feature.getLong("FortressSupportFunctionFeeRatio", 86400000);
+		FS_SUPPORT1_FEE = Feature.getInt("FortressSupportFeeLvl1", 7000);
+		FS_SUPPORT2_FEE = Feature.getInt("FortressSupportFeeLvl2", 17000);
+		FS_MPREG_FEE_RATIO = Feature.getLong("FortressMpRegenerationFunctionFeeRatio", 86400000);
+		FS_MPREG1_FEE = Feature.getInt("FortressMpRegenerationFeeLvl1", 6500);
+		FS_MPREG2_FEE = Feature.getInt("FortressMpRegenerationFeeLvl2", 9300);
+		FS_HPREG_FEE_RATIO = Feature.getLong("FortressHpRegenerationFunctionFeeRatio", 86400000);
+		FS_HPREG1_FEE = Feature.getInt("FortressHpRegenerationFeeLvl1", 2000);
+		FS_HPREG2_FEE = Feature.getInt("FortressHpRegenerationFeeLvl2", 3500);
+		FS_EXPREG_FEE_RATIO = Feature.getLong("FortressExpRegenerationFunctionFeeRatio", 86400000);
+		FS_EXPREG1_FEE = Feature.getInt("FortressExpRegenerationFeeLvl1", 9000);
+		FS_EXPREG2_FEE = Feature.getInt("FortressExpRegenerationFeeLvl2", 10000);
+		FS_UPDATE_FRQ = Feature.getInt("FortressPeriodicUpdateFrequency", 360);
+		FS_BLOOD_OATH_COUNT = Feature.getInt("FortressBloodOathCount", 1);
+		FS_MAX_SUPPLY_LEVEL = Feature.getInt("FortressMaxSupplyLevel", 6);
+		FS_FEE_FOR_CASTLE = Feature.getInt("FortressFeeForCastle", 25000);
+		FS_MAX_OWN_TIME = Feature.getInt("FortressMaximumOwnTime", 168);
+		
+		ALT_GAME_CASTLE_DAWN = Feature.getBoolean("AltCastleForDawn", true);
+		ALT_GAME_CASTLE_DUSK = Feature.getBoolean("AltCastleForDusk", true);
+		ALT_GAME_REQUIRE_CLAN_CASTLE = Feature.getBoolean("AltRequireClanCastle", false);
+		ALT_FESTIVAL_MIN_PLAYER = Feature.getInt("AltFestivalMinPlayer", 5);
+		ALT_MAXIMUM_PLAYER_CONTRIB = Feature.getInt("AltMaxPlayerContrib", 1000000);
+		ALT_FESTIVAL_MANAGER_START = Feature.getLong("AltFestivalManagerStart", 120000);
+		ALT_FESTIVAL_LENGTH = Feature.getLong("AltFestivalLength", 1080000);
+		ALT_FESTIVAL_CYCLE_LENGTH = Feature.getLong("AltFestivalCycleLength", 2280000);
+		ALT_FESTIVAL_FIRST_SPAWN = Feature.getLong("AltFestivalFirstSpawn", 120000);
+		ALT_FESTIVAL_FIRST_SWARM = Feature.getLong("AltFestivalFirstSwarm", 300000);
+		ALT_FESTIVAL_SECOND_SPAWN = Feature.getLong("AltFestivalSecondSpawn", 540000);
+		ALT_FESTIVAL_SECOND_SWARM = Feature.getLong("AltFestivalSecondSwarm", 720000);
+		ALT_FESTIVAL_CHEST_SPAWN = Feature.getLong("AltFestivalChestSpawn", 900000);
+		ALT_SIEGE_DAWN_GATES_PDEF_MULT = Feature.getDouble("AltDawnGatesPdefMult", 1.1);
+		ALT_SIEGE_DUSK_GATES_PDEF_MULT = Feature.getDouble("AltDuskGatesPdefMult", 0.8);
+		ALT_SIEGE_DAWN_GATES_MDEF_MULT = Feature.getDouble("AltDawnGatesMdefMult", 1.1);
+		ALT_SIEGE_DUSK_GATES_MDEF_MULT = Feature.getDouble("AltDuskGatesMdefMult", 0.8);
+		ALT_STRICT_SEVENSIGNS = Feature.getBoolean("StrictSevenSigns", true);
+		ALT_SEVENSIGNS_LAZY_UPDATE = Feature.getBoolean("AltSevenSignsLazyUpdate", true);
+		
+		SSQ_DAWN_TICKET_QUANTITY = Feature.getInt("SevenSignsDawnTicketQuantity", 300);
+		SSQ_DAWN_TICKET_PRICE = Feature.getInt("SevenSignsDawnTicketPrice", 1000);
+		SSQ_DAWN_TICKET_BUNDLE = Feature.getInt("SevenSignsDawnTicketBundle", 10);
+		SSQ_MANORS_AGREEMENT_ID = Feature.getInt("SevenSignsManorsAgreementId", 6388);
+		SSQ_JOIN_DAWN_ADENA_FEE = Feature.getInt("SevenSignsJoinDawnFee", 50000);
+		
+		TAKE_FORT_POINTS = Feature.getInt("TakeFortPoints", 200);
+		LOOSE_FORT_POINTS = Feature.getInt("LooseFortPoints", 0);
+		TAKE_CASTLE_POINTS = Feature.getInt("TakeCastlePoints", 1500);
+		LOOSE_CASTLE_POINTS = Feature.getInt("LooseCastlePoints", 3000);
+		CASTLE_DEFENDED_POINTS = Feature.getInt("CastleDefendedPoints", 750);
+		FESTIVAL_WIN_POINTS = Feature.getInt("FestivalOfDarknessWin", 200);
+		HERO_POINTS = Feature.getInt("HeroPoints", 1000);
+		ROYAL_GUARD_COST = Feature.getInt("CreateRoyalGuardCost", 5000);
+		KNIGHT_UNIT_COST = Feature.getInt("CreateKnightUnitCost", 10000);
+		KNIGHT_REINFORCE_COST = Feature.getInt("ReinforceKnightUnitCost", 5000);
+		BALLISTA_POINTS = Feature.getInt("KillBallistaPoints", 30);
+		BLOODALLIANCE_POINTS = Feature.getInt("BloodAlliancePoints", 500);
+		BLOODOATH_POINTS = Feature.getInt("BloodOathPoints", 200);
+		KNIGHTSEPAULETTE_POINTS = Feature.getInt("KnightsEpaulettePoints", 20);
+		REPUTATION_SCORE_PER_KILL = Feature.getInt("ReputationScorePerKill", 1);
+		JOIN_ACADEMY_MIN_REP_SCORE = Feature.getInt("CompleteAcademyMinPoints", 190);
+		JOIN_ACADEMY_MAX_REP_SCORE = Feature.getInt("CompleteAcademyMaxPoints", 650);
+		RAID_RANKING_1ST = Feature.getInt("1stRaidRankingPoints", 1250);
+		RAID_RANKING_2ND = Feature.getInt("2ndRaidRankingPoints", 900);
+		RAID_RANKING_3RD = Feature.getInt("3rdRaidRankingPoints", 700);
+		RAID_RANKING_4TH = Feature.getInt("4thRaidRankingPoints", 600);
+		RAID_RANKING_5TH = Feature.getInt("5thRaidRankingPoints", 450);
+		RAID_RANKING_6TH = Feature.getInt("6thRaidRankingPoints", 350);
+		RAID_RANKING_7TH = Feature.getInt("7thRaidRankingPoints", 300);
+		RAID_RANKING_8TH = Feature.getInt("8thRaidRankingPoints", 200);
+		RAID_RANKING_9TH = Feature.getInt("9thRaidRankingPoints", 150);
+		RAID_RANKING_10TH = Feature.getInt("10thRaidRankingPoints", 100);
+		RAID_RANKING_UP_TO_50TH = Feature.getInt("UpTo50thRaidRankingPoints", 25);
+		RAID_RANKING_UP_TO_100TH = Feature.getInt("UpTo100thRaidRankingPoints", 12);
+		CLAN_LEVEL_6_COST = Feature.getInt("ClanLevel6Cost", 5000);
+		CLAN_LEVEL_7_COST = Feature.getInt("ClanLevel7Cost", 10000);
+		CLAN_LEVEL_8_COST = Feature.getInt("ClanLevel8Cost", 20000);
+		CLAN_LEVEL_9_COST = Feature.getInt("ClanLevel9Cost", 40000);
+		CLAN_LEVEL_10_COST = Feature.getInt("ClanLevel10Cost", 40000);
+		CLAN_LEVEL_11_COST = Feature.getInt("ClanLevel11Cost", 75000);
+		CLAN_LEVEL_6_REQUIREMENT = Feature.getInt("ClanLevel6Requirement", 30);
+		CLAN_LEVEL_7_REQUIREMENT = Feature.getInt("ClanLevel7Requirement", 50);
+		CLAN_LEVEL_8_REQUIREMENT = Feature.getInt("ClanLevel8Requirement", 80);
+		CLAN_LEVEL_9_REQUIREMENT = Feature.getInt("ClanLevel9Requirement", 120);
+		CLAN_LEVEL_10_REQUIREMENT = Feature.getInt("ClanLevel10Requirement", 140);
+		CLAN_LEVEL_11_REQUIREMENT = Feature.getInt("ClanLevel11Requirement", 170);
+		ALLOW_WYVERN_ALWAYS = Feature.getBoolean("AllowRideWyvernAlways", false);
+		ALLOW_WYVERN_DURING_SIEGE = Feature.getBoolean("AllowRideWyvernDuringSiege", true);
+		
+		// Load Character L2Properties file (if exists)
+		final PropertiesParser character = new PropertiesParser(CHARACTER_CONFIG_FILE);
+		
+		ALT_GAME_DELEVEL = character.getBoolean("Delevel", true);
+		DECREASE_SKILL_LEVEL = character.getBoolean("DecreaseSkillOnDelevel", true);
+		ALT_WEIGHT_LIMIT = character.getDouble("AltWeightLimit", 1);
+		RUN_SPD_BOOST = character.getInt("RunSpeedBoost", 0);
+		DEATH_PENALTY_CHANCE = character.getInt("DeathPenaltyChance", 20);
+		RESPAWN_RESTORE_CP = character.getDouble("RespawnRestoreCP", 0) / 100;
+		RESPAWN_RESTORE_HP = character.getDouble("RespawnRestoreHP", 65) / 100;
+		RESPAWN_RESTORE_MP = character.getDouble("RespawnRestoreMP", 0) / 100;
+		HP_REGEN_MULTIPLIER = character.getDouble("HpRegenMultiplier", 100) / 100;
+		MP_REGEN_MULTIPLIER = character.getDouble("MpRegenMultiplier", 100) / 100;
+		CP_REGEN_MULTIPLIER = character.getDouble("CpRegenMultiplier", 100) / 100;
+		ENABLE_MODIFY_SKILL_DURATION = character.getBoolean("EnableModifySkillDuration", false);
+		
+		// Create Map only if enabled
+		if (ENABLE_MODIFY_SKILL_DURATION) {
+			String[] propertySplit = character.getString("SkillDurationList", "").split(";");
+			SKILL_DURATION_LIST = new HashMap<>(propertySplit.length);
+			for (String skill : propertySplit) {
+				String[] skillSplit = skill.split(",");
+				if (skillSplit.length != 2) {
+					LOG.warn("[SkillDurationList]: invalid config property -> SkillDurationList {}", skill);
+				} else {
+					try {
+						SKILL_DURATION_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+					} catch (NumberFormatException nfe) {
+						if (!skill.isEmpty()) {
+							LOG.warn("[SkillDurationList]: invalid config property -> SkillList {}", skill);
+						}
+					}
+				}
+			}
+		}
+		ENABLE_MODIFY_SKILL_REUSE = character.getBoolean("EnableModifySkillReuse", false);
+		// Create Map only if enabled
+		if (ENABLE_MODIFY_SKILL_REUSE) {
+			String[] propertySplit = character.getString("SkillReuseList", "").split(";");
+			SKILL_REUSE_LIST = new HashMap<>(propertySplit.length);
+			for (String skill : propertySplit) {
+				String[] skillSplit = skill.split(",");
+				if (skillSplit.length != 2) {
+					LOG.warn("[SkillReuseList]: invalid config property -> SkillReuseList {}", skill);
+				} else {
+					try {
+						SKILL_REUSE_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+					} catch (NumberFormatException nfe) {
+						if (!skill.isEmpty()) {
+							LOG.warn("[SkillReuseList]: invalid config property -> SkillList {}", skill);
+						}
+					}
+				}
+			}
+		}
+		
+		AUTO_LEARN_SKILLS = character.getBoolean("AutoLearnSkills", false);
+		AUTO_LEARN_FS_SKILLS = character.getBoolean("AutoLearnForgottenScrollSkills", false);
+		AUTO_LOOT_HERBS = character.getBoolean("AutoLootHerbs", false);
+		BUFFS_MAX_AMOUNT = character.getByte("MaxBuffAmount", (byte) 20);
+		TRIGGERED_BUFFS_MAX_AMOUNT = character.getByte("MaxTriggeredBuffAmount", (byte) 12);
+		DANCES_MAX_AMOUNT = character.getByte("MaxDanceAmount", (byte) 12);
+		DANCE_CANCEL_BUFF = character.getBoolean("DanceCancelBuff", false);
+		DANCE_CONSUME_ADDITIONAL_MP = character.getBoolean("DanceConsumeAdditionalMP", true);
+		ALT_STORE_DANCES = character.getBoolean("AltStoreDances", false);
+		AUTO_LEARN_DIVINE_INSPIRATION = character.getBoolean("AutoLearnDivineInspiration", false);
+		ALT_GAME_CANCEL_BOW = character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all");
+		ALT_GAME_CANCEL_CAST = character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || character.getString("AltGameCancelByHit", "Cast").equalsIgnoreCase("all");
+		ALT_GAME_MAGICFAILURES = character.getBoolean("MagicFailures", true);
+		PLAYER_FAKEDEATH_UP_PROTECTION = character.getInt("PlayerFakeDeathUpProtection", 0);
+		STORE_SKILL_COOLTIME = character.getBoolean("StoreSkillCooltime", true);
+		SUBCLASS_STORE_SKILL_COOLTIME = character.getBoolean("SubclassStoreSkillCooltime", false);
+		SUMMON_STORE_SKILL_COOLTIME = character.getBoolean("SummonStoreSkillCooltime", true);
+		ALT_GAME_SHIELD_BLOCKS = character.getBoolean("AltShieldBlocks", false);
+		ALT_PERFECT_SHLD_BLOCK = character.getInt("AltPerfectShieldBlockRate", 10);
+		EFFECT_TICK_RATIO = character.getLong("EffectTickRatio", 666);
+		ALLOW_CLASS_MASTERS = character.getBoolean("AllowClassMasters", false);
+		ALLOW_ENTIRE_TREE = character.getBoolean("AllowEntireTree", false);
+		ALTERNATE_CLASS_MASTER = character.getBoolean("AlternateClassMaster", false);
+		if (ALLOW_CLASS_MASTERS || ALTERNATE_CLASS_MASTER) {
+			CLASS_MASTER_SETTINGS = new ClassMasterSettings(character.getString("ConfigClassMaster", ""));
+		}
+		LIFE_CRYSTAL_NEEDED = character.getBoolean("LifeCrystalNeeded", true);
+		ES_SP_BOOK_NEEDED = character.getBoolean("EnchantSkillSpBookNeeded", true);
+		DIVINE_SP_BOOK_NEEDED = character.getBoolean("DivineInspirationSpBookNeeded", true);
+		ALT_GAME_SKILL_LEARN = character.getBoolean("AltGameSkillLearn", false);
+		ALT_GAME_SUBCLASS_WITHOUT_QUESTS = character.getBoolean("AltSubClassWithoutQuests", false);
+		ALT_GAME_SUBCLASS_EVERYWHERE = character.getBoolean("AltSubclassEverywhere", false);
+		RESTORE_SERVITOR_ON_RECONNECT = character.getBoolean("RestoreServitorOnReconnect", true);
+		RESTORE_PET_ON_RECONNECT = character.getBoolean("RestorePetOnReconnect", true);
+		ALLOW_TRANSFORM_WITHOUT_QUEST = character.getBoolean("AltTransformationWithoutQuest", false);
+		FEE_DELETE_TRANSFER_SKILLS = character.getInt("FeeDeleteTransferSkills", 10000000);
+		FEE_DELETE_SUBCLASS_SKILLS = character.getInt("FeeDeleteSubClassSkills", 10000000);
+		ENABLE_VITALITY = character.getBoolean("EnableVitality", true);
+		RECOVER_VITALITY_ON_RECONNECT = character.getBoolean("RecoverVitalityOnReconnect", true);
+		STARTING_VITALITY_POINTS = character.getInt("StartingVitalityPoints", 20000);
+		MAX_BONUS_EXP = character.getDouble("MaxExpBonus", 3.5);
+		MAX_BONUS_SP = character.getDouble("MaxSpBonus", 3.5);
+		MAX_RUN_SPEED = character.getInt("MaxRunSpeed", 250);
+		MAX_PCRIT_RATE = character.getInt("MaxPCritRate", 500);
+		MAX_MCRIT_RATE = character.getInt("MaxMCritRate", 200);
+		MAX_PATK_SPEED = character.getInt("MaxPAtkSpeed", 1500);
+		MAX_MATK_SPEED = character.getInt("MaxMAtkSpeed", 1999);
+		MAX_EVASION = character.getInt("MaxEvasion", 250);
+		MIN_ABNORMAL_STATE_SUCCESS_RATE = character.getInt("MinAbnormalStateSuccessRate", 10);
+		MAX_ABNORMAL_STATE_SUCCESS_RATE = character.getInt("MaxAbnormalStateSuccessRate", 90);
+		MAX_PLAYER_LEVEL = character.getInt("MaxPlayerLevel", 85);
+		MAX_PET_LEVEL = character.getInt("MaxPetLevel", 86);
+		MAX_SUBCLASS = character.getByte("MaxSubclass", (byte) 3);
+		BASE_SUBCLASS_LEVEL = character.getInt("BaseSubclassLevel", 40);
+		MAX_SUBCLASS_LEVEL = character.getInt("MaxSubclassLevel", 80);
+		MAX_PVTSTORESELL_SLOTS_DWARF = character.getInt("MaxPvtStoreSellSlotsDwarf", 4);
+		MAX_PVTSTORESELL_SLOTS_OTHER = character.getInt("MaxPvtStoreSellSlotsOther", 3);
+		MAX_PVTSTOREBUY_SLOTS_DWARF = character.getInt("MaxPvtStoreBuySlotsDwarf", 5);
+		MAX_PVTSTOREBUY_SLOTS_OTHER = character.getInt("MaxPvtStoreBuySlotsOther", 4);
+		INVENTORY_MAXIMUM_NO_DWARF = character.getInt("MaximumSlotsForNoDwarf", 80);
+		INVENTORY_MAXIMUM_DWARF = character.getInt("MaximumSlotsForDwarf", 100);
+		INVENTORY_MAXIMUM_GM = character.getInt("MaximumSlotsForGMPlayer", 250);
+		INVENTORY_MAXIMUM_QUEST_ITEMS = character.getInt("MaximumSlotsForQuestItems", 100);
+		MAX_ITEM_IN_PACKET = Math.max(INVENTORY_MAXIMUM_NO_DWARF, Math.max(INVENTORY_MAXIMUM_DWARF, INVENTORY_MAXIMUM_GM));
+		WAREHOUSE_SLOTS_DWARF = character.getInt("MaximumWarehouseSlotsForDwarf", 120);
+		WAREHOUSE_SLOTS_NO_DWARF = character.getInt("MaximumWarehouseSlotsForNoDwarf", 100);
+		WAREHOUSE_SLOTS_CLAN = character.getInt("MaximumWarehouseSlotsForClan", 150);
+		ALT_FREIGHT_SLOTS = character.getInt("MaximumFreightSlots", 200);
+		ALT_FREIGHT_PRICE = character.getInt("FreightPrice", 1000);
+		ENCHANT_CHANCE_ELEMENT_STONE = character.getDouble("EnchantChanceElementStone", 50);
+		ENCHANT_CHANCE_ELEMENT_CRYSTAL = character.getDouble("EnchantChanceElementCrystal", 30);
+		ENCHANT_CHANCE_ELEMENT_JEWEL = character.getDouble("EnchantChanceElementJewel", 20);
+		ENCHANT_CHANCE_ELEMENT_ENERGY = character.getDouble("EnchantChanceElementEnergy", 10);
+		String[] notenchantable = character.getString("EnchantBlackList", "7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,13293,13294,13296").split(",");
+		ENCHANT_BLACKLIST = new int[notenchantable.length];
+		for (int i = 0; i < notenchantable.length; i++) {
+			ENCHANT_BLACKLIST[i] = Integer.parseInt(notenchantable[i]);
+		}
+		Arrays.sort(ENCHANT_BLACKLIST);
+		
+		AUGMENTATION_NG_SKILL_CHANCE = character.getInt("AugmentationNGSkillChance", 15);
+		AUGMENTATION_NG_GLOW_CHANCE = character.getInt("AugmentationNGGlowChance", 0);
+		AUGMENTATION_MID_SKILL_CHANCE = character.getInt("AugmentationMidSkillChance", 30);
+		AUGMENTATION_MID_GLOW_CHANCE = character.getInt("AugmentationMidGlowChance", 40);
+		AUGMENTATION_HIGH_SKILL_CHANCE = character.getInt("AugmentationHighSkillChance", 45);
+		AUGMENTATION_HIGH_GLOW_CHANCE = character.getInt("AugmentationHighGlowChance", 70);
+		AUGMENTATION_TOP_SKILL_CHANCE = character.getInt("AugmentationTopSkillChance", 60);
+		AUGMENTATION_TOP_GLOW_CHANCE = character.getInt("AugmentationTopGlowChance", 100);
+		AUGMENTATION_BASESTAT_CHANCE = character.getInt("AugmentationBaseStatChance", 1);
+		AUGMENTATION_ACC_SKILL_CHANCE = character.getInt("AugmentationAccSkillChance", 0);
+		
+		RETAIL_LIKE_AUGMENTATION = character.getBoolean("RetailLikeAugmentation", true);
+		String[] array = character.getString("RetailLikeAugmentationNoGradeChance", "55,35,7,3").split(",");
+		RETAIL_LIKE_AUGMENTATION_NG_CHANCE = new int[array.length];
+		for (int i = 0; i < 4; i++) {
+			RETAIL_LIKE_AUGMENTATION_NG_CHANCE[i] = Integer.parseInt(array[i]);
+		}
+		array = character.getString("RetailLikeAugmentationMidGradeChance", "55,35,7,3").split(",");
+		RETAIL_LIKE_AUGMENTATION_MID_CHANCE = new int[array.length];
+		for (int i = 0; i < 4; i++) {
+			RETAIL_LIKE_AUGMENTATION_MID_CHANCE[i] = Integer.parseInt(array[i]);
+		}
+		array = character.getString("RetailLikeAugmentationHighGradeChance", "55,35,7,3").split(",");
+		RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE = new int[array.length];
+		for (int i = 0; i < 4; i++) {
+			RETAIL_LIKE_AUGMENTATION_HIGH_CHANCE[i] = Integer.parseInt(array[i]);
+		}
+		array = character.getString("RetailLikeAugmentationTopGradeChance", "55,35,7,3").split(",");
+		RETAIL_LIKE_AUGMENTATION_TOP_CHANCE = new int[array.length];
+		for (int i = 0; i < 4; i++) {
+			RETAIL_LIKE_AUGMENTATION_TOP_CHANCE[i] = Integer.parseInt(array[i]);
+		}
+		RETAIL_LIKE_AUGMENTATION_ACCESSORY = character.getBoolean("RetailLikeAugmentationAccessory", true);
+		
+		array = character.getString("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314,13740,13741,13742,13743,13744,13745,13746,13747,13748,14592,14593,14594,14595,14596,14597,14598,14599,14600,14664,14665,14666,14667,14668,14669,14670,14671,14672,14801,14802,14803,14804,14805,14806,14807,14808,14809,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,16025,16026,21712,22173,22174,22175").split(",");
+		AUGMENTATION_BLACKLIST = new int[array.length];
+		
+		for (int i = 0; i < array.length; i++) {
+			AUGMENTATION_BLACKLIST[i] = Integer.parseInt(array[i]);
+		}
+		
+		Arrays.sort(AUGMENTATION_BLACKLIST);
+		ALT_ALLOW_AUGMENT_PVP_ITEMS = character.getBoolean("AltAllowAugmentPvPItems", false);
+		ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = character.getBoolean("AltKarmaPlayerCanBeKilledInPeaceZone", false);
+		ALT_GAME_KARMA_PLAYER_CAN_SHOP = character.getBoolean("AltKarmaPlayerCanShop", true);
+		ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = character.getBoolean("AltKarmaPlayerCanTeleport", true);
+		ALT_GAME_KARMA_PLAYER_CAN_USE_GK = character.getBoolean("AltKarmaPlayerCanUseGK", false);
+		ALT_GAME_KARMA_PLAYER_CAN_TRADE = character.getBoolean("AltKarmaPlayerCanTrade", true);
+		ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = character.getBoolean("AltKarmaPlayerCanUseWareHouse", true);
+		MAX_PERSONAL_FAME_POINTS = character.getInt("MaxPersonalFamePoints", 100000);
+		FORTRESS_ZONE_FAME_TASK_FREQUENCY = character.getInt("FortressZoneFameTaskFrequency", 300);
+		FORTRESS_ZONE_FAME_AQUIRE_POINTS = character.getInt("FortressZoneFameAquirePoints", 31);
+		CASTLE_ZONE_FAME_TASK_FREQUENCY = character.getInt("CastleZoneFameTaskFrequency", 300);
+		CASTLE_ZONE_FAME_AQUIRE_POINTS = character.getInt("CastleZoneFameAquirePoints", 125);
+		FAME_FOR_DEAD_PLAYERS = character.getBoolean("FameForDeadPlayers", true);
+		IS_CRAFTING_ENABLED = character.getBoolean("CraftingEnabled", true);
+		CRAFT_MASTERWORK = character.getBoolean("CraftMasterwork", true);
+		DWARF_RECIPE_LIMIT = character.getInt("DwarfRecipeLimit", 50);
+		COMMON_RECIPE_LIMIT = character.getInt("CommonRecipeLimit", 50);
+		ALT_GAME_CREATION = character.getBoolean("AltGameCreation", false);
+		ALT_GAME_CREATION_SPEED = character.getDouble("AltGameCreationSpeed", 1);
+		ALT_GAME_CREATION_XP_RATE = character.getDouble("AltGameCreationXpRate", 1);
+		ALT_GAME_CREATION_SP_RATE = character.getDouble("AltGameCreationSpRate", 1);
+		ALT_GAME_CREATION_RARE_XPSP_RATE = character.getDouble("AltGameCreationRareXpSpRate", 2);
+		ALT_BLACKSMITH_USE_RECIPES = character.getBoolean("AltBlacksmithUseRecipes", true);
+		ALT_CLAN_LEADER_DATE_CHANGE = character.getInt("AltClanLeaderDateChange", 3);
+		if ((ALT_CLAN_LEADER_DATE_CHANGE < 1) || (ALT_CLAN_LEADER_DATE_CHANGE > 7)) {
+			LOG.warn("Wrong value specified for AltClanLeaderDateChange: {}", ALT_CLAN_LEADER_DATE_CHANGE);
+			ALT_CLAN_LEADER_DATE_CHANGE = 3;
+		}
+		ALT_CLAN_LEADER_HOUR_CHANGE = character.getString("AltClanLeaderHourChange", "00:00:00");
+		ALT_CLAN_LEADER_INSTANT_ACTIVATION = character.getBoolean("AltClanLeaderInstantActivation", false);
+		ALT_CLAN_JOIN_DAYS = character.getInt("DaysBeforeJoinAClan", 1);
+		ALT_CLAN_CREATE_DAYS = character.getInt("DaysBeforeCreateAClan", 10);
+		ALT_CLAN_DISSOLVE_DAYS = character.getInt("DaysToPassToDissolveAClan", 7);
+		ALT_ALLY_JOIN_DAYS_WHEN_LEAVED = character.getInt("DaysBeforeJoinAllyWhenLeaved", 1);
+		ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED = character.getInt("DaysBeforeJoinAllyWhenDismissed", 1);
+		ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED = character.getInt("DaysBeforeAcceptNewClanWhenDismissed", 1);
+		ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED = character.getInt("DaysBeforeCreateNewAllyWhenDissolved", 1);
+		ALT_MAX_NUM_OF_CLANS_IN_ALLY = character.getInt("AltMaxNumOfClansInAlly", 3);
+		ALT_CLAN_MEMBERS_FOR_WAR = character.getInt("AltClanMembersForWar", 15);
+		ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = character.getBoolean("AltMembersCanWithdrawFromClanWH", false);
+		REMOVE_CASTLE_CIRCLETS = character.getBoolean("RemoveCastleCirclets", true);
+		ALT_PARTY_RANGE = character.getInt("AltPartyRange", 1600);
+		ALT_PARTY_RANGE2 = character.getInt("AltPartyRange2", 1400);
+		ALT_LEAVE_PARTY_LEADER = character.getBoolean("AltLeavePartyLeader", false);
+		INITIAL_EQUIPMENT_EVENT = character.getBoolean("InitialEquipmentEvent", false);
+		STARTING_ADENA = character.getLong("StartingAdena", 0);
+		STARTING_LEVEL = character.getInt("StartingLevel", 1);
+		STARTING_SP = character.getInt("StartingSP", 0);
+		MAX_ADENA = character.getLong("MaxAdena", 99900000000L);
+		if (MAX_ADENA < 0) {
+			MAX_ADENA = Long.MAX_VALUE;
+		}
+		AUTO_LOOT = character.getBoolean("AutoLoot", false);
+		AUTO_LOOT_RAIDS = character.getBoolean("AutoLootRaids", false);
+		LOOT_RAIDS_PRIVILEGE_INTERVAL = character.getInt("RaidLootRightsInterval", 900) * 1000;
+		LOOT_RAIDS_PRIVILEGE_CC_SIZE = character.getInt("RaidLootRightsCCSize", 45);
+		UNSTUCK_INTERVAL = character.getInt("UnstuckInterval", 300);
+		TELEPORT_WATCHDOG_TIMEOUT = character.getInt("TeleportWatchdogTimeout", 0);
+		PLAYER_SPAWN_PROTECTION = character.getInt("PlayerSpawnProtection", 0);
+		String[] items = character.getString("PlayerSpawnProtectionAllowedItems", "").split(",");
+		SPAWN_PROTECTION_ALLOWED_ITEMS = new ArrayList<>(items.length);
+		for (String item : items) {
+			try {
+				if (!item.isEmpty()) {
+					SPAWN_PROTECTION_ALLOWED_ITEMS.add(Integer.parseInt(item));
+				}
+			} catch (NumberFormatException nfe) {
+				LOG.warn("Player Spawn Protection: Wrong Item ID passed: {}", item, nfe);
+			}
+		}
+		
+		PLAYER_TELEPORT_PROTECTION = character.getInt("PlayerTeleportProtection", 0);
+		RANDOM_RESPAWN_IN_TOWN_ENABLED = character.getBoolean("RandomRespawnInTownEnabled", true);
+		OFFSET_ON_TELEPORT_ENABLED = character.getBoolean("OffsetOnTeleportEnabled", true);
+		MAX_OFFSET_ON_TELEPORT = character.getInt("MaxOffsetOnTeleport", 50);
+		PETITIONING_ALLOWED = character.getBoolean("PetitioningAllowed", true);
+		MAX_PETITIONS_PER_PLAYER = character.getInt("MaxPetitionsPerPlayer", 5);
+		MAX_PETITIONS_PENDING = character.getInt("MaxPetitionsPending", 25);
+		ALT_GAME_FREE_TELEPORT = character.getBoolean("AltFreeTeleporting", false);
+		DELETE_DAYS = character.getInt("DeleteCharAfterDays", 7);
+		ALT_GAME_EXPONENT_XP = character.getFloat("AltGameExponentXp", 0);
+		ALT_GAME_EXPONENT_SP = character.getFloat("AltGameExponentSp", 0);
+		PARTY_XP_CUTOFF_METHOD = character.getString("PartyXpCutoffMethod", "highfive");
+		PARTY_XP_CUTOFF_PERCENT = character.getDouble("PartyXpCutoffPercent", 3);
+		PARTY_XP_CUTOFF_LEVEL = character.getInt("PartyXpCutoffLevel", 20);
+		final String[] gaps = character.getString("PartyXpCutoffGaps", "0,9;10,14;15,99").split(";");
+		PARTY_XP_CUTOFF_GAPS = new int[gaps.length][2];
+		for (int i = 0; i < gaps.length; i++) {
+			PARTY_XP_CUTOFF_GAPS[i] = new int[] {
+				Integer.parseInt(gaps[i].split(",")[0]),
+				Integer.parseInt(gaps[i].split(",")[1])
+			};
+		}
+		final String[] percents = character.getString("PartyXpCutoffGapPercent", "100;30;0").split(";");
+		PARTY_XP_CUTOFF_GAP_PERCENTS = new int[percents.length];
+		for (int i = 0; i < percents.length; i++) {
+			PARTY_XP_CUTOFF_GAP_PERCENTS[i] = Integer.parseInt(percents[i]);
+		}
+		DISABLE_TUTORIAL = character.getBoolean("DisableTutorial", false);
+		EXPERTISE_PENALTY = character.getBoolean("ExpertisePenalty", true);
+		STORE_RECIPE_SHOPLIST = character.getBoolean("StoreRecipeShopList", false);
+		STORE_UI_SETTINGS = character.getBoolean("StoreCharUiSettings", false);
+		FORBIDDEN_NAMES = new HashSet<>(Arrays.asList(character.getString("ForbiddenNames", "annou,ammou,amnou,anmou,anou,amou,announcements,announce").split(",")));
+		SILENCE_MODE_EXCLUDE = character.getBoolean("SilenceModeExclude", false);
+		ALT_VALIDATE_TRIGGER_SKILLS = character.getBoolean("AltValidateTriggerSkills", false);
+		PLAYER_MOVEMENT_BLOCK_TIME = character.getInt("NpcTalkBlockingTime", 0) * 1000;
+		
+		// Load Telnet L2Properties file (if exists)
+		final PropertiesParser telnetSettings = new PropertiesParser(TELNET_FILE);
+		
+		IS_TELNET_ENABLED = telnetSettings.getBoolean("EnableTelnet", false);
+		
+		// MMO
+		final PropertiesParser mmoSettings = new PropertiesParser(MMO_CONFIG_FILE);
+		
+		MMO_SELECTOR_SLEEP_TIME = mmoSettings.getInt("SleepTime", 20);
+		MMO_MAX_SEND_PER_PASS = mmoSettings.getInt("MaxSendPerPass", 12);
+		MMO_MAX_READ_PER_PASS = mmoSettings.getInt("MaxReadPerPass", 12);
+		MMO_HELPER_BUFFER_COUNT = mmoSettings.getInt("HelperBufferCount", 20);
+		MMO_TCP_NODELAY = mmoSettings.getBoolean("TcpNoDelay", false);
+		
+		// Load IdFactory L2Properties file (if exists)
+		final PropertiesParser IdFactory = new PropertiesParser(ID_CONFIG_FILE);
+		
+		IDFACTORY_TYPE = IdFactory.getEnum("IDFactory", IdFactoryType.class, IdFactoryType.BitSet);
+		BAD_ID_CHECKING = IdFactory.getBoolean("BadIdChecking", true);
+		
+		// Load General L2Properties file (if exists)
+		final PropertiesParser General = new PropertiesParser(GENERAL_CONFIG_FILE);
+		EVERYBODY_HAS_ADMIN_RIGHTS = General.getBoolean("EverybodyHasAdminRights", false);
+		SERVER_LIST_BRACKET = General.getBoolean("ServerListBrackets", false);
+		SERVER_LIST_TYPE = getServerTypeId(General.getString("ServerListType", "Normal").split(","));
+		SERVER_LIST_AGE = General.getInt("ServerListAge", 0);
+		SERVER_GMONLY = General.getBoolean("ServerGMOnly", false);
+		GM_HERO_AURA = General.getBoolean("GMHeroAura", false);
+		GM_STARTUP_INVULNERABLE = General.getBoolean("GMStartupInvulnerable", false);
+		GM_STARTUP_INVISIBLE = General.getBoolean("GMStartupInvisible", false);
+		GM_STARTUP_SILENCE = General.getBoolean("GMStartupSilence", false);
+		GM_STARTUP_AUTO_LIST = General.getBoolean("GMStartupAutoList", false);
+		GM_STARTUP_DIET_MODE = General.getBoolean("GMStartupDietMode", false);
+		GM_ITEM_RESTRICTION = General.getBoolean("GMItemRestriction", true);
+		GM_SKILL_RESTRICTION = General.getBoolean("GMSkillRestriction", true);
+		GM_TRADE_RESTRICTED_ITEMS = General.getBoolean("GMTradeRestrictedItems", false);
+		GM_RESTART_FIGHTING = General.getBoolean("GMRestartFighting", true);
+		GM_ANNOUNCER_NAME = General.getBoolean("GMShowAnnouncerName", false);
+		GM_CRITANNOUNCER_NAME = General.getBoolean("GMShowCritAnnouncerName", false);
+		GM_GIVE_SPECIAL_SKILLS = General.getBoolean("GMGiveSpecialSkills", false);
+		GM_GIVE_SPECIAL_AURA_SKILLS = General.getBoolean("GMGiveSpecialAuraSkills", false);
+		GAMEGUARD_ENFORCE = General.getBoolean("GameGuardEnforce", false);
+		GAMEGUARD_PROHIBITACTION = General.getBoolean("GameGuardProhibitAction", false);
+		LOG_CHAT = General.getBoolean("LogChat", false);
+		LOG_AUTO_ANNOUNCEMENTS = General.getBoolean("LogAutoAnnouncements", false);
+		LOG_ITEMS = General.getBoolean("LogItems", false);
+		LOG_ITEMS_SMALL_LOG = General.getBoolean("LogItemsSmallLog", false);
+		LOG_ITEM_ENCHANTS = General.getBoolean("LogItemEnchants", false);
+		LOG_SKILL_ENCHANTS = General.getBoolean("LogSkillEnchants", false);
+		GMAUDIT = General.getBoolean("GMAudit", false);
+		SKILL_CHECK_ENABLE = General.getBoolean("SkillCheckEnable", false);
+		SKILL_CHECK_REMOVE = General.getBoolean("SkillCheckRemove", false);
+		SKILL_CHECK_GM = General.getBoolean("SkillCheckGM", true);
+		DEBUG = General.getBoolean("Debug", false);
+		DEBUG_INSTANCES = General.getBoolean("InstanceDebug", false);
+		HTML_ACTION_CACHE_DEBUG = General.getBoolean("HtmlActionCacheDebug", false);
+		PACKET_HANDLER_DEBUG = General.getBoolean("PacketHandlerDebug", false);
+		DEVELOPER = General.getBoolean("Developer", false);
+		NO_HANDLERS = General.getBoolean("NoHandlers", false) || Boolean.getBoolean("nohandlers");
+		NO_QUESTS = General.getBoolean("NoQuests", false) || Boolean.getBoolean("noquests");
+		ALT_DEV_NO_SPAWNS = General.getBoolean("AltDevNoSpawns", false) || Boolean.getBoolean("nospawns");
+		ALT_DEV_SHOW_QUESTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowQuestsLoadInLogs", false);
+		ALT_DEV_SHOW_SCRIPTS_LOAD_IN_LOGS = General.getBoolean("AltDevShowScriptsLoadInLogs", false);
+		THREAD_P_EFFECTS = General.getInt("ThreadPoolSizeEffects", 10);
+		THREAD_P_GENERAL = General.getInt("ThreadPoolSizeGeneral", 13);
+		THREAD_E_EVENTS = General.getInt("ThreadPoolSizeEvents", 2);
+		IO_PACKET_THREAD_CORE_SIZE = General.getInt("UrgentPacketThreadCoreSize", 2);
+		GENERAL_PACKET_THREAD_CORE_SIZE = General.getInt("GeneralPacketThreadCoreSize", 4);
+		GENERAL_THREAD_CORE_SIZE = General.getInt("GeneralThreadCoreSize", 4);
+		AI_MAX_THREAD = General.getInt("AiMaxThread", 6);
+		EVENT_MAX_THREAD = General.getInt("EventsMaxThread", 5);
+		CLIENT_PACKET_QUEUE_SIZE = General.getInt("ClientPacketQueueSize", 0);
+		if (CLIENT_PACKET_QUEUE_SIZE == 0) {
+			CLIENT_PACKET_QUEUE_SIZE = MMO_MAX_READ_PER_PASS + 2;
+		}
+		CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = General.getInt("ClientPacketQueueMaxBurstSize", 0);
+		if (CLIENT_PACKET_QUEUE_MAX_BURST_SIZE == 0) {
+			CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = MMO_MAX_READ_PER_PASS + 1;
+		}
+		CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND = General.getInt("ClientPacketQueueMaxPacketsPerSecond", 80);
+		CLIENT_PACKET_QUEUE_MEASURE_INTERVAL = General.getInt("ClientPacketQueueMeasureInterval", 5);
+		CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND = General.getInt("ClientPacketQueueMaxAveragePacketsPerSecond", 40);
+		CLIENT_PACKET_QUEUE_MAX_FLOODS_PER_MIN = General.getInt("ClientPacketQueueMaxFloodsPerMin", 2);
+		CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN = General.getInt("ClientPacketQueueMaxOverflowsPerMin", 1);
+		CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN = General.getInt("ClientPacketQueueMaxUnderflowsPerMin", 1);
+		CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = General.getInt("ClientPacketQueueMaxUnknownPerMin", 5);
+		DEADLOCK_DETECTOR = General.getBoolean("DeadLockDetector", true);
+		DEADLOCK_CHECK_INTERVAL = General.getInt("DeadLockCheckInterval", 20);
+		RESTART_ON_DEADLOCK = General.getBoolean("RestartOnDeadlock", false);
+		ALLOW_DISCARDITEM = General.getBoolean("AllowDiscardItem", true);
+		AUTODESTROY_ITEM_AFTER = General.getInt("AutoDestroyDroppedItemAfter", 600);
+		HERB_AUTO_DESTROY_TIME = General.getInt("AutoDestroyHerbTime", 60) * 1000;
+		String[] split = General.getString("ListOfProtectedItems", "0").split(",");
+		LIST_PROTECTED_ITEMS = new ArrayList<>(split.length);
+		for (String id : split) {
+			LIST_PROTECTED_ITEMS.add(Integer.parseInt(id));
+		}
+		DATABASE_CLEAN_UP = General.getBoolean("DatabaseCleanUp", true);
+		CONNECTION_CLOSE_TIME = General.getLong("ConnectionCloseTime", 60000);
+		CHAR_STORE_INTERVAL = General.getInt("CharacterDataStoreInterval", 15);
+		LAZY_ITEMS_UPDATE = General.getBoolean("LazyItemsUpdate", false);
+		UPDATE_ITEMS_ON_CHAR_STORE = General.getBoolean("UpdateItemsOnCharStore", false);
+		DESTROY_DROPPED_PLAYER_ITEM = General.getBoolean("DestroyPlayerDroppedItem", false);
+		DESTROY_EQUIPABLE_PLAYER_ITEM = General.getBoolean("DestroyEquipableItem", false);
+		SAVE_DROPPED_ITEM = General.getBoolean("SaveDroppedItem", false);
+		EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = General.getBoolean("EmptyDroppedItemTableAfterLoad", false);
+		SAVE_DROPPED_ITEM_INTERVAL = General.getInt("SaveDroppedItemInterval", 60) * 60000;
+		CLEAR_DROPPED_ITEM_TABLE = General.getBoolean("ClearDroppedItemTable", false);
+		AUTODELETE_INVALID_QUEST_DATA = General.getBoolean("AutoDeleteInvalidQuestData", false);
+		PRECISE_DROP_CALCULATION = General.getBoolean("PreciseDropCalculation", true);
+		MULTIPLE_ITEM_DROP = General.getBoolean("MultipleItemDrop", true);
+		FORCE_INVENTORY_UPDATE = General.getBoolean("ForceInventoryUpdate", false);
+		LAZY_CACHE = General.getBoolean("LazyCache", true);
+		CACHE_CHAR_NAMES = General.getBoolean("CacheCharNames", true);
+		MIN_NPC_ANIMATION = General.getInt("MinNPCAnimation", 10);
+		MAX_NPC_ANIMATION = General.getInt("MaxNPCAnimation", 20);
+		MIN_MONSTER_ANIMATION = General.getInt("MinMonsterAnimation", 5);
+		MAX_MONSTER_ANIMATION = General.getInt("MaxMonsterAnimation", 20);
+		MOVE_BASED_KNOWNLIST = General.getBoolean("MoveBasedKnownlist", false);
+		KNOWNLIST_UPDATE_INTERVAL = General.getLong("KnownListUpdateInterval", 1250);
+		GRIDS_ALWAYS_ON = General.getBoolean("GridsAlwaysOn", false);
+		GRID_NEIGHBOR_TURNON_TIME = General.getInt("GridNeighborTurnOnTime", 1);
+		GRID_NEIGHBOR_TURNOFF_TIME = General.getInt("GridNeighborTurnOffTime", 90);
+		PEACE_ZONE_MODE = General.getInt("PeaceZoneMode", 0);
+		DEFAULT_GLOBAL_CHAT = General.getString("GlobalChat", "ON");
+		DEFAULT_TRADE_CHAT = General.getString("TradeChat", "ON");
+		ALLOW_WAREHOUSE = General.getBoolean("AllowWarehouse", true);
+		WAREHOUSE_CACHE = General.getBoolean("WarehouseCache", false);
+		WAREHOUSE_CACHE_TIME = General.getInt("WarehouseCacheTime", 15);
+		ALLOW_REFUND = General.getBoolean("AllowRefund", true);
+		ALLOW_MAIL = General.getBoolean("AllowMail", true);
+		ALLOW_ATTACHMENTS = General.getBoolean("AllowAttachments", true);
+		ALLOW_WEAR = General.getBoolean("AllowWear", true);
+		WEAR_DELAY = General.getInt("WearDelay", 5);
+		WEAR_PRICE = General.getInt("WearPrice", 10);
+		INSTANCE_FINISH_TIME = 1000 * General.getInt("DefaultFinishTime", 300);
+		RESTORE_PLAYER_INSTANCE = General.getBoolean("RestorePlayerInstance", false);
+		ALLOW_SUMMON_IN_INSTANCE = General.getBoolean("AllowSummonInInstance", false);
+		EJECT_DEAD_PLAYER_TIME = 1000 * General.getInt("EjectDeadPlayerTime", 60);
+		ALLOW_LOTTERY = General.getBoolean("AllowLottery", true);
+		ALLOW_RACE = General.getBoolean("AllowRace", true);
+		ALLOW_WATER = General.getBoolean("AllowWater", true);
+		ALLOW_RENTPET = General.getBoolean("AllowRentPet", false);
+		ALLOWFISHING = General.getBoolean("AllowFishing", true);
+		ALLOW_MANOR = General.getBoolean("AllowManor", true);
+		ALLOW_BOAT = General.getBoolean("AllowBoat", true);
+		BOAT_BROADCAST_RADIUS = General.getInt("BoatBroadcastRadius", 20000);
+		ALLOW_CURSED_WEAPONS = General.getBoolean("AllowCursedWeapons", true);
+		ALLOW_PET_WALKERS = General.getBoolean("AllowPetWalkers", true);
+		SERVER_NEWS = General.getBoolean("ShowServerNews", false);
+		ENABLE_COMMUNITY_BOARD = General.getBoolean("EnableCommunityBoard", true);
+		BBS_DEFAULT = General.getString("BBSDefault", "_bbshome");
+		USE_SAY_FILTER = General.getBoolean("UseChatFilter", false);
+		CHAT_FILTER_CHARS = General.getString("ChatFilterChars", "^_^");
+		String[] propertySplit4 = General.getString("BanChatChannels", "0;1;8;17").trim().split(";");
+		BAN_CHAT_CHANNELS = new int[propertySplit4.length];
+		try {
+			int i = 0;
+			for (String chatId : propertySplit4) {
+				BAN_CHAT_CHANNELS[i++] = Integer.parseInt(chatId);
+			}
+		} catch (NumberFormatException nfe) {
+			LOG.warn("Unable to load banned channels!", nfe);
+		}
+		ALT_MANOR_REFRESH_TIME = General.getInt("AltManorRefreshTime", 20);
+		ALT_MANOR_REFRESH_MIN = General.getInt("AltManorRefreshMin", 0);
+		ALT_MANOR_APPROVE_TIME = General.getInt("AltManorApproveTime", 4);
+		ALT_MANOR_APPROVE_MIN = General.getInt("AltManorApproveMin", 30);
+		ALT_MANOR_MAINTENANCE_MIN = General.getInt("AltManorMaintenanceMin", 6);
+		ALT_MANOR_SAVE_ALL_ACTIONS = General.getBoolean("AltManorSaveAllActions", false);
+		ALT_MANOR_SAVE_PERIOD_RATE = General.getInt("AltManorSavePeriodRate", 2);
+		ALT_LOTTERY_PRIZE = General.getLong("AltLotteryPrize", 50000);
+		ALT_LOTTERY_TICKET_PRICE = General.getLong("AltLotteryTicketPrice", 2000);
+		ALT_LOTTERY_5_NUMBER_RATE = General.getFloat("AltLottery5NumberRate", 0.6f);
+		ALT_LOTTERY_4_NUMBER_RATE = General.getFloat("AltLottery4NumberRate", 0.2f);
+		ALT_LOTTERY_3_NUMBER_RATE = General.getFloat("AltLottery3NumberRate", 0.2f);
+		ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = General.getLong("AltLottery2and1NumberPrize", 200);
+		ALT_ITEM_AUCTION_ENABLED = General.getBoolean("AltItemAuctionEnabled", true);
+		ALT_ITEM_AUCTION_EXPIRED_AFTER = General.getInt("AltItemAuctionExpiredAfter", 14);
+		ALT_ITEM_AUCTION_TIME_EXTENDS_ON_BID = General.getInt("AltItemAuctionTimeExtendsOnBid", 0) * 1000;
+		FS_TIME_ATTACK = General.getInt("TimeOfAttack", 50);
+		FS_TIME_COOLDOWN = General.getInt("TimeOfCoolDown", 5);
+		FS_TIME_ENTRY = General.getInt("TimeOfEntry", 3);
+		FS_TIME_WARMUP = General.getInt("TimeOfWarmUp", 2);
+		FS_PARTY_MEMBER_COUNT = General.getInt("NumberOfNecessaryPartyMembers", 4);
+		if (FS_TIME_ATTACK <= 0) {
+			FS_TIME_ATTACK = 50;
+		}
+		if (FS_TIME_COOLDOWN <= 0) {
+			FS_TIME_COOLDOWN = 5;
+		}
+		if (FS_TIME_ENTRY <= 0) {
+			FS_TIME_ENTRY = 3;
+		}
+		if (FS_TIME_ENTRY <= 0) {
+			FS_TIME_ENTRY = 3;
+		}
+		if (FS_TIME_ENTRY <= 0) {
+			FS_TIME_ENTRY = 3;
+		}
+		RIFT_MIN_PARTY_SIZE = General.getInt("RiftMinPartySize", 5);
+		RIFT_MAX_JUMPS = General.getInt("MaxRiftJumps", 4);
+		RIFT_SPAWN_DELAY = General.getInt("RiftSpawnDelay", 10000);
+		RIFT_AUTO_JUMPS_TIME_MIN = General.getInt("AutoJumpsDelayMin", 480);
+		RIFT_AUTO_JUMPS_TIME_MAX = General.getInt("AutoJumpsDelayMax", 600);
+		RIFT_BOSS_ROOM_TIME_MUTIPLY = General.getFloat("BossRoomTimeMultiply", 1.5f);
+		RIFT_ENTER_COST_RECRUIT = General.getInt("RecruitCost", 18);
+		RIFT_ENTER_COST_SOLDIER = General.getInt("SoldierCost", 21);
+		RIFT_ENTER_COST_OFFICER = General.getInt("OfficerCost", 24);
+		RIFT_ENTER_COST_CAPTAIN = General.getInt("CaptainCost", 27);
+		RIFT_ENTER_COST_COMMANDER = General.getInt("CommanderCost", 30);
+		RIFT_ENTER_COST_HERO = General.getInt("HeroCost", 33);
+		DEFAULT_PUNISH = IllegalActionPunishmentType.findByName(General.getString("DefaultPunish", "KICK"));
+		DEFAULT_PUNISH_PARAM = General.getInt("DefaultPunishParam", 0);
+		ONLY_GM_ITEMS_FREE = General.getBoolean("OnlyGMItemsFree", true);
+		JAIL_IS_PVP = General.getBoolean("JailIsPvp", false);
+		JAIL_DISABLE_CHAT = General.getBoolean("JailDisableChat", true);
+		JAIL_DISABLE_TRANSACTION = General.getBoolean("JailDisableTransaction", false);
+		CUSTOM_SPAWNLIST_TABLE = General.getBoolean("CustomSpawnlistTable", false);
+		SAVE_GMSPAWN_ON_CUSTOM = General.getBoolean("SaveGmSpawnOnCustom", false);
+		CUSTOM_NPC_DATA = General.getBoolean("CustomNpcData", false);
+		CUSTOM_TELEPORT_TABLE = General.getBoolean("CustomTeleportTable", false);
+		CUSTOM_NPCBUFFER_TABLES = General.getBoolean("CustomNpcBufferTables", false);
+		CUSTOM_SKILLS_LOAD = General.getBoolean("CustomSkillsLoad", false);
+		CUSTOM_ITEMS_LOAD = General.getBoolean("CustomItemsLoad", false);
+		CUSTOM_MULTISELL_LOAD = General.getBoolean("CustomMultisellLoad", false);
+		CUSTOM_BUYLIST_LOAD = General.getBoolean("CustomBuyListLoad", false);
+		ALT_BIRTHDAY_GIFT = General.getInt("AltBirthdayGift", 22187);
+		ALT_BIRTHDAY_MAIL_SUBJECT = General.getString("AltBirthdayMailSubject", "Happy Birthday!");
+		ALT_BIRTHDAY_MAIL_TEXT = General.getString("AltBirthdayMailText", "Hello Adventurer!! Seeing as you're one year older now, I thought I would send you some birthday cheer :) Please find your birthday pack attached. May these gifts bring you joy and happiness on this very special day." + EOL
+			+ EOL + "Sincerely, Alegria");
+		ENABLE_BLOCK_CHECKER_EVENT = General.getBoolean("EnableBlockCheckerEvent", false);
+		MIN_BLOCK_CHECKER_TEAM_MEMBERS = General.getInt("BlockCheckerMinTeamMembers", 2);
+		if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1) {
+			MIN_BLOCK_CHECKER_TEAM_MEMBERS = 1;
+		} else if (MIN_BLOCK_CHECKER_TEAM_MEMBERS > 6) {
+			MIN_BLOCK_CHECKER_TEAM_MEMBERS = 6;
+		}
+		HBCE_FAIR_PLAY = General.getBoolean("HBCEFairPlay", false);
+		HELLBOUND_WITHOUT_QUEST = General.getBoolean("HellboundWithoutQuest", false);
+		
+		NORMAL_ENCHANT_COST_MULTIPLIER = General.getInt("NormalEnchantCostMultipiler", 1);
+		SAFE_ENCHANT_COST_MULTIPLIER = General.getInt("SafeEnchantCostMultipiler", 5);
+		
+		BOTREPORT_ENABLE = General.getBoolean("EnableBotReportButton", false);
+		BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":");
+		BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000;
+		BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS = General.getBoolean("AllowReportsFromSameClanMembers", false);
+		ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
+		
+		// Load FloodProtector L2Properties file
+		final PropertiesParser FloodProtectors = new PropertiesParser(FLOOD_PROTECTOR_FILE);
+		
+		loadFloodProtectorConfigs(FloodProtectors);
+		
+		// Load NPC L2Properties file (if exists)
+		final PropertiesParser NPC = new PropertiesParser(NPC_CONFIG_FILE);
+		
+		ANNOUNCE_MAMMON_SPAWN = NPC.getBoolean("AnnounceMammonSpawn", false);
+		ALT_MOB_AGRO_IN_PEACEZONE = NPC.getBoolean("AltMobAgroInPeaceZone", true);
+		ALT_ATTACKABLE_NPCS = NPC.getBoolean("AltAttackableNpcs", true);
+		ALT_GAME_VIEWNPC = NPC.getBoolean("AltGameViewNpc", false);
+		MAX_DRIFT_RANGE = NPC.getInt("MaxDriftRange", 300);
+		DEEPBLUE_DROP_RULES = NPC.getBoolean("UseDeepBlueDropRules", true);
+		DEEPBLUE_DROP_RULES_RAID = NPC.getBoolean("UseDeepBlueDropRulesRaid", true);
+		SHOW_NPC_LVL = NPC.getBoolean("ShowNpcLevel", false);
+		SHOW_CREST_WITHOUT_QUEST = NPC.getBoolean("ShowCrestWithoutQuest", false);
+		ENABLE_RANDOM_ENCHANT_EFFECT = NPC.getBoolean("EnableRandomEnchantEffect", false);
+		MIN_NPC_LVL_DMG_PENALTY = NPC.getInt("MinNPCLevelForDmgPenalty", 78);
+		NPC_DMG_PENALTY = parseConfigLine(NPC.getString("DmgPenaltyForLvLDifferences", "0.7, 0.6, 0.6, 0.55"));
+		NPC_CRIT_DMG_PENALTY = parseConfigLine(NPC.getString("CritDmgPenaltyForLvLDifferences", "0.75, 0.65, 0.6, 0.58"));
+		NPC_SKILL_DMG_PENALTY = parseConfigLine(NPC.getString("SkillDmgPenaltyForLvLDifferences", "0.8, 0.7, 0.65, 0.62"));
+		MIN_NPC_LVL_MAGIC_PENALTY = NPC.getInt("MinNPCLevelForMagicPenalty", 78);
+		NPC_SKILL_CHANCE_PENALTY = parseConfigLine(NPC.getString("SkillChancePenaltyForLvLDifferences", "2.5, 3.0, 3.25, 3.5"));
+		DECAY_TIME_TASK = NPC.getInt("DecayTimeTask", 5000);
+		DEFAULT_CORPSE_TIME = NPC.getInt("DefaultCorpseTime", 7);
+		SPOILED_CORPSE_EXTEND_TIME = NPC.getInt("SpoiledCorpseExtendTime", 10);
+		CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY = NPC.getInt("CorpseConsumeSkillAllowedTimeBeforeDecay", 2000);
+		GUARD_ATTACK_AGGRO_MOB = NPC.getBoolean("GuardAttackAggroMob", false);
+		ALLOW_WYVERN_UPGRADER = NPC.getBoolean("AllowWyvernUpgrader", false);
+		String[] listPetRentNpc = NPC.getString("ListPetRentNpc", "30827").split(",");
+		LIST_PET_RENT_NPC = new ArrayList<>(listPetRentNpc.length);
+		for (String id : listPetRentNpc) {
+			LIST_PET_RENT_NPC.add(Integer.valueOf(id));
+		}
+		RAID_HP_REGEN_MULTIPLIER = NPC.getDouble("RaidHpRegenMultiplier", 100) / 100;
+		RAID_MP_REGEN_MULTIPLIER = NPC.getDouble("RaidMpRegenMultiplier", 100) / 100;
+		RAID_PDEFENCE_MULTIPLIER = NPC.getDouble("RaidPDefenceMultiplier", 100) / 100;
+		RAID_MDEFENCE_MULTIPLIER = NPC.getDouble("RaidMDefenceMultiplier", 100) / 100;
+		RAID_PATTACK_MULTIPLIER = NPC.getDouble("RaidPAttackMultiplier", 100) / 100;
+		RAID_MATTACK_MULTIPLIER = NPC.getDouble("RaidMAttackMultiplier", 100) / 100;
+		RAID_MIN_RESPAWN_MULTIPLIER = NPC.getFloat("RaidMinRespawnMultiplier", 1.0f);
+		RAID_MAX_RESPAWN_MULTIPLIER = NPC.getFloat("RaidMaxRespawnMultiplier", 1.0f);
+		RAID_MINION_RESPAWN_TIMER = NPC.getInt("RaidMinionRespawnTime", 300000);
+		final String[] propertySplit = NPC.getString("CustomMinionsRespawnTime", "").split(";");
+		MINIONS_RESPAWN_TIME = new HashMap<>(propertySplit.length);
+		for (String prop : propertySplit) {
+			String[] propSplit = prop.split(",");
+			if (propSplit.length != 2) {
+				LOG.warn("[CustomMinionsRespawnTime]: invalid config property -> CustomMinionsRespawnTime {}", prop);
+			}
+			
+			try {
+				MINIONS_RESPAWN_TIME.put(Integer.valueOf(propSplit[0]), Integer.valueOf(propSplit[1]));
+			} catch (NumberFormatException nfe) {
+				if (!prop.isEmpty()) {
+					LOG.warn("[CustomMinionsRespawnTime]: invalid config property -> CustomMinionsRespawnTime {}", prop);
+				}
+			}
+		}
+		
+		RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false);
+		RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10);
+		GRAND_CHAOS_TIME = NPC.getInt("GrandChaosTime", 10);
+		MINION_CHAOS_TIME = NPC.getInt("MinionChaosTime", 10);
+		INVENTORY_MAXIMUM_PET = NPC.getInt("MaximumSlotsForPet", 12);
+		PET_HP_REGEN_MULTIPLIER = NPC.getDouble("PetHpRegenMultiplier", 100) / 100;
+		PET_MP_REGEN_MULTIPLIER = NPC.getDouble("PetMpRegenMultiplier", 100) / 100;
+		
+		DROP_ADENA_MIN_LEVEL_DIFFERENCE = NPC.getInt("DropAdenaMinLevelDifference", 8);
+		DROP_ADENA_MAX_LEVEL_DIFFERENCE = NPC.getInt("DropAdenaMaxLevelDifference", 15);
+		DROP_ADENA_MIN_LEVEL_GAP_CHANCE = NPC.getDouble("DropAdenaMinLevelGapChance", 10);
+		
+		DROP_ITEM_MIN_LEVEL_DIFFERENCE = NPC.getInt("DropItemMinLevelDifference", 5);
+		DROP_ITEM_MAX_LEVEL_DIFFERENCE = NPC.getInt("DropItemMaxLevelDifference", 10);
+		DROP_ITEM_MIN_LEVEL_GAP_CHANCE = NPC.getDouble("DropItemMinLevelGapChance", 10);
+		
+		// Load Rates L2Properties file (if exists)
+		final PropertiesParser RatesSettings = new PropertiesParser(RATES_CONFIG_FILE);
+		
+		RATE_XP = RatesSettings.getFloat("RateXp", 1);
+		RATE_SP = RatesSettings.getFloat("RateSp", 1);
+		RATE_PARTY_XP = RatesSettings.getFloat("RatePartyXp", 1);
+		RATE_PARTY_SP = RatesSettings.getFloat("RatePartySp", 1);
+		RATE_EXTRACTABLE = RatesSettings.getFloat("RateExtractable", 1);
+		RATE_DROP_MANOR = RatesSettings.getInt("RateDropManor", 1);
+		RATE_QUEST_DROP = RatesSettings.getFloat("RateQuestDrop", 1);
+		RATE_QUEST_REWARD = RatesSettings.getFloat("RateQuestReward", 1);
+		RATE_QUEST_REWARD_XP = RatesSettings.getFloat("RateQuestRewardXP", 1);
+		RATE_QUEST_REWARD_SP = RatesSettings.getFloat("RateQuestRewardSP", 1);
+		RATE_QUEST_REWARD_ADENA = RatesSettings.getFloat("RateQuestRewardAdena", 1);
+		RATE_QUEST_REWARD_USE_MULTIPLIERS = RatesSettings.getBoolean("UseQuestRewardMultipliers", false);
+		RATE_QUEST_REWARD_POTION = RatesSettings.getFloat("RateQuestRewardPotion", 1);
+		RATE_QUEST_REWARD_SCROLL = RatesSettings.getFloat("RateQuestRewardScroll", 1);
+		RATE_QUEST_REWARD_RECIPE = RatesSettings.getFloat("RateQuestRewardRecipe", 1);
+		RATE_QUEST_REWARD_MATERIAL = RatesSettings.getFloat("RateQuestRewardMaterial", 1);
+		RATE_HB_TRUST_INCREASE = RatesSettings.getFloat("RateHellboundTrustIncrease", 1);
+		RATE_HB_TRUST_DECREASE = RatesSettings.getFloat("RateHellboundTrustDecrease", 1);
+		
+		RATE_VITALITY_LEVEL_1 = RatesSettings.getFloat("RateVitalityLevel1", 1.5f);
+		RATE_VITALITY_LEVEL_2 = RatesSettings.getFloat("RateVitalityLevel2", 2);
+		RATE_VITALITY_LEVEL_3 = RatesSettings.getFloat("RateVitalityLevel3", 2.5f);
+		RATE_VITALITY_LEVEL_4 = RatesSettings.getFloat("RateVitalityLevel4", 3);
+		RATE_RECOVERY_VITALITY_PEACE_ZONE = RatesSettings.getFloat("RateRecoveryPeaceZone", 1);
+		RATE_VITALITY_LOST = RatesSettings.getFloat("RateVitalityLost", 1);
+		RATE_VITALITY_GAIN = RatesSettings.getFloat("RateVitalityGain", 1);
+		RATE_RECOVERY_ON_RECONNECT = RatesSettings.getFloat("RateRecoveryOnReconnect", 4);
+		RATE_KARMA_LOST = RatesSettings.getFloat("RateKarmaLost", -1);
+		if (RATE_KARMA_LOST == -1) {
+			RATE_KARMA_LOST = RATE_XP;
+		}
+		RATE_KARMA_EXP_LOST = RatesSettings.getFloat("RateKarmaExpLost", 1);
+		RATE_SIEGE_GUARDS_PRICE = RatesSettings.getFloat("RateSiegeGuardsPrice", 1);
+		PLAYER_DROP_LIMIT = RatesSettings.getInt("PlayerDropLimit", 3);
+		PLAYER_RATE_DROP = RatesSettings.getInt("PlayerRateDrop", 5);
+		PLAYER_RATE_DROP_ITEM = RatesSettings.getInt("PlayerRateDropItem", 70);
+		PLAYER_RATE_DROP_EQUIP = RatesSettings.getInt("PlayerRateDropEquip", 25);
+		PLAYER_RATE_DROP_EQUIP_WEAPON = RatesSettings.getInt("PlayerRateDropEquipWeapon", 5);
+		PET_XP_RATE = RatesSettings.getFloat("PetXpRate", 1);
+		PET_FOOD_RATE = RatesSettings.getInt("PetFoodRate", 1);
+		SINEATER_XP_RATE = RatesSettings.getFloat("SinEaterXpRate", 1);
+		KARMA_DROP_LIMIT = RatesSettings.getInt("KarmaDropLimit", 10);
+		KARMA_RATE_DROP = RatesSettings.getInt("KarmaRateDrop", 70);
+		KARMA_RATE_DROP_ITEM = RatesSettings.getInt("KarmaRateDropItem", 50);
+		KARMA_RATE_DROP_EQUIP = RatesSettings.getInt("KarmaRateDropEquip", 40);
+		KARMA_RATE_DROP_EQUIP_WEAPON = RatesSettings.getInt("KarmaRateDropEquipWeapon", 10);
+		
+		RATE_DEATH_DROP_AMOUNT_MULTIPLIER = RatesSettings.getFloat("DeathDropAmountMultiplier", 1);
+		RATE_CORPSE_DROP_AMOUNT_MULTIPLIER = RatesSettings.getFloat("CorpseDropAmountMultiplier", 1);
+		RATE_HERB_DROP_AMOUNT_MULTIPLIER = RatesSettings.getFloat("HerbDropAmountMultiplier", 1);
+		RATE_RAID_DROP_AMOUNT_MULTIPLIER = RatesSettings.getFloat("RaidDropAmountMultiplier", 1);
+		RATE_DEATH_DROP_CHANCE_MULTIPLIER = RatesSettings.getFloat("DeathDropChanceMultiplier", 1);
+		RATE_CORPSE_DROP_CHANCE_MULTIPLIER = RatesSettings.getFloat("CorpseDropChanceMultiplier", 1);
+		RATE_HERB_DROP_CHANCE_MULTIPLIER = RatesSettings.getFloat("HerbDropChanceMultiplier", 1);
+		RATE_RAID_DROP_CHANCE_MULTIPLIER = RatesSettings.getFloat("RaidDropChanceMultiplier", 1);
+		String[] dropAmountMultiplier = RatesSettings.getString("DropAmountMultiplierByItemId", "").split(";");
+		RATE_DROP_AMOUNT_MULTIPLIER = new HashMap<>(dropAmountMultiplier.length);
+		if (!dropAmountMultiplier[0].isEmpty()) {
+			for (String item : dropAmountMultiplier) {
+				String[] itemSplit = item.split(",");
+				if (itemSplit.length != 2) {
+					LOG.warn("Config.load(): invalid config property -> RateDropItemsById {}", item);
+				} else {
+					try {
+						RATE_DROP_AMOUNT_MULTIPLIER.put(Integer.valueOf(itemSplit[0]), Float.valueOf(itemSplit[1]));
+					} catch (NumberFormatException nfe) {
+						if (!item.isEmpty()) {
+							LOG.warn("Config.load(): invalid config property -> RateDropItemsById {}", item);
+						}
+					}
+				}
+			}
+		}
+		
+		String[] dropChanceMultiplier = RatesSettings.getString("DropChanceMultiplierByItemId", "").split(";");
+		RATE_DROP_CHANCE_MULTIPLIER = new HashMap<>(dropChanceMultiplier.length);
+		if (!dropChanceMultiplier[0].isEmpty()) {
+			for (String item : dropChanceMultiplier) {
+				String[] itemSplit = item.split(",");
+				if (itemSplit.length != 2) {
+					LOG.warn("Config.load(): invalid config property -> RateDropItemsById {}", item);
+				} else {
+					try {
+						RATE_DROP_CHANCE_MULTIPLIER.put(Integer.valueOf(itemSplit[0]), Float.valueOf(itemSplit[1]));
+					} catch (NumberFormatException nfe) {
+						if (!item.isEmpty()) {
+							LOG.warn("Config.load(): invalid config property -> RateDropItemsById {}", item);
+						}
+					}
+				}
+			}
+		}
+		
+		// Load L2JMod L2Properties file (if exists)
+		final PropertiesParser L2JModSettings = new PropertiesParser(L2JMOD_CONFIG_FILE);
+		
+		L2JMOD_CHAMPION_ENABLE = L2JModSettings.getBoolean("ChampionEnable", false);
+		L2JMOD_CHAMPION_PASSIVE = L2JModSettings.getBoolean("ChampionPassive", false);
+		L2JMOD_CHAMPION_FREQUENCY = L2JModSettings.getInt("ChampionFrequency", -1);
+		L2JMOD_CHAMP_TITLE = L2JModSettings.getString("ChampionTitle", "Champion");
+		L2JMOD_CHAMP_MIN_LVL = L2JModSettings.getInt("ChampionMinLevel", 20);
+		L2JMOD_CHAMP_MAX_LVL = L2JModSettings.getInt("ChampionMaxLevel", 60);
+		L2JMOD_CHAMPION_HP = L2JModSettings.getInt("ChampionHp", 7);
+		L2JMOD_CHAMPION_HP_REGEN = L2JModSettings.getFloat("ChampionHpRegen", 1);
+		L2JMOD_CHAMPION_REWARDS_EXP_SP = L2JModSettings.getFloat("ChampionRewardsExpSp", 8);
+		L2JMOD_CHAMPION_REWARDS_CHANCE = L2JModSettings.getFloat("ChampionRewardsChance", 8);
+		L2JMOD_CHAMPION_REWARDS_AMOUNT = L2JModSettings.getFloat("ChampionRewardsAmount", 1);
+		L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE = L2JModSettings.getFloat("ChampionAdenasRewardsChance", 1);
+		L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT = L2JModSettings.getFloat("ChampionAdenasRewardsAmount", 1);
+		L2JMOD_CHAMPION_ATK = L2JModSettings.getFloat("ChampionAtk", 1);
+		L2JMOD_CHAMPION_SPD_ATK = L2JModSettings.getFloat("ChampionSpdAtk", 1);
+		L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = L2JModSettings.getInt("ChampionRewardLowerLvlItemChance", 0);
+		L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = L2JModSettings.getInt("ChampionRewardHigherLvlItemChance", 0);
+		L2JMOD_CHAMPION_REWARD_ID = L2JModSettings.getInt("ChampionRewardItemID", 6393);
+		L2JMOD_CHAMPION_REWARD_QTY = L2JModSettings.getInt("ChampionRewardItemQty", 1);
+		L2JMOD_CHAMPION_ENABLE_VITALITY = L2JModSettings.getBoolean("ChampionEnableVitality", false);
+		L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = L2JModSettings.getBoolean("ChampionEnableInInstances", false);
+		
+		TVT_EVENT_ENABLED = L2JModSettings.getBoolean("TvTEventEnabled", false);
+		TVT_EVENT_IN_INSTANCE = L2JModSettings.getBoolean("TvTEventInInstance", false);
+		TVT_EVENT_INSTANCE_FILE = L2JModSettings.getString("TvTEventInstanceFile", "coliseum.xml");
+		TVT_EVENT_INTERVAL = L2JModSettings.getString("TvTEventInterval", "20:00").split(",");
+		TVT_EVENT_PARTICIPATION_TIME = L2JModSettings.getInt("TvTEventParticipationTime", 3600);
+		TVT_EVENT_RUNNING_TIME = L2JModSettings.getInt("TvTEventRunningTime", 1800);
+		TVT_EVENT_PARTICIPATION_NPC_ID = L2JModSettings.getInt("TvTEventParticipationNpcId", 0);
+		
+		L2JMOD_ALLOW_WEDDING = L2JModSettings.getBoolean("AllowWedding", false);
+		L2JMOD_WEDDING_PRICE = L2JModSettings.getInt("WeddingPrice", 250000000);
+		L2JMOD_WEDDING_PUNISH_INFIDELITY = L2JModSettings.getBoolean("WeddingPunishInfidelity", true);
+		L2JMOD_WEDDING_TELEPORT = L2JModSettings.getBoolean("WeddingTeleport", true);
+		L2JMOD_WEDDING_TELEPORT_PRICE = L2JModSettings.getInt("WeddingTeleportPrice", 50000);
+		L2JMOD_WEDDING_TELEPORT_DURATION = L2JModSettings.getInt("WeddingTeleportDuration", 60);
+		L2JMOD_WEDDING_SAMESEX = L2JModSettings.getBoolean("WeddingAllowSameSex", false);
+		L2JMOD_WEDDING_FORMALWEAR = L2JModSettings.getBoolean("WeddingFormalWear", true);
+		L2JMOD_WEDDING_DIVORCE_COSTS = L2JModSettings.getInt("WeddingDivorceCosts", 20);
+		
+		L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = L2JModSettings.getBoolean("EnableWarehouseSortingClan", false);
+		L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = L2JModSettings.getBoolean("EnableWarehouseSortingPrivate", false);
+		
+		if (TVT_EVENT_PARTICIPATION_NPC_ID == 0) {
+			TVT_EVENT_ENABLED = false;
+			LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcId");
+		} else {
+			String[] tvtNpcCoords = L2JModSettings.getString("TvTEventParticipationNpcCoordinates", "0,0,0").split(",");
+			if (tvtNpcCoords.length < 3) {
+				TVT_EVENT_ENABLED = false;
+				LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcCoordinates");
+			} else {
+				TVT_EVENT_REWARDS = new ArrayList<>();
+				TVT_DOORS_IDS_TO_OPEN = new ArrayList<>();
+				TVT_DOORS_IDS_TO_CLOSE = new ArrayList<>();
+				TVT_EVENT_PARTICIPATION_NPC_COORDINATES = new int[4];
+				TVT_EVENT_TEAM_1_COORDINATES = new int[3];
+				TVT_EVENT_TEAM_2_COORDINATES = new int[3];
+				TVT_EVENT_PARTICIPATION_NPC_COORDINATES[0] = Integer.parseInt(tvtNpcCoords[0]);
+				TVT_EVENT_PARTICIPATION_NPC_COORDINATES[1] = Integer.parseInt(tvtNpcCoords[1]);
+				TVT_EVENT_PARTICIPATION_NPC_COORDINATES[2] = Integer.parseInt(tvtNpcCoords[2]);
+				if (tvtNpcCoords.length == 4) {
+					TVT_EVENT_PARTICIPATION_NPC_COORDINATES[3] = Integer.parseInt(tvtNpcCoords[3]);
+				}
+				TVT_EVENT_MIN_PLAYERS_IN_TEAMS = L2JModSettings.getInt("TvTEventMinPlayersInTeams", 1);
+				TVT_EVENT_MAX_PLAYERS_IN_TEAMS = L2JModSettings.getInt("TvTEventMaxPlayersInTeams", 20);
+				TVT_EVENT_MIN_LVL = L2JModSettings.getByte("TvTEventMinPlayerLevel", (byte) 1);
+				TVT_EVENT_MAX_LVL = L2JModSettings.getByte("TvTEventMaxPlayerLevel", (byte) 80);
+				TVT_EVENT_RESPAWN_TELEPORT_DELAY = L2JModSettings.getInt("TvTEventRespawnTeleportDelay", 20);
+				TVT_EVENT_START_LEAVE_TELEPORT_DELAY = L2JModSettings.getInt("TvTEventStartLeaveTeleportDelay", 20);
+				TVT_EVENT_EFFECTS_REMOVAL = L2JModSettings.getInt("TvTEventEffectsRemoval", 0);
+				TVT_EVENT_MAX_PARTICIPANTS_PER_IP = L2JModSettings.getInt("TvTEventMaxParticipantsPerIP", 0);
+				TVT_ALLOW_VOICED_COMMAND = L2JModSettings.getBoolean("TvTAllowVoicedInfoCommand", false);
+				TVT_EVENT_TEAM_1_NAME = L2JModSettings.getString("TvTEventTeam1Name", "Team1");
+				tvtNpcCoords = L2JModSettings.getString("TvTEventTeam1Coordinates", "0,0,0").split(",");
+				if (tvtNpcCoords.length < 3) {
+					TVT_EVENT_ENABLED = false;
+					LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam1Coordinates");
+				} else {
+					TVT_EVENT_TEAM_1_COORDINATES[0] = Integer.parseInt(tvtNpcCoords[0]);
+					TVT_EVENT_TEAM_1_COORDINATES[1] = Integer.parseInt(tvtNpcCoords[1]);
+					TVT_EVENT_TEAM_1_COORDINATES[2] = Integer.parseInt(tvtNpcCoords[2]);
+					TVT_EVENT_TEAM_2_NAME = L2JModSettings.getString("TvTEventTeam2Name", "Team2");
+					tvtNpcCoords = L2JModSettings.getString("TvTEventTeam2Coordinates", "0,0,0").split(",");
+					if (tvtNpcCoords.length < 3) {
+						TVT_EVENT_ENABLED = false;
+						LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam2Coordinates");
+					} else {
+						TVT_EVENT_TEAM_2_COORDINATES[0] = Integer.parseInt(tvtNpcCoords[0]);
+						TVT_EVENT_TEAM_2_COORDINATES[1] = Integer.parseInt(tvtNpcCoords[1]);
+						TVT_EVENT_TEAM_2_COORDINATES[2] = Integer.parseInt(tvtNpcCoords[2]);
+						tvtNpcCoords = L2JModSettings.getString("TvTEventParticipationFee", "0,0").split(",");
+						try {
+							TVT_EVENT_PARTICIPATION_FEE[0] = Integer.parseInt(tvtNpcCoords[0]);
+							TVT_EVENT_PARTICIPATION_FEE[1] = Integer.parseInt(tvtNpcCoords[1]);
+						} catch (NumberFormatException nfe) {
+							if (tvtNpcCoords.length > 0) {
+								LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationFee");
+							}
+						}
+						tvtNpcCoords = L2JModSettings.getString("TvTEventReward", "57,100000").split(";");
+						for (String reward : tvtNpcCoords) {
+							String[] rewardSplit = reward.split(",");
+							if (rewardSplit.length != 2) {
+								LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward {}", reward);
+							} else {
+								try {
+									TVT_EVENT_REWARDS.add(new int[] {
+										Integer.parseInt(rewardSplit[0]),
+										Integer.parseInt(rewardSplit[1])
+									});
+								} catch (NumberFormatException nfe) {
+									if (!reward.isEmpty()) {
+										LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward {}", reward);
+									}
+								}
+							}
+						}
+						
+						TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED = L2JModSettings.getBoolean("TvTEventTargetTeamMembersAllowed", true);
+						TVT_EVENT_SCROLL_ALLOWED = L2JModSettings.getBoolean("TvTEventScrollsAllowed", false);
+						TVT_EVENT_POTIONS_ALLOWED = L2JModSettings.getBoolean("TvTEventPotionsAllowed", false);
+						TVT_EVENT_SUMMON_BY_ITEM_ALLOWED = L2JModSettings.getBoolean("TvTEventSummonByItemAllowed", false);
+						TVT_REWARD_TEAM_TIE = L2JModSettings.getBoolean("TvTRewardTeamTie", false);
+						tvtNpcCoords = L2JModSettings.getString("TvTDoorsToOpen", "").split(";");
+						for (String door : tvtNpcCoords) {
+							try {
+								TVT_DOORS_IDS_TO_OPEN.add(Integer.parseInt(door));
+							} catch (NumberFormatException nfe) {
+								if (!door.isEmpty()) {
+									LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTDoorsToOpen {}", door);
+								}
+							}
+						}
+						
+						tvtNpcCoords = L2JModSettings.getString("TvTDoorsToClose", "").split(";");
+						for (String door : tvtNpcCoords) {
+							try {
+								TVT_DOORS_IDS_TO_CLOSE.add(Integer.parseInt(door));
+							} catch (NumberFormatException nfe) {
+								if (!door.isEmpty()) {
+									LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTDoorsToClose {}", door);
+								}
+							}
+						}
+						
+						tvtNpcCoords = L2JModSettings.getString("TvTEventFighterBuffs", "").split(";");
+						if (!tvtNpcCoords[0].isEmpty()) {
+							TVT_EVENT_FIGHTER_BUFFS = new HashMap<>(tvtNpcCoords.length);
+							for (String skill : tvtNpcCoords) {
+								String[] skillSplit = skill.split(",");
+								if (skillSplit.length != 2) {
+									LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventFighterBuffs {}", skill);
+								} else {
+									try {
+										TVT_EVENT_FIGHTER_BUFFS.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+									} catch (NumberFormatException nfe) {
+										if (!skill.isEmpty()) {
+											LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventFighterBuffs {}", skill);
+										}
+									}
+								}
+							}
+						}
+						
+						tvtNpcCoords = L2JModSettings.getString("TvTEventMageBuffs", "").split(";");
+						if (!tvtNpcCoords[0].isEmpty()) {
+							TVT_EVENT_MAGE_BUFFS = new HashMap<>(tvtNpcCoords.length);
+							for (String skill : tvtNpcCoords) {
+								String[] skillSplit = skill.split(",");
+								if (skillSplit.length != 2) {
+									LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventMageBuffs {}", skill);
+								} else {
+									try {
+										TVT_EVENT_MAGE_BUFFS.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+									} catch (NumberFormatException nfe) {
+										if (!skill.isEmpty()) {
+											LOG.warn("TvTEventEngine[Config.load()]: invalid config property -> TvTEventMageBuffs {}", skill);
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+		
+		BANKING_SYSTEM_ENABLED = L2JModSettings.getBoolean("BankingEnabled", false);
+		BANKING_SYSTEM_GOLDBARS = L2JModSettings.getInt("BankingGoldbarCount", 1);
+		BANKING_SYSTEM_ADENA = L2JModSettings.getInt("BankingAdenaCount", 500000000);
+		
+		OFFLINE_TRADE_ENABLE = L2JModSettings.getBoolean("OfflineTradeEnable", false);
+		OFFLINE_CRAFT_ENABLE = L2JModSettings.getBoolean("OfflineCraftEnable", false);
+		OFFLINE_MODE_IN_PEACE_ZONE = L2JModSettings.getBoolean("OfflineModeInPeaceZone", false);
+		OFFLINE_MODE_NO_DAMAGE = L2JModSettings.getBoolean("OfflineModeNoDamage", false);
+		OFFLINE_SET_NAME_COLOR = L2JModSettings.getBoolean("OfflineSetNameColor", false);
+		OFFLINE_NAME_COLOR = Integer.decode("0x" + L2JModSettings.getString("OfflineNameColor", "808080"));
+		OFFLINE_FAME = L2JModSettings.getBoolean("OfflineFame", true);
+		RESTORE_OFFLINERS = L2JModSettings.getBoolean("RestoreOffliners", false);
+		OFFLINE_MAX_DAYS = L2JModSettings.getInt("OfflineMaxDays", 10);
+		OFFLINE_DISCONNECT_FINISHED = L2JModSettings.getBoolean("OfflineDisconnectFinished", true);
+		
+		L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = L2JModSettings.getBoolean("EnableManaPotionSupport", false);
+		
+		L2JMOD_DISPLAY_SERVER_TIME = L2JModSettings.getBoolean("DisplayServerTime", false);
+		
+		WELCOME_MESSAGE_ENABLED = L2JModSettings.getBoolean("ScreenWelcomeMessageEnable", false);
+		WELCOME_MESSAGE_TEXT = L2JModSettings.getString("ScreenWelcomeMessageText", "Welcome to L2J server!");
+		WELCOME_MESSAGE_TIME = L2JModSettings.getInt("ScreenWelcomeMessageTime", 10) * 1000;
+		
+		L2JMOD_ANTIFEED_ENABLE = L2JModSettings.getBoolean("AntiFeedEnable", false);
+		L2JMOD_ANTIFEED_DUALBOX = L2JModSettings.getBoolean("AntiFeedDualbox", true);
+		L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX = L2JModSettings.getBoolean("AntiFeedDisconnectedAsDualbox", true);
+		L2JMOD_ANTIFEED_INTERVAL = L2JModSettings.getInt("AntiFeedInterval", 120) * 1000;
+		ANNOUNCE_PK_PVP = L2JModSettings.getBoolean("AnnouncePkPvP", false);
+		ANNOUNCE_PK_PVP_NORMAL_MESSAGE = L2JModSettings.getBoolean("AnnouncePkPvPNormalMessage", true);
+		ANNOUNCE_PK_MSG = L2JModSettings.getString("AnnouncePkMsg", "$killer has slaughtered $target");
+		ANNOUNCE_PVP_MSG = L2JModSettings.getString("AnnouncePvpMsg", "$killer has defeated $target");
+		
+		L2JMOD_CHAT_ADMIN = L2JModSettings.getBoolean("ChatAdmin", false);
+		
+		L2JMOD_MULTILANG_DEFAULT = L2JModSettings.getString("MultiLangDefault", "en");
+		L2JMOD_MULTILANG_ENABLE = L2JModSettings.getBoolean("MultiLangEnable", false);
+		String[] allowed = L2JModSettings.getString("MultiLangAllowed", L2JMOD_MULTILANG_DEFAULT).split(";");
+		L2JMOD_MULTILANG_ALLOWED = new ArrayList<>(allowed.length);
+		for (String lang : allowed) {
+			L2JMOD_MULTILANG_ALLOWED.add(lang);
+		}
+		
+		if (!L2JMOD_MULTILANG_ALLOWED.contains(L2JMOD_MULTILANG_DEFAULT)) {
+			LOG.warn("MultiLang[Config.load()]: default language: {} is not in allowed list !", L2JMOD_MULTILANG_DEFAULT);
+		}
+		
+		L2JMOD_HELLBOUND_STATUS = L2JModSettings.getBoolean("HellboundStatus", false);
+		L2JMOD_MULTILANG_VOICED_ALLOW = L2JModSettings.getBoolean("MultiLangVoiceCommand", true);
+		L2JMOD_MULTILANG_SM_ENABLE = L2JModSettings.getBoolean("MultiLangSystemMessageEnable", false);
+		allowed = L2JModSettings.getString("MultiLangSystemMessageAllowed", "").split(";");
+		L2JMOD_MULTILANG_SM_ALLOWED = new ArrayList<>(allowed.length);
+		for (String lang : allowed) {
+			if (!lang.isEmpty()) {
+				L2JMOD_MULTILANG_SM_ALLOWED.add(lang);
+			}
+		}
+		L2JMOD_MULTILANG_NS_ENABLE = L2JModSettings.getBoolean("MultiLangNpcStringEnable", false);
+		allowed = L2JModSettings.getString("MultiLangNpcStringAllowed", "").split(";");
+		L2JMOD_MULTILANG_NS_ALLOWED = new ArrayList<>(allowed.length);
+		for (String lang : allowed) {
+			if (!lang.isEmpty()) {
+				L2JMOD_MULTILANG_NS_ALLOWED.add(lang);
+			}
+		}
+		
+		L2WALKER_PROTECTION = L2JModSettings.getBoolean("L2WalkerProtection", false);
+		L2JMOD_DEBUG_VOICE_COMMAND = L2JModSettings.getBoolean("DebugVoiceCommand", false);
+		
+		L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP = L2JModSettings.getInt("DualboxCheckMaxPlayersPerIP", 0);
+		L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP = L2JModSettings.getInt("DualboxCheckMaxOlympiadParticipantsPerIP", 0);
+		L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP = L2JModSettings.getInt("DualboxCheckMaxL2EventParticipantsPerIP", 0);
+		String[] dualboxCheckWhiteList = L2JModSettings.getString("DualboxCheckWhitelist", "127.0.0.1,0").split(";");
+		L2JMOD_DUALBOX_CHECK_WHITELIST = new HashMap<>(dualboxCheckWhiteList.length);
+		for (String entry : dualboxCheckWhiteList) {
+			String[] entrySplit = entry.split(",");
+			if (entrySplit.length != 2) {
+				LOG.warn("DualboxCheck[Config.load()]: invalid config property -> DualboxCheckWhitelist {}", entry);
+			} else {
+				try {
+					int num = Integer.parseInt(entrySplit[1]);
+					num = (num == 0) ? -1 : num;
+					L2JMOD_DUALBOX_CHECK_WHITELIST.put(InetAddress.getByName(entrySplit[0]).hashCode(), num);
+				} catch (UnknownHostException e) {
+					LOG.warn("DualboxCheck[Config.load()]: invalid address -> DualboxCheckWhitelist {}", entrySplit[0]);
+				} catch (NumberFormatException e) {
+					LOG.warn("DualboxCheck[Config.load()]: invalid number -> DualboxCheckWhitelist {}", entrySplit[1]);
+				}
+			}
+		}
+		L2JMOD_ALLOW_CHANGE_PASSWORD = L2JModSettings.getBoolean("AllowChangePassword", false);
+		
+		// Load PvP L2Properties file (if exists)
+		final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE);
+		
+		KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false);
+		KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false);
+		KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5);
+		KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882");
+		KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390");
+		
+		String[] karma = KARMA_NONDROPPABLE_PET_ITEMS.split(",");
+		KARMA_LIST_NONDROPPABLE_PET_ITEMS = new int[karma.length];
+		
+		for (int i = 0; i < karma.length; i++) {
+			KARMA_LIST_NONDROPPABLE_PET_ITEMS[i] = Integer.parseInt(karma[i]);
+		}
+		
+		karma = KARMA_NONDROPPABLE_ITEMS.split(",");
+		KARMA_LIST_NONDROPPABLE_ITEMS = new int[karma.length];
+		
+		for (int i = 0; i < karma.length; i++) {
+			KARMA_LIST_NONDROPPABLE_ITEMS[i] = Integer.parseInt(karma[i]);
+		}
+		
+		// sorting so binarySearch can be used later
+		Arrays.sort(KARMA_LIST_NONDROPPABLE_PET_ITEMS);
+		Arrays.sort(KARMA_LIST_NONDROPPABLE_ITEMS);
+		
+		PVP_NORMAL_TIME = PVPSettings.getInt("PvPVsNormalTime", 120000);
+		PVP_PVP_TIME = PVPSettings.getInt("PvPVsPvPTime", 60000);
+		
+		// Load Olympiad L2Properties file (if exists)
+		final PropertiesParser Olympiad = new PropertiesParser(OLYMPIAD_CONFIG_FILE);
+		
+		ALT_OLY_START_TIME = Olympiad.getInt("AltOlyStartTime", 18);
+		ALT_OLY_MIN = Olympiad.getInt("AltOlyMin", 0);
+		ALT_OLY_MAX_BUFFS = Olympiad.getInt("AltOlyMaxBuffs", 5);
+		ALT_OLY_CPERIOD = Olympiad.getLong("AltOlyCPeriod", 21600000);
+		ALT_OLY_BATTLE = Olympiad.getLong("AltOlyBattle", 300000);
+		ALT_OLY_WPERIOD = Olympiad.getLong("AltOlyWPeriod", 604800000);
+		ALT_OLY_VPERIOD = Olympiad.getLong("AltOlyVPeriod", 86400000);
+		ALT_OLY_START_POINTS = Olympiad.getInt("AltOlyStartPoints", 10);
+		ALT_OLY_WEEKLY_POINTS = Olympiad.getInt("AltOlyWeeklyPoints", 10);
+		ALT_OLY_CLASSED = Olympiad.getInt("AltOlyClassedParticipants", 11);
+		ALT_OLY_NONCLASSED = Olympiad.getInt("AltOlyNonClassedParticipants", 11);
+		ALT_OLY_TEAMS = Olympiad.getInt("AltOlyTeamsParticipants", 6);
+		ALT_OLY_REG_DISPLAY = Olympiad.getInt("AltOlyRegistrationDisplayNumber", 100);
+		ALT_OLY_CLASSED_REWARD = parseItemsList(Olympiad.getString("AltOlyClassedReward", "13722,50"));
+		ALT_OLY_NONCLASSED_REWARD = parseItemsList(Olympiad.getString("AltOlyNonClassedReward", "13722,40"));
+		ALT_OLY_TEAM_REWARD = parseItemsList(Olympiad.getString("AltOlyTeamReward", "13722,85"));
+		ALT_OLY_COMP_RITEM = Olympiad.getInt("AltOlyCompRewItem", 13722);
+		ALT_OLY_MIN_MATCHES = Olympiad.getInt("AltOlyMinMatchesForPoints", 15);
+		ALT_OLY_GP_PER_POINT = Olympiad.getInt("AltOlyGPPerPoint", 1000);
+		ALT_OLY_HERO_POINTS = Olympiad.getInt("AltOlyHeroPoints", 200);
+		ALT_OLY_RANK1_POINTS = Olympiad.getInt("AltOlyRank1Points", 100);
+		ALT_OLY_RANK2_POINTS = Olympiad.getInt("AltOlyRank2Points", 75);
+		ALT_OLY_RANK3_POINTS = Olympiad.getInt("AltOlyRank3Points", 55);
+		ALT_OLY_RANK4_POINTS = Olympiad.getInt("AltOlyRank4Points", 40);
+		ALT_OLY_RANK5_POINTS = Olympiad.getInt("AltOlyRank5Points", 30);
+		ALT_OLY_MAX_POINTS = Olympiad.getInt("AltOlyMaxPoints", 10);
+		ALT_OLY_DIVIDER_CLASSED = Olympiad.getInt("AltOlyDividerClassed", 5);
+		ALT_OLY_DIVIDER_NON_CLASSED = Olympiad.getInt("AltOlyDividerNonClassed", 5);
+		ALT_OLY_MAX_WEEKLY_MATCHES = Olympiad.getInt("AltOlyMaxWeeklyMatches", 70);
+		ALT_OLY_MAX_WEEKLY_MATCHES_NON_CLASSED = Olympiad.getInt("AltOlyMaxWeeklyMatchesNonClassed", 60);
+		ALT_OLY_MAX_WEEKLY_MATCHES_CLASSED = Olympiad.getInt("AltOlyMaxWeeklyMatchesClassed", 30);
+		ALT_OLY_MAX_WEEKLY_MATCHES_TEAM = Olympiad.getInt("AltOlyMaxWeeklyMatchesTeam", 10);
+		ALT_OLY_LOG_FIGHTS = Olympiad.getBoolean("AltOlyLogFights", false);
+		ALT_OLY_SHOW_MONTHLY_WINNERS = Olympiad.getBoolean("AltOlyShowMonthlyWinners", true);
+		ALT_OLY_ANNOUNCE_GAMES = Olympiad.getBoolean("AltOlyAnnounceGames", true);
+		String[] olyRestrictedItems = Olympiad.getString("AltOlyRestrictedItems", "6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,9388,9389,9390,17049,17050,17051,17052,17053,17054,17055,17056,17057,17058,17059,17060,17061,20759,20775,20776,20777,20778,14774").split(",");
+		LIST_OLY_RESTRICTED_ITEMS = new ArrayList<>(olyRestrictedItems.length);
+		for (String id : olyRestrictedItems) {
+			LIST_OLY_RESTRICTED_ITEMS.add(Integer.parseInt(id));
+		}
+		ALT_OLY_ENCHANT_LIMIT = Olympiad.getInt("AltOlyEnchantLimit", -1);
+		ALT_OLY_WAIT_TIME = Olympiad.getInt("AltOlyWaitTime", 120);
+		
+		final File hexIdFile = new File(HEXID_FILE);
+		if (hexIdFile.exists()) {
+			final PropertiesParser hexId = new PropertiesParser(hexIdFile);
+			
+			if (hexId.containskey("ServerID") && hexId.containskey("HexID")) {
+				SERVER_ID = hexId.getInt("ServerID", 1);
+				try {
+					HEX_ID = new BigInteger(hexId.getString("HexID", null), 16).toByteArray();
+				} catch (Exception e) {
+					LOG.warn("Could not load HexID file ({}). Hopefully login will give us one.", HEXID_FILE);
+				}
+			} else {
+				LOG.warn("Could not load HexID file ({}). Hopefully login will give us one.", HEXID_FILE);
+			}
+		} else {
+			LOG.warn("Could not load HexID file ({}). Hopefully login will give us one.", HEXID_FILE);
+		}
+		
+		// Grand bosses
+		final PropertiesParser GrandBossSettings = new PropertiesParser(GRANDBOSS_CONFIG_FILE);
+		
+		ANTHARAS_WAIT_TIME = GrandBossSettings.getInt("AntharasWaitTime", 30);
+		ANTHARAS_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfAntharasSpawn", 264);
+		ANTHARAS_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfAntharasSpawn", 72);
+		
+		VALAKAS_WAIT_TIME = GrandBossSettings.getInt("ValakasWaitTime", 30);
+		VALAKAS_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfValakasSpawn", 264);
+		VALAKAS_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfValakasSpawn", 72);
+		
+		BAIUM_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfBaiumSpawn", 168);
+		BAIUM_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfBaiumSpawn", 48);
+		
+		CORE_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfCoreSpawn", 60);
+		CORE_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfCoreSpawn", 24);
+		
+		ORFEN_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfOrfenSpawn", 48);
+		ORFEN_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfOrfenSpawn", 20);
+		
+		QUEEN_ANT_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfQueenAntSpawn", 36);
+		QUEEN_ANT_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfQueenAntSpawn", 17);
+		
+		BELETH_SPAWN_INTERVAL = GrandBossSettings.getInt("IntervalOfBelethSpawn", 192);
+		BELETH_SPAWN_RANDOM = GrandBossSettings.getInt("RandomOfBelethSpawn", 148);
+		BELETH_MIN_PLAYERS = GrandBossSettings.getInt("BelethMinPlayers", 36);
+		
+		// Gracia Seeds
+		final PropertiesParser GraciaSeedsSettings = new PropertiesParser(GRACIASEEDS_CONFIG_FILE);
+		
+		// Seed of Destruction
+		SOD_TIAT_KILL_COUNT = GraciaSeedsSettings.getInt("TiatKillCountForNextState", 10);
+		SOD_STAGE_2_LENGTH = GraciaSeedsSettings.getLong("Stage2Length", 720) * 60000;
+		
+		try {
+			//@formatter:off
+				FILTER_LIST = Files.lines(Paths.get(CHAT_FILTER_FILE), StandardCharsets.UTF_8)
+					.map(String::trim)
+					.filter(line -> (!line.isEmpty() && (line.charAt(0) != '#')))
+					.collect(Collectors.toList());
+				//@formatter:on
+			LOG.info("Loaded {} filter words.", FILTER_LIST.size());
+		} catch (IOException ioe) {
+			LOG.warn("Error while loading chat filter words!", ioe);
+		}
+		
+		final PropertiesParser ClanHallSiege = new PropertiesParser(CH_SIEGE_FILE);
+		
+		CHS_MAX_ATTACKERS = ClanHallSiege.getInt("MaxAttackers", 500);
+		CHS_CLAN_MINLEVEL = ClanHallSiege.getInt("MinClanLevel", 4);
+		CHS_MAX_FLAGS_PER_CLAN = ClanHallSiege.getInt("MaxFlagsPerClan", 1);
+		CHS_ENABLE_FAME = ClanHallSiege.getBoolean("EnableFame", false);
+		CHS_FAME_AMOUNT = ClanHallSiege.getInt("FameAmount", 0);
+		CHS_FAME_FREQUENCY = ClanHallSiege.getInt("FameFrequency", 0);
+		
+		final PropertiesParser geoData = new PropertiesParser(GEODATA_FILE);
+		
+		try {
+			PATHNODE_DIR = new File(geoData.getString("PathnodeDirectory", "data/pathnode").replaceAll("\\\\", "/")).getCanonicalFile();
+		} catch (IOException e) {
+			LOG.warn("Error setting pathnode directory!", e);
+			PATHNODE_DIR = new File("data/pathnode");
+		}
+		
+		PATHFINDING = geoData.getInt("PathFinding", 0);
+		PATHFIND_BUFFERS = geoData.getString("PathFindBuffers", "100x6;128x6;192x6;256x4;320x4;384x4;500x2");
+		LOW_WEIGHT = geoData.getFloat("LowWeight", 0.5f);
+		MEDIUM_WEIGHT = geoData.getFloat("MediumWeight", 2);
+		HIGH_WEIGHT = geoData.getFloat("HighWeight", 3);
+		ADVANCED_DIAGONAL_STRATEGY = geoData.getBoolean("AdvancedDiagonalStrategy", true);
+		DIAGONAL_WEIGHT = geoData.getFloat("DiagonalWeight", 0.707f);
+		MAX_POSTFILTER_PASSES = geoData.getInt("MaxPostfilterPasses", 3);
+		DEBUG_PATH = geoData.getBoolean("DebugPath", false);
+		FORCE_GEODATA = geoData.getBoolean("ForceGeoData", true);
+		COORD_SYNCHRONIZE = geoData.getInt("CoordSynchronize", -1);
+		GEODATA_PATH = Paths.get(geoData.getString("GeoDataPath", "./data/geodata"));
+		TRY_LOAD_UNSPECIFIED_REGIONS = geoData.getBoolean("TryLoadUnspecifiedRegions", true);
+		GEODATA_REGIONS = new HashMap<>();
+		for (int regionX = L2World.TILE_X_MIN; regionX <= L2World.TILE_X_MAX; regionX++) {
+			for (int regionY = L2World.TILE_Y_MIN; regionY <= L2World.TILE_Y_MAX; regionY++) {
+				String key = regionX + "_" + regionY;
+				if (geoData.containskey(regionX + "_" + regionY)) {
+					GEODATA_REGIONS.put(key, geoData.getBoolean(key, false));
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Set a new value to a config parameter.
+	 * @param pName the name of the parameter whose value to change
+	 * @param pValue the new value of the parameter
+	 * @return {@code true} if the value of the parameter was changed, {@code false} otherwise
+	 */
+	public static boolean setParameterValue(String pName, String pValue) {
+		switch (pName.trim().toLowerCase()) {
+			// rates.properties
+			case "ratexp":
+				RATE_XP = Float.parseFloat(pValue);
+				break;
+			case "ratesp":
+				RATE_SP = Float.parseFloat(pValue);
+				break;
+			case "ratepartyxp":
+				RATE_PARTY_XP = Float.parseFloat(pValue);
+				break;
+			case "rateextractable":
+				RATE_EXTRACTABLE = Float.parseFloat(pValue);
+				break;
+			case "ratedropadena":
+				RATE_DROP_AMOUNT_MULTIPLIER.put(Inventory.ADENA_ID, Float.parseFloat(pValue));
+				break;
+			case "ratedropmanor":
+				RATE_DROP_MANOR = Integer.parseInt(pValue);
+				break;
+			case "ratequestdrop":
+				RATE_QUEST_DROP = Float.parseFloat(pValue);
+				break;
+			case "ratequestreward":
+				RATE_QUEST_REWARD = Float.parseFloat(pValue);
+				break;
+			case "ratequestrewardxp":
+				RATE_QUEST_REWARD_XP = Float.parseFloat(pValue);
+				break;
+			case "ratequestrewardsp":
+				RATE_QUEST_REWARD_SP = Float.parseFloat(pValue);
+				break;
+			case "ratequestrewardadena":
+				RATE_QUEST_REWARD_ADENA = Float.parseFloat(pValue);
+				break;
+			case "usequestrewardmultipliers":
+				RATE_QUEST_REWARD_USE_MULTIPLIERS = Boolean.parseBoolean(pValue);
+				break;
+			case "ratequestrewardpotion":
+				RATE_QUEST_REWARD_POTION = Float.parseFloat(pValue);
+				break;
+			case "ratequestrewardscroll":
+				RATE_QUEST_REWARD_SCROLL = Float.parseFloat(pValue);
+				break;
+			case "ratequestrewardrecipe":
+				RATE_QUEST_REWARD_RECIPE = Float.parseFloat(pValue);
+				break;
+			case "ratequestrewardmaterial":
+				RATE_QUEST_REWARD_MATERIAL = Float.parseFloat(pValue);
+				break;
+			case "ratehellboundtrustincrease":
+				RATE_HB_TRUST_INCREASE = Float.parseFloat(pValue);
+				break;
+			case "ratehellboundtrustdecrease":
+				RATE_HB_TRUST_DECREASE = Float.parseFloat(pValue);
+				break;
+			case "ratevitalitylevel1":
+				RATE_VITALITY_LEVEL_1 = Float.parseFloat(pValue);
+				break;
+			case "ratevitalitylevel2":
+				RATE_VITALITY_LEVEL_2 = Float.parseFloat(pValue);
+				break;
+			case "ratevitalitylevel3":
+				RATE_VITALITY_LEVEL_3 = Float.parseFloat(pValue);
+				break;
+			case "ratevitalitylevel4":
+				RATE_VITALITY_LEVEL_4 = Float.parseFloat(pValue);
+				break;
+			case "raterecoverypeacezone":
+				RATE_RECOVERY_VITALITY_PEACE_ZONE = Float.parseFloat(pValue);
+				break;
+			case "ratevitalitylost":
+				RATE_VITALITY_LOST = Float.parseFloat(pValue);
+				break;
+			case "ratevitalitygain":
+				RATE_VITALITY_GAIN = Float.parseFloat(pValue);
+				break;
+			case "raterecoveryonreconnect":
+				RATE_RECOVERY_ON_RECONNECT = Float.parseFloat(pValue);
+				break;
+			case "ratekarmaexplost":
+				RATE_KARMA_EXP_LOST = Float.parseFloat(pValue);
+				break;
+			case "ratesiegeguardsprice":
+				RATE_SIEGE_GUARDS_PRICE = Float.parseFloat(pValue);
+				break;
+			case "ratecommonherbs":
+				RATE_DROP_COMMON_HERBS = Float.parseFloat(pValue);
+				break;
+			case "ratehpherbs":
+				RATE_DROP_HP_HERBS = Float.parseFloat(pValue);
+				break;
+			case "ratempherbs":
+				RATE_DROP_MP_HERBS = Float.parseFloat(pValue);
+				break;
+			case "ratespecialherbs":
+				RATE_DROP_SPECIAL_HERBS = Float.parseFloat(pValue);
+				break;
+			case "ratevitalityherbs":
+				RATE_DROP_VITALITY_HERBS = Float.parseFloat(pValue);
+				break;
+			case "playerdroplimit":
+				PLAYER_DROP_LIMIT = Integer.parseInt(pValue);
+				break;
+			case "playerratedrop":
+				PLAYER_RATE_DROP = Integer.parseInt(pValue);
+				break;
+			case "playerratedropitem":
+				PLAYER_RATE_DROP_ITEM = Integer.parseInt(pValue);
+				break;
+			case "playerratedropequip":
+				PLAYER_RATE_DROP_EQUIP = Integer.parseInt(pValue);
+				break;
+			case "playerratedropequipweapon":
+				PLAYER_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue);
+				break;
+			case "petxprate":
+				PET_XP_RATE = Float.parseFloat(pValue);
+				break;
+			case "petfoodrate":
+				PET_FOOD_RATE = Integer.parseInt(pValue);
+				break;
+			case "sineaterxprate":
+				SINEATER_XP_RATE = Float.parseFloat(pValue);
+				break;
+			case "karmadroplimit":
+				KARMA_DROP_LIMIT = Integer.parseInt(pValue);
+				break;
+			case "karmaratedrop":
+				KARMA_RATE_DROP = Integer.parseInt(pValue);
+				break;
+			case "karmaratedropitem":
+				KARMA_RATE_DROP_ITEM = Integer.parseInt(pValue);
+				break;
+			case "karmaratedropequip":
+				KARMA_RATE_DROP_EQUIP = Integer.parseInt(pValue);
+				break;
+			case "karmaratedropequipweapon":
+				KARMA_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue);
+				break;
+			case "autodestroydroppeditemafter":
+				AUTODESTROY_ITEM_AFTER = Integer.parseInt(pValue);
+				break;
+			case "destroyplayerdroppeditem":
+				DESTROY_DROPPED_PLAYER_ITEM = Boolean.parseBoolean(pValue);
+				break;
+			case "destroyequipableitem":
+				DESTROY_EQUIPABLE_PLAYER_ITEM = Boolean.parseBoolean(pValue);
+				break;
+			case "savedroppeditem":
+				SAVE_DROPPED_ITEM = Boolean.parseBoolean(pValue);
+				break;
+			case "emptydroppeditemtableafterload":
+				EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = Boolean.parseBoolean(pValue);
+				break;
+			case "savedroppediteminterval":
+				SAVE_DROPPED_ITEM_INTERVAL = Integer.parseInt(pValue);
+				break;
+			case "cleardroppeditemtable":
+				CLEAR_DROPPED_ITEM_TABLE = Boolean.parseBoolean(pValue);
+				break;
+			case "precisedropcalculation":
+				PRECISE_DROP_CALCULATION = Boolean.parseBoolean(pValue);
+				break;
+			case "multipleitemdrop":
+				MULTIPLE_ITEM_DROP = Boolean.parseBoolean(pValue);
+				break;
+			case "lowweight":
+				LOW_WEIGHT = Float.parseFloat(pValue);
+				break;
+			case "mediumweight":
+				MEDIUM_WEIGHT = Float.parseFloat(pValue);
+				break;
+			case "highweight":
+				HIGH_WEIGHT = Float.parseFloat(pValue);
+				break;
+			case "advanceddiagonalstrategy":
+				ADVANCED_DIAGONAL_STRATEGY = Boolean.parseBoolean(pValue);
+				break;
+			case "diagonalweight":
+				DIAGONAL_WEIGHT = Float.parseFloat(pValue);
+				break;
+			case "maxpostfilterpasses":
+				MAX_POSTFILTER_PASSES = Integer.parseInt(pValue);
+				break;
+			case "coordsynchronize":
+				COORD_SYNCHRONIZE = Integer.parseInt(pValue);
+				break;
+			case "deletecharafterdays":
+				DELETE_DAYS = Integer.parseInt(pValue);
+				break;
+			case "clientpacketqueuesize":
+				CLIENT_PACKET_QUEUE_SIZE = Integer.parseInt(pValue);
+				if (CLIENT_PACKET_QUEUE_SIZE == 0) {
+					CLIENT_PACKET_QUEUE_SIZE = MMO_MAX_READ_PER_PASS + 1;
+				}
+				break;
+			case "clientpacketqueuemaxburstsize":
+				CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = Integer.parseInt(pValue);
+				if (CLIENT_PACKET_QUEUE_MAX_BURST_SIZE == 0) {
+					CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = MMO_MAX_READ_PER_PASS;
+				}
+				break;
+			case "clientpacketqueuemaxpacketspersecond":
+				CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND = Integer.parseInt(pValue);
+				break;
+			case "clientpacketqueuemeasureinterval":
+				CLIENT_PACKET_QUEUE_MEASURE_INTERVAL = Integer.parseInt(pValue);
+				break;
+			case "clientpacketqueuemaxaveragepacketspersecond":
+				CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND = Integer.parseInt(pValue);
+				break;
+			case "clientpacketqueuemaxfloodspermin":
+				CLIENT_PACKET_QUEUE_MAX_FLOODS_PER_MIN = Integer.parseInt(pValue);
+				break;
+			case "clientpacketqueuemaxoverflowspermin":
+				CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN = Integer.parseInt(pValue);
+				break;
+			case "clientpacketqueuemaxunderflowspermin":
+				CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN = Integer.parseInt(pValue);
+				break;
+			case "clientpacketqueuemaxunknownpermin":
+				CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = Integer.parseInt(pValue);
+				break;
+			case "allowdiscarditem":
+				ALLOW_DISCARDITEM = Boolean.parseBoolean(pValue);
+				break;
+			case "allowrefund":
+				ALLOW_REFUND = Boolean.parseBoolean(pValue);
+				break;
+			case "allowwarehouse":
+				ALLOW_WAREHOUSE = Boolean.parseBoolean(pValue);
+				break;
+			case "allowwear":
+				ALLOW_WEAR = Boolean.parseBoolean(pValue);
+				break;
+			case "weardelay":
+				WEAR_DELAY = Integer.parseInt(pValue);
+				break;
+			case "wearprice":
+				WEAR_PRICE = Integer.parseInt(pValue);
+				break;
+			case "defaultfinishtime":
+				INSTANCE_FINISH_TIME = Integer.parseInt(pValue);
+				break;
+			case "restoreplayerinstance":
+				RESTORE_PLAYER_INSTANCE = Boolean.parseBoolean(pValue);
+				break;
+			case "allowsummonininstance":
+				ALLOW_SUMMON_IN_INSTANCE = Boolean.parseBoolean(pValue);
+				break;
+			case "ejectdeadplayertime":
+				EJECT_DEAD_PLAYER_TIME = Integer.parseInt(pValue);
+				break;
+			case "allowwater":
+				ALLOW_WATER = Boolean.parseBoolean(pValue);
+				break;
+			case "allowrentpet":
+				ALLOW_RENTPET = Boolean.parseBoolean(pValue);
+				break;
+			case "boatbroadcastradius":
+				BOAT_BROADCAST_RADIUS = Integer.parseInt(pValue);
+				break;
+			case "allowcursedweapons":
+				ALLOW_CURSED_WEAPONS = Boolean.parseBoolean(pValue);
+				break;
+			case "allowmanor":
+				ALLOW_MANOR = Boolean.parseBoolean(pValue);
+				break;
+			case "allowpetwalkers":
+				ALLOW_PET_WALKERS = Boolean.parseBoolean(pValue);
+				break;
+			case "enablecommunityboard":
+				ENABLE_COMMUNITY_BOARD = Boolean.parseBoolean(pValue);
+				break;
+			case "bbsdefault":
+				BBS_DEFAULT = pValue;
+				break;
+			case "showservernews":
+				SERVER_NEWS = Boolean.parseBoolean(pValue);
+				break;
+			case "shownpclevel":
+				SHOW_NPC_LVL = Boolean.parseBoolean(pValue);
+				break;
+			case "showcrestwithoutquest":
+				SHOW_CREST_WITHOUT_QUEST = Boolean.parseBoolean(pValue);
+				break;
+			case "forceinventoryupdate":
+				FORCE_INVENTORY_UPDATE = Boolean.parseBoolean(pValue);
+				break;
+			case "autodeleteinvalidquestdata":
+				AUTODELETE_INVALID_QUEST_DATA = Boolean.parseBoolean(pValue);
+				break;
+			case "maximumonlineusers":
+				MAXIMUM_ONLINE_USERS = Integer.parseInt(pValue);
+				break;
+			case "peacezonemode":
+				PEACE_ZONE_MODE = Integer.parseInt(pValue);
+				break;
+			case "checkknownlist":
+				CHECK_KNOWN = Boolean.parseBoolean(pValue);
+				break;
+			case "maxdriftrange":
+				MAX_DRIFT_RANGE = Integer.parseInt(pValue);
+				break;
+			case "usedeepbluedroprules":
+				DEEPBLUE_DROP_RULES = Boolean.parseBoolean(pValue);
+				break;
+			case "usedeepbluedroprulesraid":
+				DEEPBLUE_DROP_RULES_RAID = Boolean.parseBoolean(pValue);
+				break;
+			case "guardattackaggromob":
+				GUARD_ATTACK_AGGRO_MOB = Boolean.parseBoolean(pValue);
+				break;
+			case "maximumslotsfornodwarf":
+				INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(pValue);
+				break;
+			case "maximumslotsfordwarf":
+				INVENTORY_MAXIMUM_DWARF = Integer.parseInt(pValue);
+				break;
+			case "maximumslotsforgmplayer":
+				INVENTORY_MAXIMUM_GM = Integer.parseInt(pValue);
+				break;
+			case "maximumslotsforquestitems":
+				INVENTORY_MAXIMUM_QUEST_ITEMS = Integer.parseInt(pValue);
+				break;
+			case "maximumwarehouseslotsfornodwarf":
+				WAREHOUSE_SLOTS_NO_DWARF = Integer.parseInt(pValue);
+				break;
+			case "maximumwarehouseslotsfordwarf":
+				WAREHOUSE_SLOTS_DWARF = Integer.parseInt(pValue);
+				break;
+			case "maximumwarehouseslotsforclan":
+				WAREHOUSE_SLOTS_CLAN = Integer.parseInt(pValue);
+				break;
+			case "enchantchanceelementstone":
+				ENCHANT_CHANCE_ELEMENT_STONE = Double.parseDouble(pValue);
+				break;
+			case "enchantchanceelementcrystal":
+				ENCHANT_CHANCE_ELEMENT_CRYSTAL = Double.parseDouble(pValue);
+				break;
+			case "enchantchanceelementjewel":
+				ENCHANT_CHANCE_ELEMENT_JEWEL = Double.parseDouble(pValue);
+				break;
+			case "enchantchanceelementenergy":
+				ENCHANT_CHANCE_ELEMENT_ENERGY = Double.parseDouble(pValue);
+				break;
+			case "augmentationngskillchance":
+				AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "augmentationngglowchance":
+				AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "augmentationmidskillchance":
+				AUGMENTATION_MID_SKILL_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "augmentationmidglowchance":
+				AUGMENTATION_MID_GLOW_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "augmentationhighskillchance":
+				AUGMENTATION_HIGH_SKILL_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "augmentationhighglowchance":
+				AUGMENTATION_HIGH_GLOW_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "augmentationtopskillchance":
+				AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "augmentationtopglowchance":
+				AUGMENTATION_TOP_GLOW_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "augmentationbasestatchance":
+				AUGMENTATION_BASESTAT_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "hpregenmultiplier":
+				HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
+				break;
+			case "mpregenmultiplier":
+				MP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
+				break;
+			case "cpregenmultiplier":
+				CP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
+				break;
+			case "raidhpregenmultiplier":
+				RAID_HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
+				break;
+			case "raidmpregenmultiplier":
+				RAID_MP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
+				break;
+			case "raidpdefencemultiplier":
+				RAID_PDEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100;
+				break;
+			case "raidmdefencemultiplier":
+				RAID_MDEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100;
+				break;
+			case "raidpattackmultiplier":
+				RAID_PATTACK_MULTIPLIER = Double.parseDouble(pValue) / 100;
+				break;
+			case "raidmattackmultiplier":
+				RAID_MATTACK_MULTIPLIER = Double.parseDouble(pValue) / 100;
+				break;
+			case "raidminionrespawntime":
+				RAID_MINION_RESPAWN_TIMER = Integer.parseInt(pValue);
+				break;
+			case "raidchaostime":
+				RAID_CHAOS_TIME = Integer.parseInt(pValue);
+				break;
+			case "grandchaostime":
+				GRAND_CHAOS_TIME = Integer.parseInt(pValue);
+				break;
+			case "minionchaostime":
+				MINION_CHAOS_TIME = Integer.parseInt(pValue);
+				break;
+			case "startingadena":
+				STARTING_ADENA = Long.parseLong(pValue);
+				break;
+			case "startinglevel":
+				STARTING_LEVEL = Byte.parseByte(pValue);
+				break;
+			case "startingsp":
+				STARTING_SP = Integer.parseInt(pValue);
+				break;
+			case "unstuckinterval":
+				UNSTUCK_INTERVAL = Integer.parseInt(pValue);
+				break;
+			case "teleportwatchdogtimeout":
+				TELEPORT_WATCHDOG_TIMEOUT = Integer.parseInt(pValue);
+				break;
+			case "playerspawnprotection":
+				PLAYER_SPAWN_PROTECTION = Integer.parseInt(pValue);
+				break;
+			case "playerfakedeathupprotection":
+				PLAYER_FAKEDEATH_UP_PROTECTION = Integer.parseInt(pValue);
+				break;
+			case "partyxpcutoffmethod":
+				PARTY_XP_CUTOFF_METHOD = pValue;
+				break;
+			case "partyxpcutoffpercent":
+				PARTY_XP_CUTOFF_PERCENT = Double.parseDouble(pValue);
+				break;
+			case "partyxpcutofflevel":
+				PARTY_XP_CUTOFF_LEVEL = Integer.parseInt(pValue);
+				break;
+			case "respawnrestorecp":
+				RESPAWN_RESTORE_CP = Double.parseDouble(pValue) / 100;
+				break;
+			case "respawnrestorehp":
+				RESPAWN_RESTORE_HP = Double.parseDouble(pValue) / 100;
+				break;
+			case "respawnrestoremp":
+				RESPAWN_RESTORE_MP = Double.parseDouble(pValue) / 100;
+				break;
+			case "maxpvtstoresellslotsdwarf":
+				MAX_PVTSTORESELL_SLOTS_DWARF = Integer.parseInt(pValue);
+				break;
+			case "maxpvtstoresellslotsother":
+				MAX_PVTSTORESELL_SLOTS_OTHER = Integer.parseInt(pValue);
+				break;
+			case "maxpvtstorebuyslotsdwarf":
+				MAX_PVTSTOREBUY_SLOTS_DWARF = Integer.parseInt(pValue);
+				break;
+			case "maxpvtstorebuyslotsother":
+				MAX_PVTSTOREBUY_SLOTS_OTHER = Integer.parseInt(pValue);
+				break;
+			case "storeskillcooltime":
+				STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue);
+				break;
+			case "subclassstoreskillcooltime":
+				SUBCLASS_STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue);
+				break;
+			case "announcemammonspawn":
+				ANNOUNCE_MAMMON_SPAWN = Boolean.parseBoolean(pValue);
+				break;
+			case "enablefallingdamage":
+				ENABLE_FALLING_DAMAGE = Boolean.parseBoolean(pValue);
+				break;
+			case "altgamecreation":
+				ALT_GAME_CREATION = Boolean.parseBoolean(pValue);
+				break;
+			case "altgamecreationspeed":
+				ALT_GAME_CREATION_SPEED = Double.parseDouble(pValue);
+				break;
+			case "altgamecreationxprate":
+				ALT_GAME_CREATION_XP_RATE = Double.parseDouble(pValue);
+				break;
+			case "altgamecreationrarexpsprate":
+				ALT_GAME_CREATION_RARE_XPSP_RATE = Double.parseDouble(pValue);
+				break;
+			case "altgamecreationsprate":
+				ALT_GAME_CREATION_SP_RATE = Double.parseDouble(pValue);
+				break;
+			case "altweightlimit":
+				ALT_WEIGHT_LIMIT = Double.parseDouble(pValue);
+				break;
+			case "altblacksmithuserecipes":
+				ALT_BLACKSMITH_USE_RECIPES = Boolean.parseBoolean(pValue);
+				break;
+			case "altgameskilllearn":
+				ALT_GAME_SKILL_LEARN = Boolean.parseBoolean(pValue);
+				break;
+			case "removecastlecirclets":
+				REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(pValue);
+				break;
+			case "reputationscoreperkill":
+				REPUTATION_SCORE_PER_KILL = Integer.parseInt(pValue);
+				break;
+			case "altgamecancelbyhit":
+				ALT_GAME_CANCEL_BOW = pValue.equalsIgnoreCase("bow") || pValue.equalsIgnoreCase("all");
+				ALT_GAME_CANCEL_CAST = pValue.equalsIgnoreCase("cast") || pValue.equalsIgnoreCase("all");
+				break;
+			case "altshieldblocks":
+				ALT_GAME_SHIELD_BLOCKS = Boolean.parseBoolean(pValue);
+				break;
+			case "altperfectshieldblockrate":
+				ALT_PERFECT_SHLD_BLOCK = Integer.parseInt(pValue);
+				break;
+			case "delevel":
+				ALT_GAME_DELEVEL = Boolean.parseBoolean(pValue);
+				break;
+			case "magicfailures":
+				ALT_GAME_MAGICFAILURES = Boolean.parseBoolean(pValue);
+				break;
+			case "altmobagroinpeacezone":
+				ALT_MOB_AGRO_IN_PEACEZONE = Boolean.parseBoolean(pValue);
+				break;
+			case "altgameexponentxp":
+				ALT_GAME_EXPONENT_XP = Float.parseFloat(pValue);
+				break;
+			case "altgameexponentsp":
+				ALT_GAME_EXPONENT_SP = Float.parseFloat(pValue);
+				break;
+			case "allowclassmasters":
+				ALLOW_CLASS_MASTERS = Boolean.parseBoolean(pValue);
+				break;
+			case "allowentiretree":
+				ALLOW_ENTIRE_TREE = Boolean.parseBoolean(pValue);
+				break;
+			case "alternateclassmaster":
+				ALTERNATE_CLASS_MASTER = Boolean.parseBoolean(pValue);
+				break;
+			case "altpartyrange":
+				ALT_PARTY_RANGE = Integer.parseInt(pValue);
+				break;
+			case "altpartyrange2":
+				ALT_PARTY_RANGE2 = Integer.parseInt(pValue);
+				break;
+			case "altleavepartyleader":
+				ALT_LEAVE_PARTY_LEADER = Boolean.parseBoolean(pValue);
+				break;
+			case "craftingenabled":
+				IS_CRAFTING_ENABLED = Boolean.parseBoolean(pValue);
+				break;
+			case "craftmasterwork":
+				CRAFT_MASTERWORK = Boolean.parseBoolean(pValue);
+				break;
+			case "lifecrystalneeded":
+				LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(pValue);
+				break;
+			case "autoloot":
+				AUTO_LOOT = Boolean.parseBoolean(pValue);
+				break;
+			case "autolootraids":
+				AUTO_LOOT_RAIDS = Boolean.parseBoolean(pValue);
+				break;
+			case "autolootherbs":
+				AUTO_LOOT_HERBS = Boolean.parseBoolean(pValue);
+				break;
+			case "altkarmaplayercanbekilledinpeacezone":
+				ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(pValue);
+				break;
+			case "altkarmaplayercanshop":
+				ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.parseBoolean(pValue);
+				break;
+			case "altkarmaplayercanusegk":
+				ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.parseBoolean(pValue);
+				break;
+			case "altkarmaplayercanteleport":
+				ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(pValue);
+				break;
+			case "altkarmaplayercantrade":
+				ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(pValue);
+				break;
+			case "altkarmaplayercanusewarehouse":
+				ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(pValue);
+				break;
+			case "maxpersonalfamepoints":
+				MAX_PERSONAL_FAME_POINTS = Integer.parseInt(pValue);
+				break;
+			case "fortresszonefametaskfrequency":
+				FORTRESS_ZONE_FAME_TASK_FREQUENCY = Integer.parseInt(pValue);
+				break;
+			case "fortresszonefameaquirepoints":
+				FORTRESS_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue);
+				break;
+			case "castlezonefametaskfrequency":
+				CASTLE_ZONE_FAME_TASK_FREQUENCY = Integer.parseInt(pValue);
+				break;
+			case "castlezonefameaquirepoints":
+				CASTLE_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue);
+				break;
+			case "altcastlefordawn":
+				ALT_GAME_CASTLE_DAWN = Boolean.parseBoolean(pValue);
+				break;
+			case "altcastlefordusk":
+				ALT_GAME_CASTLE_DUSK = Boolean.parseBoolean(pValue);
+				break;
+			case "altrequireclancastle":
+				ALT_GAME_REQUIRE_CLAN_CASTLE = Boolean.parseBoolean(pValue);
+				break;
+			case "altfreeteleporting":
+				ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(pValue);
+				break;
+			case "altsubclasswithoutquests":
+				ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(pValue);
+				break;
+			case "altsubclasseverywhere":
+				ALT_GAME_SUBCLASS_EVERYWHERE = Boolean.parseBoolean(pValue);
+				break;
+			case "altmemberscanwithdrawfromclanwh":
+				ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Boolean.parseBoolean(pValue);
+				break;
+			case "dwarfrecipelimit":
+				DWARF_RECIPE_LIMIT = Integer.parseInt(pValue);
+				break;
+			case "commonrecipelimit":
+				COMMON_RECIPE_LIMIT = Integer.parseInt(pValue);
+				break;
+			case "championenable":
+				L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(pValue);
+				break;
+			case "championfrequency":
+				L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(pValue);
+				break;
+			case "championminlevel":
+				L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(pValue);
+				break;
+			case "championmaxlevel":
+				L2JMOD_CHAMP_MAX_LVL = Integer.parseInt(pValue);
+				break;
+			case "championhp":
+				L2JMOD_CHAMPION_HP = Integer.parseInt(pValue);
+				break;
+			case "championhpregen":
+				L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue);
+				break;
+			case "championrewardsexpsp":
+				L2JMOD_CHAMPION_REWARDS_EXP_SP = Float.parseFloat(pValue);
+				break;
+			case "championrewardschance":
+				L2JMOD_CHAMPION_REWARDS_CHANCE = Float.parseFloat(pValue);
+				break;
+			case "championrewardsamount":
+				L2JMOD_CHAMPION_REWARDS_AMOUNT = Float.parseFloat(pValue);
+				break;
+			case "championadenasrewardschance":
+				L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE = Float.parseFloat(pValue);
+				break;
+			case "championadenasrewardsamount":
+				L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT = Float.parseFloat(pValue);
+				break;
+			case "championatk":
+				L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue);
+				break;
+			case "championspdatk":
+				L2JMOD_CHAMPION_SPD_ATK = Float.parseFloat(pValue);
+				break;
+			case "championrewardlowerlvlitemchance":
+				L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "championrewardhigherlvlitemchance":
+				L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
+				break;
+			case "championrewarditemid":
+				L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(pValue);
+				break;
+			case "championrewarditemqty":
+				L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(pValue);
+				break;
+			case "championenableininstances":
+				L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = Boolean.parseBoolean(pValue);
+				break;
+			case "allowwedding":
+				L2JMOD_ALLOW_WEDDING = Boolean.parseBoolean(pValue);
+				break;
+			case "weddingprice":
+				L2JMOD_WEDDING_PRICE = Integer.parseInt(pValue);
+				break;
+			case "weddingpunishinfidelity":
+				L2JMOD_WEDDING_PUNISH_INFIDELITY = Boolean.parseBoolean(pValue);
+				break;
+			case "weddingteleport":
+				L2JMOD_WEDDING_TELEPORT = Boolean.parseBoolean(pValue);
+				break;
+			case "weddingteleportprice":
+				L2JMOD_WEDDING_TELEPORT_PRICE = Integer.parseInt(pValue);
+				break;
+			case "weddingteleportduration":
+				L2JMOD_WEDDING_TELEPORT_DURATION = Integer.parseInt(pValue);
+				break;
+			case "weddingallowsamesex":
+				L2JMOD_WEDDING_SAMESEX = Boolean.parseBoolean(pValue);
+				break;
+			case "weddingformalwear":
+				L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(pValue);
+				break;
+			case "weddingdivorcecosts":
+				L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(pValue);
+				break;
+			case "tvteventenabled":
+				TVT_EVENT_ENABLED = Boolean.parseBoolean(pValue);
+				break;
+			case "tvteventinterval":
+				TVT_EVENT_INTERVAL = pValue.split(",");
+				break;
+			case "tvteventparticipationtime":
+				TVT_EVENT_PARTICIPATION_TIME = Integer.parseInt(pValue);
+				break;
+			case "tvteventrunningtime":
+				TVT_EVENT_RUNNING_TIME = Integer.parseInt(pValue);
+				break;
+			case "tvteventparticipationnpcid":
+				TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(pValue);
+				break;
+			case "enablewarehousesortingclan":
+				L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.parseBoolean(pValue);
+				break;
+			case "enablewarehousesortingprivate":
+				L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.parseBoolean(pValue);
+				break;
+			case "enablemanapotionsupport":
+				L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(pValue);
+				break;
+			case "displayservertime":
+				L2JMOD_DISPLAY_SERVER_TIME = Boolean.parseBoolean(pValue);
+				break;
+			case "antifeedenable":
+				L2JMOD_ANTIFEED_ENABLE = Boolean.parseBoolean(pValue);
+				break;
+			case "antifeeddualbox":
+				L2JMOD_ANTIFEED_DUALBOX = Boolean.parseBoolean(pValue);
+				break;
+			case "antifeeddisconnectedasdualbox":
+				L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX = Boolean.parseBoolean(pValue);
+				break;
+			case "antifeedinterval":
+				L2JMOD_ANTIFEED_INTERVAL = 1000 * Integer.parseInt(pValue);
+				break;
+			case "cangmdropequipment":
+				KARMA_DROP_GM = Boolean.parseBoolean(pValue);
+				break;
+			case "awardpkkillpvppoint":
+				KARMA_AWARD_PK_KILL = Boolean.parseBoolean(pValue);
+				break;
+			case "minimumpkrequiredtodrop":
+				KARMA_PK_LIMIT = Integer.parseInt(pValue);
+				break;
+			case "pvpvsnormaltime":
+				PVP_NORMAL_TIME = Integer.parseInt(pValue);
+				break;
+			case "pvpvspvptime":
+				PVP_PVP_TIME = Integer.parseInt(pValue);
+				break;
+			case "globalchat":
+				DEFAULT_GLOBAL_CHAT = pValue;
+				break;
+			case "tradechat":
+				DEFAULT_TRADE_CHAT = pValue;
+				break;
+			default:
+				try {
+					// TODO: stupid GB configs...
+					if (!pName.startsWith("Interval_") && !pName.startsWith("Random_")) {
+						pName = pName.toUpperCase();
+					}
+					Field clazField = Config.class.getField(pName);
+					int modifiers = clazField.getModifiers();
+					// just in case :)
+					if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers) || Modifier.isFinal(modifiers)) {
+						throw new SecurityException("Cannot modify non public, non static or final config!");
+					}
+					
+					if (clazField.getType() == int.class) {
+						clazField.setInt(clazField, Integer.parseInt(pValue));
+					} else if (clazField.getType() == short.class) {
+						clazField.setShort(clazField, Short.parseShort(pValue));
+					} else if (clazField.getType() == byte.class) {
+						clazField.setByte(clazField, Byte.parseByte(pValue));
+					} else if (clazField.getType() == long.class) {
+						clazField.setLong(clazField, Long.parseLong(pValue));
+					} else if (clazField.getType() == float.class) {
+						clazField.setFloat(clazField, Float.parseFloat(pValue));
+					} else if (clazField.getType() == double.class) {
+						clazField.setDouble(clazField, Double.parseDouble(pValue));
+					} else if (clazField.getType() == boolean.class) {
+						clazField.setBoolean(clazField, Boolean.parseBoolean(pValue));
+					} else if (clazField.getType() == String.class) {
+						clazField.set(clazField, pValue);
+					} else {
+						return false;
+					}
+				} catch (NoSuchFieldException e) {
+					return false;
+				} catch (Exception e) {
+					LOG.warn("Unable to set parameter value!", e);
+					return false;
+				}
+		}
+		return true;
+	}
+	
+	/**
+	 * Save hexadecimal ID of the server in the L2Properties file.<br>
+	 * Check {@link #HEXID_FILE}.
+	 * @param serverId the ID of the server whose hexId to save
+	 * @param hexId the hexadecimal ID to store
+	 */
+	public static void saveHexid(int serverId, String hexId) {
+		Config.saveHexid(serverId, hexId, HEXID_FILE);
+	}
+	
+	/**
+	 * Save hexadecimal ID of the server in the L2Properties file.
+	 * @param serverId the ID of the server whose hexId to save
+	 * @param hexId the hexadecimal ID to store
+	 * @param fileName name of the L2Properties file
+	 */
+	public static void saveHexid(int serverId, String hexId, String fileName) {
+		try {
+			Properties hexSetting = new Properties();
+			File file = new File(fileName);
+			// Create a new empty file only if it doesn't exist
+			file.createNewFile();
+			try (OutputStream out = new FileOutputStream(file)) {
+				hexSetting.setProperty("ServerID", String.valueOf(serverId));
+				hexSetting.setProperty("HexID", hexId);
+				hexSetting.store(out, "the hexID to auth into login");
+			}
+		} catch (Exception e) {
+			LOG.warn("Failed to save hex id to {} file.", fileName, e);
+		}
+	}
+	
+	/**
+	 * Loads flood protector configurations.
+	 * @param properties the properties object containing the actual values of the flood protector configs
+	 */
+	private static void loadFloodProtectorConfigs(final PropertiesParser properties) {
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ITEM, "UseItem", 4);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ROLL_DICE, "RollDice", 42);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_FIREWORK, "Firework", 42);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ITEM_PET_SUMMON, "ItemPetSummon", 16);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_HERO_VOICE, "HeroVoice", 100);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_GLOBAL_CHAT, "GlobalChat", 5);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SUBCLASS, "Subclass", 20);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_DROP_ITEM, "DropItem", 10);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SERVER_BYPASS, "ServerBypass", 5);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MULTISELL, "MultiSell", 1);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_TRANSACTION, "Transaction", 10);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MANUFACTURE, "Manufacture", 3);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MANOR, "Manor", 30);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SENDMAIL, "SendMail", 100);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_CHARACTER_SELECT, "CharacterSelect", 30);
+		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ITEM_AUCTION, "ItemAuction", 9);
+	}
+	
+	/**
+	 * Loads single flood protector configuration.
+	 * @param properties properties file reader
+	 * @param config flood protector configuration instance
+	 * @param configString flood protector configuration string that determines for which flood protector configuration should be read
+	 * @param defaultInterval default flood protector interval
+	 */
+	private static void loadFloodProtectorConfig(final PropertiesParser properties, final FloodProtectorConfig config, final String configString, final int defaultInterval) {
+		config.FLOOD_PROTECTION_INTERVAL = properties.getInt(StringUtil.concat("FloodProtector", configString, "Interval"), defaultInterval);
+		config.LOG_FLOODING = properties.getBoolean(StringUtil.concat("FloodProtector", configString, "LogFlooding"), false);
+		config.PUNISHMENT_LIMIT = properties.getInt(StringUtil.concat("FloodProtector", configString, "PunishmentLimit"), 0);
+		config.PUNISHMENT_TYPE = properties.getString(StringUtil.concat("FloodProtector", configString, "PunishmentType"), "none");
+		config.PUNISHMENT_TIME = properties.getInt(StringUtil.concat("FloodProtector", configString, "PunishmentTime"), 0) * 60000;
+	}
+	
+	public static int getServerTypeId(String[] serverTypes) {
+		int tType = 0;
+		for (String cType : serverTypes) {
+			switch (cType.trim().toLowerCase()) {
+				case "normal":
+					tType |= 0x01;
+					break;
+				case "relax":
+					tType |= 0x02;
+					break;
+				case "test":
+					tType |= 0x04;
+					break;
+				case "nolabel":
+					tType |= 0x08;
+					break;
+				case "restricted":
+					tType |= 0x10;
+					break;
+				case "event":
+					tType |= 0x20;
+					break;
+				case "free":
+					tType |= 0x40;
+					break;
+				default:
+					break;
+			}
+		}
+		return tType;
+	}
+	
+	public static final class ClassMasterSettings {
+		private final Map<Integer, List<ItemHolder>> _claimItems = new HashMap<>(3);
+		private final Map<Integer, List<ItemHolder>> _rewardItems = new HashMap<>(3);
+		private final Map<Integer, Boolean> _allowedClassChange = new HashMap<>(3);
+		
+		public ClassMasterSettings(String configLine) {
+			parseConfigLine(configLine.trim());
+		}
+		
+		private void parseConfigLine(String configLine) {
+			if (configLine.isEmpty()) {
+				return;
+			}
+			
+			final StringTokenizer st = new StringTokenizer(configLine, ";");
+			
+			while (st.hasMoreTokens()) {
+				// get allowed class change
+				final int job = Integer.parseInt(st.nextToken());
+				
+				_allowedClassChange.put(job, true);
+				
+				final List<ItemHolder> requiredItems = new ArrayList<>();
+				// parse items needed for class change
+				if (st.hasMoreTokens()) {
+					final StringTokenizer st2 = new StringTokenizer(st.nextToken(), "[],");
+					
+					while (st2.hasMoreTokens()) {
+						final StringTokenizer st3 = new StringTokenizer(st2.nextToken(), "()");
+						final int itemId = Integer.parseInt(st3.nextToken());
+						final int quantity = Integer.parseInt(st3.nextToken());
+						requiredItems.add(new ItemHolder(itemId, quantity));
+					}
+				}
+				
+				_claimItems.put(job, requiredItems);
+				
+				final List<ItemHolder> rewardItems = new ArrayList<>();
+				// parse gifts after class change
+				if (st.hasMoreTokens()) {
+					final StringTokenizer st2 = new StringTokenizer(st.nextToken(), "[],");
+					
+					while (st2.hasMoreTokens()) {
+						final StringTokenizer st3 = new StringTokenizer(st2.nextToken(), "()");
+						final int itemId = Integer.parseInt(st3.nextToken());
+						final int quantity = Integer.parseInt(st3.nextToken());
+						rewardItems.add(new ItemHolder(itemId, quantity));
+					}
+				}
+				
+				_rewardItems.put(job, rewardItems);
+			}
+		}
+		
+		public boolean isAllowed(int job) {
+			if ((_allowedClassChange == null) || !_allowedClassChange.containsKey(job)) {
+				return false;
+			}
+			return _allowedClassChange.get(job);
+		}
+		
+		public List<ItemHolder> getRewardItems(int job) {
+			return _rewardItems.get(job);
+		}
+		
+		public List<ItemHolder> getRequireItems(int job) {
+			return _claimItems.get(job);
+		}
+	}
+	
+	/**
+	 * @param line the string line to parse
+	 * @return a parsed float map
+	 */
+	private static Map<Integer, Float> parseConfigLine(String line) {
+		String[] propertySplit = line.split(",");
+		Map<Integer, Float> ret = new HashMap<>(propertySplit.length);
+		int i = 0;
+		for (String value : propertySplit) {
+			ret.put(i++, Float.parseFloat(value));
+		}
+		return ret;
+	}
+	
+	/**
+	 * Parse a config value from its string representation to a two-dimensional int array.<br>
+	 * The format of the value to be parsed should be as follows: "item1Id,item1Amount;item2Id,item2Amount;...itemNId,itemNAmount".
+	 * @param line the value of the parameter to parse
+	 * @return the parsed list or {@code null} if nothing was parsed
+	 */
+	private static int[][] parseItemsList(String line) {
+		final String[] propertySplit = line.split(";");
+		if (propertySplit.length == 0) {
+			// nothing to do here
+			return null;
+		}
+		
+		int i = 0;
+		String[] valueSplit;
+		final int[][] result = new int[propertySplit.length][];
+		int[] tmp;
+		for (String value : propertySplit) {
+			valueSplit = value.split(",");
+			if (valueSplit.length != 2) {
+				LOG.warn("parseItemsList[Config.load()]: invalid entry -> {}, should be itemId,itemNumber. Skipping to the next entry in the list.", valueSplit[0]);
+				continue;
+			}
+			
+			tmp = new int[2];
+			try {
+				tmp[0] = Integer.parseInt(valueSplit[0]);
+			} catch (NumberFormatException e) {
+				LOG.warn("parseItemsList[Config.load()]: invalid itemId -> {}, value must be an integer. Skipping to the next entry in the list.", valueSplit[0]);
+				continue;
+			}
+			try {
+				tmp[1] = Integer.parseInt(valueSplit[1]);
+			} catch (NumberFormatException e) {
+				LOG.warn("parseItemsList[Config.load()]: invalid item number -> {}, value must be an integer. Skipping to the next entry in the list.", valueSplit[1]);
+				continue;
+			}
+			result[i++] = tmp;
+		}
+		return result;
+	}
+	
+	private static class IPConfigData implements IXmlReader {
+		
+		private static final List<String> _subnets = new ArrayList<>(5);
+		
+		private static final List<String> _hosts = new ArrayList<>(5);
+		
+		public IPConfigData() {
+			load();
+		}
+		
+		@Override
+		public void load() {
+			GameServer.printSection("Network Configuration");
+			final File f = new File(IP_CONFIG_FILE);
+			if (f.exists()) {
+				LOG.info("Using existing ipconfig.xml.");
+				parseFile(new File(IP_CONFIG_FILE));
+			} else {
+				LOG.info("Using automatic network configuration.");
+				autoIpConfig();
+			}
+		}
+		
+		@Override
+		public void parseDocument(Document doc) {
+			NamedNodeMap attrs;
+			for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) {
+				if ("gameserver".equalsIgnoreCase(n.getNodeName())) {
+					for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) {
+						if ("define".equalsIgnoreCase(d.getNodeName())) {
+							attrs = d.getAttributes();
+							_subnets.add(attrs.getNamedItem("subnet").getNodeValue());
+							_hosts.add(attrs.getNamedItem("address").getNodeValue());
+							
+							if (_hosts.size() != _subnets.size()) {
+								LOG.warn("Failed to load {} file - subnets does not match server addresses.", IP_CONFIG_FILE);
+							}
+						}
+					}
+					
+					Node att = n.getAttributes().getNamedItem("address");
+					if (att == null) {
+						LOG.warn("Failed to load {} file - default server address is missing.", IP_CONFIG_FILE);
+						_hosts.add("127.0.0.1");
+					} else {
+						_hosts.add(att.getNodeValue());
+					}
+					_subnets.add("0.0.0.0/0");
+				}
+			}
+		}
+		
+		protected void autoIpConfig() {
+			String externalIp = "127.0.0.1";
+			try {
+				URL autoIp = new URL("http://ip1.dynupdate.no-ip.com:8245/");
+				try (BufferedReader in = new BufferedReader(new InputStreamReader(autoIp.openStream()))) {
+					externalIp = in.readLine();
+				}
+			} catch (IOException e) {
+				LOG.warn("Failed to connect to api.externalip.net please check your internet connection using 127.0.0.1!");
+				externalIp = "127.0.0.1";
+			}
+			
+			try {
+				Enumeration<NetworkInterface> niList = NetworkInterface.getNetworkInterfaces();
+				
+				while (niList.hasMoreElements()) {
+					NetworkInterface ni = niList.nextElement();
+					
+					if (!ni.isUp() || ni.isVirtual()) {
+						continue;
+					}
+					
+					if (!ni.isLoopback() && ((ni.getHardwareAddress() == null) || (ni.getHardwareAddress().length != 6))) {
+						continue;
+					}
+					
+					for (InterfaceAddress ia : ni.getInterfaceAddresses()) {
+						if (ia.getAddress() instanceof Inet6Address) {
+							continue;
+						}
+						
+						final String hostAddress = ia.getAddress().getHostAddress();
+						final int subnetPrefixLength = ia.getNetworkPrefixLength();
+						final int subnetMaskInt = IntStream.rangeClosed(1, subnetPrefixLength).reduce((r, e) -> (r << 1) + 1).orElse(0) << (32 - subnetPrefixLength);
+						final int hostAddressInt = Arrays.stream(hostAddress.split("\\.")).mapToInt(Integer::parseInt).reduce((r, e) -> (r << 8) + e).orElse(0);
+						final int subnetAddressInt = hostAddressInt & subnetMaskInt;
+						final String subnetAddress = ((subnetAddressInt >> 24) & 0xFF) + "." + ((subnetAddressInt >> 16) & 0xFF) + "." + ((subnetAddressInt >> 8) & 0xFF) + "." + (subnetAddressInt & 0xFF);
+						final String subnet = subnetAddress + '/' + subnetPrefixLength;
+						if (!_subnets.contains(subnet) && !subnet.equals("0.0.0.0/0")) {
+							_subnets.add(subnet);
+							_hosts.add(hostAddress);
+							LOG.info("Adding new subnet: " + subnet + " address: " + hostAddress);
+						}
+					}
+				}
+				
+				// External host and subnet
+				_hosts.add(externalIp);
+				_subnets.add("0.0.0.0/0");
+				LOG.info("Adding new subnet: 0.0.0.0/0 address: {}", externalIp);
+			} catch (SocketException e) {
+				LOG.error("Configuration failed please manually configure ipconfig.xml", e);
+				System.exit(0);
+			}
+		}
+		
+		protected List<String> getSubnets() {
+			if (_subnets.isEmpty()) {
+				return Arrays.asList("0.0.0.0/0");
+			}
+			return _subnets;
+		}
+		
+		protected List<String> getHosts() {
+			if (_hosts.isEmpty()) {
+				return Arrays.asList("127.0.0.1");
+			}
+			return _hosts;
+		}
+	}
+}

+ 1 - 1
src/main/java/com/l2jserver/gameserver/dao/factory/impl/DAOFactory.java

@@ -21,7 +21,7 @@ package com.l2jserver.gameserver.dao.factory.impl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.dao.factory.IDAOFactory;
 
 /**

+ 3 - 5
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ClanDAOMySQLImpl.java

@@ -24,7 +24,7 @@ import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.ClanDAO;
 
 /**
@@ -54,8 +54,7 @@ public class ClanDAOMySQLImpl implements ClanDAO {
 					result.put(rank, rs.getInt("privs"));
 				}
 			}
-		}
-		catch (Exception ex) {
+		} catch (Exception ex) {
 			LOG.error("Unable to restore clan privileges for clan Id {}!", clanId, ex);
 		}
 		return result;
@@ -71,8 +70,7 @@ public class ClanDAOMySQLImpl implements ClanDAO {
 			ps.setInt(4, privileges);
 			ps.setInt(5, privileges);
 			ps.execute();
-		}
-		catch (Exception ex) {
+		} catch (Exception ex) {
 			LOG.error("Unable to store clan privileges for clan Id {}!", clanId, ex);
 		}
 	}

+ 9 - 17
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/FriendDAOMySQLImpl.java

@@ -18,14 +18,12 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.FriendDAO;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
@@ -33,29 +31,23 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  * Friend DAO MySQL implementation.
  * @author Zoey76
  */
-public class FriendDAOMySQLImpl implements FriendDAO
-{
+public class FriendDAOMySQLImpl implements FriendDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(FriendDAOMySQLImpl.class);
 	
 	private static final String SELECT = "SELECT friendId FROM character_friends WHERE charId=? AND relation=0 AND friendId<>charId";
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (ResultSet rs = ps.executeQuery()) {
+				while (rs.next()) {
 					player.addFriend(rs.getInt("friendId"));
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Error found in {} FriendList: ", player, e);
 		}
 	}

+ 26 - 47
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/HennaDAOMySQLImpl.java

@@ -18,14 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.HennaDAO;
 import com.l2jserver.gameserver.data.xml.impl.HennaData;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -35,97 +31,80 @@ import com.l2jserver.gameserver.model.items.L2Henna;
  * Henna DAO MySQL implementation.
  * @author Zoey76
  */
-public class HennaDAOMySQLImpl implements HennaDAO
-{
+public class HennaDAOMySQLImpl implements HennaDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(HennaDAOMySQLImpl.class);
 	
 	private static final String SELECT = "SELECT slot,symbol_id FROM character_hennas WHERE charId=? AND class_index=?";
+	
 	private static final String INSERT = "INSERT INTO character_hennas (charId,symbol_id,slot,class_index) VALUES (?,?,?,?)";
+	
 	private static final String DELETE_ONE = "DELETE FROM character_hennas WHERE charId=? AND slot=? AND class_index=?";
+	
 	private static final String DELETE_ALL = "DELETE FROM character_hennas WHERE charId=? AND class_index=?";
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, player.getClassIndex());
-			try (ResultSet rset = ps.executeQuery())
-			{
+			try (var rset = ps.executeQuery()) {
 				final L2Henna[] henna = new L2Henna[3];
-				while (rset.next())
-				{
+				while (rset.next()) {
 					int slot = rset.getInt("slot");
-					if ((slot < 1) || (slot > 3))
-					{
+					if ((slot < 1) || (slot > 3)) {
 						continue;
 					}
 					
 					int symbolId = rset.getInt("symbol_id");
-					if (symbolId == 0)
-					{
+					if (symbolId == 0) {
 						continue;
 					}
 					henna[slot - 1] = HennaData.getInstance().getHenna(symbolId);
 				}
 				player.setHenna(henna);
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed restoing character {} hennas. {}", player, e);
 		}
 	}
 	
 	@Override
-	public void insert(L2PcInstance player, L2Henna henna, int slot)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+	public void insert(L2PcInstance player, L2Henna henna, int slot) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, henna.getDyeId());
 			ps.setInt(3, slot);
 			ps.setInt(4, player.getClassIndex());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed saving character henna. {}", e);
 		}
 	}
 	
 	@Override
-	public void delete(L2PcInstance player, int slot)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE_ONE))
-		{
+	public void delete(L2PcInstance player, int slot) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE_ONE)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, slot);
 			ps.setInt(3, player.getClassIndex());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed removing character henna. {}", e);
 		}
 	}
 	
 	@Override
-	public void deleteAll(L2PcInstance player, int classIndex)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE_ALL))
-		{
+	public void deleteAll(L2PcInstance player, int classIndex) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE_ALL)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, classIndex);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed removing character henna. {}", e);
 		}
 	}

+ 8 - 17
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ItemDAOMySQLImpl.java

@@ -18,14 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.ItemDAO;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
@@ -33,26 +29,21 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  * Item DAO MySQL implementation.
  * @author Zoey76
  */
-public class ItemDAOMySQLImpl implements ItemDAO
-{
+public class ItemDAOMySQLImpl implements ItemDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(ItemDAOMySQLImpl.class);
 	
 	private static final String SELECT = "SELECT object_id FROM `items` WHERE `owner_id`=? AND (`loc`='PET' OR `loc`='PET_EQUIP') LIMIT 1;";
 	
 	@Override
-	public void loadPetInventory(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void loadPetInventory(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
-			try (ResultSet rs = ps.executeQuery())
-			{
+			try (var rs = ps.executeQuery()) {
 				player.setPetInvItems(rs.next() && (rs.getInt("object_id") > 0));
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not check Items in Pet Inventory for {}, {}", player, e);
 		}
 	}

+ 28 - 53
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ItemReuseDAOMySQLImpl.java

@@ -18,15 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.Map;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.ItemReuseDAO;
 import com.l2jserver.gameserver.model.TimeStamp;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -37,44 +32,37 @@ import com.l2jserver.gameserver.network.serverpackets.ExUseSharedGroupItem;
  * Item Reuse DAO MySQL implementation.
  * @author Zoey76
  */
-public class ItemReuseDAOMySQLImpl implements ItemReuseDAO
-{
+public class ItemReuseDAOMySQLImpl implements ItemReuseDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(ItemReuseDAOMySQLImpl.class);
 	
 	private static final String INSERT = "INSERT INTO character_item_reuse_save (charId,itemId,itemObjId,reuseDelay,systime) VALUES (?,?,?,?,?)";
+	
 	private static final String SELECT = "SELECT charId,itemId,itemObjId,reuseDelay,systime FROM character_item_reuse_save WHERE charId=?";
+	
 	private static final String DELETE = "DELETE FROM character_item_reuse_save WHERE charId=?";
 	
 	@Override
-	public void delete(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE))
-		{
+	public void delete(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE)) {
 			ps.setInt(1, player.getObjectId());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not delete player's {} item reuse data!", player, e);
 		}
 	}
 	
 	@Override
-	public void insert(L2PcInstance player)
-	{
+	public void insert(L2PcInstance player) {
 		delete(player);
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
-			final Map<Integer, TimeStamp> itemReuseTimeStamps = player.getItemReuseTimeStamps();
-			if (itemReuseTimeStamps != null)
-			{
-				for (TimeStamp ts : itemReuseTimeStamps.values())
-				{
-					if ((ts != null) && ts.hasNotPassed())
-					{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
+			final var itemReuseTimeStamps = player.getItemReuseTimeStamps();
+			if (itemReuseTimeStamps != null) {
+				for (TimeStamp ts : itemReuseTimeStamps.values()) {
+					if ((ts != null) && ts.hasNotPassed()) {
 						ps.setInt(1, player.getObjectId());
 						ps.setInt(2, ts.getItemId());
 						ps.setInt(3, ts.getItemObjectId());
@@ -85,24 +73,18 @@ public class ItemReuseDAOMySQLImpl implements ItemReuseDAO
 				}
 				ps.executeBatch();
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not store player's {} item reuse data!", player, e);
 		}
 	}
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					final int itemId = rs.getInt("itemId");
 					final long reuseDelay = rs.getLong("reuseDelay");
 					final long systime = rs.getLong("systime");
@@ -110,25 +92,20 @@ public class ItemReuseDAOMySQLImpl implements ItemReuseDAO
 					
 					// Using item Id
 					L2ItemInstance item = player.getInventory().getItemByItemId(itemId);
-					if (item == null)
-					{
+					if (item == null) {
 						item = player.getWarehouse().getItemByItemId(itemId);
 						isInInventory = false;
 					}
 					
-					if ((item != null) && (item.getId() == itemId) && (item.getReuseDelay() > 0))
-					{
+					if ((item != null) && (item.getId() == itemId) && (item.getReuseDelay() > 0)) {
 						long remainingTime = systime - System.currentTimeMillis();
 						// Hardcoded to 10 seconds.
-						if (remainingTime > 10)
-						{
+						if (remainingTime > 10) {
 							player.addTimeStampItem(item, reuseDelay, systime);
 							
-							if (isInInventory && item.isEtcItem())
-							{
+							if (isInInventory && item.isEtcItem()) {
 								final int group = item.getSharedReuseGroup();
-								if (group > 0)
-								{
+								if (group > 0) {
 									player.sendPacket(new ExUseSharedGroupItem(itemId, group, (int) remainingTime, (int) reuseDelay));
 								}
 							}
@@ -139,9 +116,7 @@ public class ItemReuseDAOMySQLImpl implements ItemReuseDAO
 			
 			// Deletes item reuse.
 			delete(player);
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore {} Item Reuse data: {}", player, e);
 		}
 	}

+ 26 - 53
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PetDAOMySQLImpl.java

@@ -18,14 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.PetDAO;
 import com.l2jserver.gameserver.data.xml.impl.PetDataTable;
 import com.l2jserver.gameserver.model.L2PetLevelData;
@@ -38,8 +34,8 @@ import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
  * Pet DAO MySQL implementation.
  * @author Zoey76
  */
-public class PetDAOMySQLImpl implements PetDAO
-{
+public class PetDAOMySQLImpl implements PetDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(PetDAOMySQLImpl.class);
 	
 	private static final String UPDATE_FOOD = "UPDATE pets SET fed=? WHERE item_obj_id=?";
@@ -51,52 +47,39 @@ public class PetDAOMySQLImpl implements PetDAO
 	private static final String UPDATE = "UPDATE pets SET name=?,level=?,curHp=?,curMp=?,exp=?,sp=?,fed=?,ownerId=?,restore=? WHERE item_obj_id=?";
 	
 	@Override
-	public void updateFood(L2PcInstance player, int petId)
-	{
-		if ((player.getControlItemId() != 0) && (petId != 0))
-		{
-			try (Connection con = ConnectionFactory.getInstance().getConnection();
-				PreparedStatement ps = con.prepareStatement(UPDATE_FOOD))
-			{
+	public void updateFood(L2PcInstance player, int petId) {
+		if ((player.getControlItemId() != 0) && (petId != 0)) {
+			try (var con = ConnectionFactory.getInstance().getConnection();
+				var ps = con.prepareStatement(UPDATE_FOOD)) {
 				ps.setInt(1, player.getCurrentFeed());
 				ps.setInt(2, player.getControlItemId());
 				ps.executeUpdate();
 				player.setControlItemId(0);
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				LOG.error("Failed to store Pet [NpcId: {}] data {}", petId, e);
 			}
 		}
 	}
 	
 	@Override
-	public void delete(L2PetInstance pet)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE))
-		{
+	public void delete(L2PetInstance pet) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE)) {
 			ps.setInt(1, pet.getControlObjectId());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed to delete pet {}!", pet, e);
 		}
 	}
 	
 	@Override
-	public L2PetInstance load(L2ItemInstance control, L2NpcTemplate template, L2PcInstance owner)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT item_obj_id, name, level, curHp, curMp, exp, sp, fed FROM pets WHERE item_obj_id=?"))
-		{
+	public L2PetInstance load(L2ItemInstance control, L2NpcTemplate template, L2PcInstance owner) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT item_obj_id, name, level, curHp, curMp, exp, sp, fed FROM pets WHERE item_obj_id=?")) {
 			ps.setInt(1, control.getObjectId());
-			try (ResultSet rset = ps.executeQuery())
-			{
+			try (var rset = ps.executeQuery()) {
 				L2PetInstance pet;
-				if (!rset.next())
-				{
+				if (!rset.next()) {
 					return new L2PetInstance(template, owner, control);
 				}
 				
@@ -108,8 +91,7 @@ public class PetDAOMySQLImpl implements PetDAO
 				L2PetLevelData info = PetDataTable.getInstance().getPetLevelData(pet.getId(), pet.getLevel());
 				// DS: update experience based by level
 				// Avoiding pet delevels due to exp per level values changed.
-				if ((info != null) && (exp < info.getPetMaxExp()))
-				{
+				if ((info != null) && (exp < info.getPetMaxExp())) {
 					exp = info.getPetMaxExp();
 				}
 				
@@ -119,8 +101,7 @@ public class PetDAOMySQLImpl implements PetDAO
 				pet.getStatus().setCurrentHp(rset.getInt("curHp"));
 				pet.getStatus().setCurrentMp(rset.getInt("curMp"));
 				pet.getStatus().setCurrentCp(pet.getMaxCp());
-				if (rset.getDouble("curHp") < 1)
-				{
+				if (rset.getDouble("curHp") < 1) {
 					pet.setIsDead(true);
 					pet.stopHpMpRegeneration();
 				}
@@ -128,31 +109,25 @@ public class PetDAOMySQLImpl implements PetDAO
 				pet.setCurrentFed(rset.getInt("fed"));
 				return pet;
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore pet data for owner: {}, {}", owner, e);
 		}
 		return null;
 	}
 	
 	@Override
-	public void insert(L2PetInstance pet)
-	{
+	public void insert(L2PetInstance pet) {
 		insertOrUpdate(pet, INSERT);
 	}
 	
 	@Override
-	public void update(L2PetInstance pet)
-	{
+	public void update(L2PetInstance pet) {
 		insertOrUpdate(pet, UPDATE);
 	}
 	
-	private static void insertOrUpdate(L2PetInstance pet, String query)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(query))
-		{
+	private static void insertOrUpdate(L2PetInstance pet, String query) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(query)) {
 			ps.setString(1, pet.getName());
 			ps.setInt(2, pet.getLevel());
 			ps.setDouble(3, pet.getStatus().getCurrentHp());
@@ -164,9 +139,7 @@ public class PetDAOMySQLImpl implements PetDAO
 			ps.setString(9, String.valueOf(pet.isRestoreSummon())); // True restores pet on login
 			ps.setInt(10, pet.getControlObjectId());
 			ps.executeUpdate();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed to store pet {} data!", pet, e);
 		}
 	}

+ 29 - 49
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PetSkillSaveDAOMySQL.java

@@ -18,17 +18,14 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import java.util.LinkedList;
 import java.util.List;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.dao.PetSkillSaveDAO;
 import com.l2jserver.gameserver.data.sql.impl.SummonEffectsTable;
 import com.l2jserver.gameserver.datatables.SkillData;
@@ -42,20 +39,21 @@ import com.l2jserver.gameserver.model.skills.Skill;
  * Pet Skill Save MySQL implementation.
  * @author Zoey76
  */
-public class PetSkillSaveDAOMySQL implements PetSkillSaveDAO
-{
+public class PetSkillSaveDAOMySQL implements PetSkillSaveDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(PetSkillSaveDAOMySQL.class);
+	
 	private static final String ADD_SKILL_SAVE = "INSERT INTO character_pet_skills_save (petObjItemId,skill_id,skill_level,remaining_time,buff_index) VALUES (?,?,?,?,?)";
+	
 	private static final String RESTORE_SKILL_SAVE = "SELECT petObjItemId,skill_id,skill_level,remaining_time,buff_index FROM character_pet_skills_save WHERE petObjItemId=? ORDER BY buff_index ASC";
+	
 	private static final String DELETE_SKILL_SAVE = "DELETE FROM character_pet_skills_save WHERE petObjItemId=?";
 	
 	@Override
-	public void insert(L2PetInstance pet, boolean storeEffects)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps1 = con.prepareStatement(DELETE_SKILL_SAVE);
-			PreparedStatement ps2 = con.prepareStatement(ADD_SKILL_SAVE))
-		{
+	public void insert(L2PetInstance pet, boolean storeEffects) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps1 = con.prepareStatement(DELETE_SKILL_SAVE);
+			var ps2 = con.prepareStatement(ADD_SKILL_SAVE)) {
 			// Delete all current stored effects for summon to avoid dupe
 			ps1.setInt(1, pet.getControlObjectId());
 			ps1.execute();
@@ -65,35 +63,28 @@ public class PetSkillSaveDAOMySQL implements PetSkillSaveDAO
 			final List<Integer> storedSkills = new LinkedList<>();
 			
 			// Store all effect data along with calculated remaining
-			if (storeEffects)
-			{
-				for (BuffInfo info : pet.getEffectList().getEffects())
-				{
-					if (info == null)
-					{
+			if (storeEffects) {
+				for (BuffInfo info : pet.getEffectList().getEffects()) {
+					if (info == null) {
 						continue;
 					}
 					
 					final Skill skill = info.getSkill();
 					// Do not save heals.
-					if (skill.getAbnormalType() == AbnormalType.LIFE_FORCE_OTHERS)
-					{
+					if (skill.getAbnormalType() == AbnormalType.LIFE_FORCE_OTHERS) {
 						continue;
 					}
 					
-					if (skill.isToggle())
-					{
+					if (skill.isToggle()) {
 						continue;
 					}
 					
 					// Dances and songs are not kept in retail.
-					if (skill.isDance() && !Config.ALT_STORE_DANCES)
-					{
+					if (skill.isDance() && !Config.ALT_STORE_DANCES) {
 						continue;
 					}
 					
-					if (storedSkills.contains(skill.getReuseHashCode()))
-					{
+					if (storedSkills.contains(skill.getReuseHashCode())) {
 						continue;
 					}
 					
@@ -109,37 +100,28 @@ public class PetSkillSaveDAOMySQL implements PetSkillSaveDAO
 					SummonEffectsTable.getInstance().addPetEffect(pet.getControlObjectId(), skill, info.getTime());
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not store pet effect data!", e);
 		}
 	}
 	
 	@Override
-	public void load(L2PetInstance pet)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps1 = con.prepareStatement(RESTORE_SKILL_SAVE);
-			PreparedStatement ps2 = con.prepareStatement(DELETE_SKILL_SAVE))
-		{
-			if (!SummonEffectsTable.getInstance().containsPetId(pet.getControlObjectId()))
-			{
+	public void load(L2PetInstance pet) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps1 = con.prepareStatement(RESTORE_SKILL_SAVE);
+			var ps2 = con.prepareStatement(DELETE_SKILL_SAVE)) {
+			if (!SummonEffectsTable.getInstance().containsPetId(pet.getControlObjectId())) {
 				ps1.setInt(1, pet.getControlObjectId());
-				try (ResultSet rs = ps1.executeQuery())
-				{
-					while (rs.next())
-					{
+				try (var rs = ps1.executeQuery()) {
+					while (rs.next()) {
 						int effectCurTime = rs.getInt("remaining_time");
 						
 						final Skill skill = SkillData.getInstance().getSkill(rs.getInt("skill_id"), rs.getInt("skill_level"));
-						if (skill == null)
-						{
+						if (skill == null) {
 							continue;
 						}
 						
-						if (skill.hasEffects(EffectScope.GENERAL))
-						{
+						if (skill.hasEffects(EffectScope.GENERAL)) {
 							SummonEffectsTable.getInstance().addPetEffect(pet.getControlObjectId(), skill, effectCurTime);
 						}
 					}
@@ -148,9 +130,7 @@ public class PetSkillSaveDAOMySQL implements PetSkillSaveDAO
 			
 			ps2.setInt(1, pet.getControlObjectId());
 			ps2.executeUpdate();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not restore {} active effect data!", pet, e);
 		}
 	}

+ 46 - 87
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PlayerDAOMySQLImpl.java

@@ -18,15 +18,12 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import java.sql.Timestamp;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.PlayerDAO;
 import com.l2jserver.gameserver.dao.factory.impl.DAOFactory;
 import com.l2jserver.gameserver.data.sql.impl.ClanTable;
@@ -42,29 +39,29 @@ import com.l2jserver.gameserver.model.entity.Hero;
  * Player DAO MySQL implementation.
  * @author Zoey76
  */
-public class PlayerDAOMySQLImpl implements PlayerDAO
-{
+public class PlayerDAOMySQLImpl implements PlayerDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(PlayerDAOMySQLImpl.class);
 	
 	private static final String INSERT = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createDate) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+	
 	private static final String SELECT = "SELECT * FROM characters WHERE charId=?";
+	
 	private static final String UPDATE = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=? WHERE charId=?";
+	
 	private static final String UPDATE_ONLINE = "UPDATE characters SET online=?, lastAccess=? WHERE charId=?";
+	
 	private static final String SELECT_CHARACTERS = "SELECT charId, char_name FROM characters WHERE account_name=? AND charId<>?";
 	
 	@Override
-	public L2PcInstance load(int objectId)
-	{
+	public L2PcInstance load(int objectId) {
 		L2PcInstance player = null;
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			// Retrieve the L2PcInstance from the characters table of the database
 			ps.setInt(1, objectId);
-			try (ResultSet rset = ps.executeQuery())
-			{
-				if (rset.next())
-				{
+			try (var rset = ps.executeQuery()) {
+				if (rset.next()) {
 					final int activeClassId = rset.getInt("classid");
 					final boolean female = rset.getInt("sex") != Sex.MALE.ordinal();
 					PcAppearance app = new PcAppearance(rset.getByte("face"), rset.getByte("hairColor"), rset.getByte("hairStyle"), female);
@@ -87,13 +84,11 @@ public class PlayerDAOMySQLImpl implements PlayerDAO
 					player.setNoble(rset.getInt("nobless") == 1);
 					
 					player.setClanJoinExpiryTime(rset.getLong("clan_join_expiry_time"));
-					if (player.getClanJoinExpiryTime() < System.currentTimeMillis())
-					{
+					if (player.getClanJoinExpiryTime() < System.currentTimeMillis()) {
 						player.setClanJoinExpiryTime(0);
 					}
 					player.setClanCreateExpiryTime(rset.getLong("clan_create_expiry_time"));
-					if (player.getClanCreateExpiryTime() < System.currentTimeMillis())
-					{
+					if (player.getClanCreateExpiryTime() < System.currentTimeMillis()) {
 						player.setClanCreateExpiryTime(0);
 					}
 					
@@ -117,27 +112,21 @@ public class PlayerDAOMySQLImpl implements PlayerDAO
 					// Restore Subclass Data (cannot be done earlier in function)
 					DAOFactory.getInstance().getSubclassDAO().load(player);
 					
-					if (activeClassId != player.getBaseClass())
-					{
-						for (SubClass subClass : player.getSubClasses().values())
-						{
-							if (subClass.getClassId() == activeClassId)
-							{
+					if (activeClassId != player.getBaseClass()) {
+						for (SubClass subClass : player.getSubClasses().values()) {
+							if (subClass.getClassId() == activeClassId) {
 								player.setClassIndex(subClass.getClassIndex());
 							}
 						}
 					}
 					
-					if ((player.getClassIndex() == 0) && (activeClassId != player.getBaseClass()))
-					{
+					if ((player.getClassIndex() == 0) && (activeClassId != player.getBaseClass())) {
 						// Subclass in use but doesn't exist in DB -
 						// a possible restart-while-modify-subclass cheat has been attempted.
 						// Switching to use base class
 						player.setClassId(player.getBaseClass());
 						LOG.warn("{} reverted to base class. Possibly has tried a relogin exploit while subclassing.", player);
-					}
-					else
-					{
+					} else {
 						player.setActiveClass(activeClassId);
 					}
 					
@@ -169,32 +158,23 @@ public class PlayerDAOMySQLImpl implements PlayerDAO
 					
 					player.setClan(ClanTable.getInstance().getClan(rset.getInt("clanid")));
 					
-					if (player.getClan() != null)
-					{
-						if (player.getClan().getLeaderId() != player.getObjectId())
-						{
-							if (player.getPowerGrade() == 0)
-							{
+					if (player.getClan() != null) {
+						if (player.getClan().getLeaderId() != player.getObjectId()) {
+							if (player.getPowerGrade() == 0) {
 								player.setPowerGrade(5);
 							}
 							player.setClanPrivileges(player.getClan().getRankPrivs(player.getPowerGrade()));
-						}
-						else
-						{
+						} else {
 							player.getClanPrivileges().setAll();
 							player.setPowerGrade(1);
 						}
 						player.setPledgeClass(L2ClanMember.calculatePledgeClass(player));
-					}
-					else
-					{
-						if (player.isNoble())
-						{
+					} else {
+						if (player.isNoble()) {
 							player.setPledgeClass(5);
 						}
 						
-						if (player.isHero())
-						{
+						if (player.isHero()) {
 							player.setPledgeClass(8);
 						}
 						
@@ -202,42 +182,32 @@ public class PlayerDAOMySQLImpl implements PlayerDAO
 					}
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed loading character. {}", e);
 		}
 		return player;
 	}
 	
 	@Override
-	public void loadCharacters(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement stmt = con.prepareStatement(SELECT_CHARACTERS))
-		{
+	public void loadCharacters(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var stmt = con.prepareStatement(SELECT_CHARACTERS)) {
 			stmt.setString(1, player.getAccountName());
 			stmt.setInt(2, player.getObjectId());
-			try (ResultSet rs = stmt.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = stmt.executeQuery()) {
+				while (rs.next()) {
 					player.getAccountChars().put(rs.getInt("charId"), rs.getString("char_name"));
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed to load {} characters.", player, e);
 		}
 	}
 	
 	@Override
-	public boolean insert(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+	public boolean insert(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			ps.setString(1, player.getAccountName());
 			ps.setInt(2, player.getObjectId());
 			ps.setString(3, player.getName());
@@ -276,9 +246,7 @@ public class PlayerDAOMySQLImpl implements PlayerDAO
 			ps.setLong(36, 0);
 			ps.setTimestamp(37, new Timestamp(player.getCreateDate().getTimeInMillis()));
 			ps.executeUpdate();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not insert char data: {}", e);
 			return false;
 		}
@@ -286,17 +254,14 @@ public class PlayerDAOMySQLImpl implements PlayerDAO
 	}
 	
 	@Override
-	public void storeCharBase(L2PcInstance player)
-	{
+	public void storeCharBase(L2PcInstance player) {
 		long totalOnlineTime = player.getOnlineTime();
-		if (player.getOnlineBeginTime() > 0)
-		{
+		if (player.getOnlineBeginTime() > 0) {
 			totalOnlineTime += (System.currentTimeMillis() - player.getOnlineBeginTime()) / 1000;
 		}
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(UPDATE))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(UPDATE)) {
 			ps.setInt(1, player.getBaseLevel());
 			ps.setInt(2, player.getMaxHp());
 			ps.setDouble(3, player.getCurrentHp());
@@ -349,26 +314,20 @@ public class PlayerDAOMySQLImpl implements PlayerDAO
 			ps.setInt(50, player.getObjectId());
 			
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not store {} base data: {}", player, e);
 		}
 	}
 	
 	@Override
-	public void updateOnlineStatus(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(UPDATE_ONLINE))
-		{
+	public void updateOnlineStatus(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(UPDATE_ONLINE)) {
 			ps.setInt(1, player.isOnlineInt());
 			ps.setLong(2, System.currentTimeMillis());
 			ps.setInt(3, player.getObjectId());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed updating character online status. {}", e);
 		}
 	}

+ 35 - 65
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PlayerSkillSaveDAOMySQLImpl.java

@@ -18,9 +18,6 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -29,8 +26,8 @@ import java.util.Map.Entry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.dao.PlayerSkillSaveDAO;
 import com.l2jserver.gameserver.datatables.SkillData;
 import com.l2jserver.gameserver.model.TimeStamp;
@@ -43,76 +40,64 @@ import com.l2jserver.gameserver.model.skills.Skill;
  * Player Skill Save DAO MySQL implementation.
  * @author Zoey76
  */
-public class PlayerSkillSaveDAOMySQLImpl implements PlayerSkillSaveDAO
-{
+public class PlayerSkillSaveDAOMySQLImpl implements PlayerSkillSaveDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(PlayerSkillSaveDAOMySQLImpl.class);
 	
 	private static final String INSERT = "INSERT INTO character_skills_save (charId,skill_id,skill_level,remaining_time,reuse_delay,systime,restore_type,class_index,buff_index) VALUES (?,?,?,?,?,?,?,?,?)";
+	
 	private static final String SELECT = "SELECT skill_id,skill_level,remaining_time, reuse_delay, systime, restore_type FROM character_skills_save WHERE charId=? AND class_index=? ORDER BY buff_index ASC";
+	
 	private static final String DELETE = "DELETE FROM character_skills_save WHERE charId=? AND class_index=?";
 	
 	@Override
-	public void delete(L2PcInstance player, int classIndex)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE))
-		{
+	public void delete(L2PcInstance player, int classIndex) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, classIndex);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not delete all effect data!", player, e);
 		}
 	}
 	
 	@Override
-	public void delete(L2PcInstance player)
-	{
+	public void delete(L2PcInstance player) {
 		delete(player, player.getClassIndex());
 	}
 	
 	@Override
-	public void insert(L2PcInstance player, boolean storeEffects)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+	public void insert(L2PcInstance player, boolean storeEffects) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			int buff_index = 0;
 			final List<Integer> storedSkills = new ArrayList<>();
 			
 			// Store all effect data along with calculated remaining
 			// reuse delays for matching skills. 'restore_type'= 0.
-			if (storeEffects)
-			{
-				for (BuffInfo info : player.getEffectList().getEffects())
-				{
-					if (info == null)
-					{
+			if (storeEffects) {
+				for (BuffInfo info : player.getEffectList().getEffects()) {
+					if (info == null) {
 						continue;
 					}
 					
 					final Skill skill = info.getSkill();
 					// Do not save heals.
-					if (skill.getAbnormalType() == AbnormalType.LIFE_FORCE_OTHERS)
-					{
+					if (skill.getAbnormalType() == AbnormalType.LIFE_FORCE_OTHERS) {
 						continue;
 					}
 					
-					if (skill.isToggle())
-					{
+					if (skill.isToggle()) {
 						continue;
 					}
 					
 					// Dances and songs are not kept in retail.
-					if (skill.isDance() && !Config.ALT_STORE_DANCES)
-					{
+					if (skill.isDance() && !Config.ALT_STORE_DANCES) {
 						continue;
 					}
 					
-					if (storedSkills.contains(skill.getReuseHashCode()))
-					{
+					if (storedSkills.contains(skill.getReuseHashCode())) {
 						continue;
 					}
 					
@@ -136,19 +121,15 @@ public class PlayerSkillSaveDAOMySQLImpl implements PlayerSkillSaveDAO
 			
 			// Skills under reuse.
 			final Map<Integer, TimeStamp> reuseTimeStamps = player.getSkillReuseTimeStamps();
-			if (reuseTimeStamps != null)
-			{
-				for (Entry<Integer, TimeStamp> ts : reuseTimeStamps.entrySet())
-				{
+			if (reuseTimeStamps != null) {
+				for (Entry<Integer, TimeStamp> ts : reuseTimeStamps.entrySet()) {
 					final int hash = ts.getKey();
-					if (storedSkills.contains(hash))
-					{
+					if (storedSkills.contains(hash)) {
 						continue;
 					}
 					
 					final TimeStamp t = ts.getValue();
-					if ((t != null) && t.hasNotPassed())
-					{
+					if ((t != null) && t.hasNotPassed()) {
 						storedSkills.add(hash);
 						
 						ps.setInt(1, player.getObjectId());
@@ -164,46 +145,37 @@ public class PlayerSkillSaveDAOMySQLImpl implements PlayerSkillSaveDAO
 					}
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not store {} effect data!", player, e);
 		}
 	}
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, player.getClassIndex());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					int remainingTime = rs.getInt("remaining_time");
 					long reuseDelay = rs.getLong("reuse_delay");
 					long systime = rs.getLong("systime");
 					int restoreType = rs.getInt("restore_type");
 					
 					final Skill skill = SkillData.getInstance().getSkill(rs.getInt("skill_id"), rs.getInt("skill_level"));
-					if (skill == null)
-					{
+					if (skill == null) {
 						continue;
 					}
 					
 					final long time = systime - System.currentTimeMillis();
-					if (time > 10)
-					{
+					if (time > 10) {
 						player.disableSkill(skill, time);
 						player.addTimeStamp(skill, reuseDelay, systime);
 					}
 					
 					// Restore Type 1 The remaining skills lost effect upon logout but were still under a high reuse delay.
-					if (restoreType > 0)
-					{
+					if (restoreType > 0) {
 						continue;
 					}
 					
@@ -212,9 +184,7 @@ public class PlayerSkillSaveDAOMySQLImpl implements PlayerSkillSaveDAO
 					skill.applyEffects(player, player, false, remainingTime);
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore {} active effect data!", player, e);
 		}
 	}

+ 17 - 35
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/PremiumItemDAOMySQLImpl.java

@@ -18,14 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.PremiumItemDAO;
 import com.l2jserver.gameserver.model.L2PremiumItem;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -34,23 +30,19 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  * Premium Item DAO MySQL implementation.
  * @author Zoey76
  */
-public class PremiumItemDAOMySQLImpl implements PremiumItemDAO
-{
+public class PremiumItemDAOMySQLImpl implements PremiumItemDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(PremiumItemDAOMySQLImpl.class);
 	
 	private static final String GET_PREMIUM_ITEMS = "SELECT itemNum, itemId, itemCount, itemSender FROM character_premium_items WHERE charId=?";
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(GET_PREMIUM_ITEMS))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(GET_PREMIUM_ITEMS)) {
 			ps.setInt(1, player.getObjectId());
-			try (ResultSet rset = ps.executeQuery())
-			{
-				while (rset.next())
-				{
+			try (var rset = ps.executeQuery()) {
+				while (rset.next()) {
 					int itemNum = rset.getInt("itemNum");
 					int itemId = rset.getInt("itemId");
 					long itemCount = rset.getLong("itemCount");
@@ -58,42 +50,32 @@ public class PremiumItemDAOMySQLImpl implements PremiumItemDAO
 					player.getPremiumItemList().put(itemNum, new L2PremiumItem(itemId, itemCount, itemSender));
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore premium items: {}", e);
 		}
 	}
 	
 	@Override
-	public void update(L2PcInstance player, int itemNum, long newcount)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("UPDATE character_premium_items SET itemCount=? WHERE charId=? AND itemNum=? "))
-		{
+	public void update(L2PcInstance player, int itemNum, long newcount) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("UPDATE character_premium_items SET itemCount=? WHERE charId=? AND itemNum=? ")) {
 			ps.setLong(1, newcount);
 			ps.setInt(2, player.getObjectId());
 			ps.setInt(3, itemNum);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not update premium items: {}", e);
 		}
 	}
 	
 	@Override
-	public void delete(L2PcInstance player, int itemNum)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("DELETE FROM character_premium_items WHERE charId=? AND itemNum=? "))
-		{
+	public void delete(L2PcInstance player, int itemNum) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("DELETE FROM character_premium_items WHERE charId=? AND itemNum=? ")) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, itemNum);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not delete premium item: {}" + e);
 		}
 	}

+ 23 - 50
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/RecipeBookDAOMySQLImpl.java

@@ -18,15 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.RecipeBookDAO;
 import com.l2jserver.gameserver.data.xml.impl.RecipeData;
 import com.l2jserver.gameserver.model.L2RecipeList;
@@ -36,8 +31,8 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  * Recipe Book DAO MySQL implementation.
  * @author Zoey76
  */
-public class RecipeBookDAOMySQLImpl implements RecipeBookDAO
-{
+public class RecipeBookDAOMySQLImpl implements RecipeBookDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(RecipeBookDAOMySQLImpl.class);
 	
 	private static final String INSERT = "INSERT INTO character_recipebook (charId, id, classIndex, type) values(?,?,?,?)";
@@ -49,86 +44,64 @@ public class RecipeBookDAOMySQLImpl implements RecipeBookDAO
 	private static final String SELECT = "SELECT id FROM character_recipebook WHERE charId=? AND classIndex=? AND type = 1";
 	
 	@Override
-	public void insert(L2PcInstance player, int recipeId, boolean isDwarf)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+	public void insert(L2PcInstance player, int recipeId, boolean isDwarf) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, recipeId);
 			ps.setInt(3, isDwarf ? player.getClassIndex() : 0);
 			ps.setInt(4, isDwarf ? 1 : 0);
 			ps.execute();
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("SQL exception while inserting recipe: {} from player {}", recipeId, player, e);
 		}
 	}
 	
 	@Override
-	public void delete(L2PcInstance player, int recipeId, boolean isDwarf)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE))
-		{
+	public void delete(L2PcInstance player, int recipeId, boolean isDwarf) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, recipeId);
 			ps.setInt(3, isDwarf ? player.getClassIndex() : 0);
 			ps.execute();
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("SQL exception while deleting recipe: {} from player {}", recipeId, player, e);
 		}
 	}
 	
 	@Override
-	public void load(L2PcInstance player, boolean loadCommon)
-	{
+	public void load(L2PcInstance player, boolean loadCommon) {
 		// TODO(Zoey76): Split into two methods.
 		final String sql = loadCommon ? SELECT_COMMON : SELECT;
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(sql))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(sql)) {
 			ps.setInt(1, player.getObjectId());
-			if (!loadCommon)
-			{
+			if (!loadCommon) {
 				ps.setInt(2, player.getClassIndex());
 			}
 			
-			try (ResultSet rset = ps.executeQuery())
-			{
+			try (var rset = ps.executeQuery()) {
 				// TODO(Zoey76): Why only dwarven is cleared?
 				player.getDwarvenRecipeBookClear();
 				
 				final RecipeData rd = RecipeData.getInstance();
-				while (rset.next())
-				{
+				while (rset.next()) {
 					final L2RecipeList recipe = rd.getRecipeList(rset.getInt("id"));
-					if (loadCommon)
-					{
-						if (rset.getInt(2) == 1)
-						{
-							if (rset.getInt(3) == player.getClassIndex())
-							{
+					if (loadCommon) {
+						if (rset.getInt(2) == 1) {
+							if (rset.getInt(3) == player.getClassIndex()) {
 								player.registerDwarvenRecipeList(recipe, false);
 							}
-						}
-						else
-						{
+						} else {
 							player.registerCommonRecipeList(recipe, false);
 						}
-					}
-					else
-					{
+					} else {
 						player.registerDwarvenRecipeList(recipe, false);
 					}
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore recipe book data: {}", e);
 		}
 	}

+ 21 - 39
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/RecipeShopListDAOMySQLImpl.java

@@ -18,14 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.RecipeShopListDAO;
 import com.l2jserver.gameserver.model.L2ManufactureItem;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -34,66 +30,54 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  * Recipe Shop List DAO MySQL implementation.
  * @author Zoey76
  */
-public class RecipeShopListDAOMySQLImpl implements RecipeShopListDAO
-{
+public class RecipeShopListDAOMySQLImpl implements RecipeShopListDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(RecipeShopListDAOMySQLImpl.class);
 	
 	private static final String DELETE = "DELETE FROM character_recipeshoplist WHERE charId=?";
+	
 	private static final String INSERT = "REPLACE INTO character_recipeshoplist (`charId`, `recipeId`, `price`, `index`) VALUES (?, ?, ?, ?)";
+	
 	private static final String SELECT = "SELECT * FROM character_recipeshoplist WHERE charId=? ORDER BY `index`";
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			player.getManufactureItems().clear();
 			
 			ps.setInt(1, player.getObjectId());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					player.getManufactureItems().put(rs.getInt("recipeId"), new L2ManufactureItem(rs.getInt("recipeId"), rs.getLong("price")));
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore recipe shop list data for {}, {}", player, e);
 		}
 	}
 	
 	@Override
-	public void delete(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE))
-		{
+	public void delete(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE)) {
 			ps.setInt(1, player.getObjectId());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not store recipe shop for {}, {}", player, e);
 		}
 	}
 	
 	@Override
-	public void insert(L2PcInstance player)
-	{
-		if (!player.hasManufactureShop())
-		{
+	public void insert(L2PcInstance player) {
+		if (!player.hasManufactureShop()) {
 			return;
 		}
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			int i = 1;
-			for (L2ManufactureItem item : player.getManufactureItems().values())
-			{
+			for (L2ManufactureItem item : player.getManufactureItems().values()) {
 				ps.setInt(1, player.getObjectId());
 				ps.setInt(2, item.getRecipeId());
 				ps.setLong(3, item.getCost());
@@ -101,9 +85,7 @@ public class RecipeShopListDAOMySQLImpl implements RecipeShopListDAO
 				ps.addBatch();
 			}
 			ps.executeBatch();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not store recipe shop for {}, {}", player, e);
 		}
 	}

+ 14 - 30
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/RecommendationBonusDAOMySQLImpl.java

@@ -18,14 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.RecommendationBonusDAO;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
@@ -33,8 +29,8 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  * Recommendation Bonus DAO MySQL implementation.
  * @author Zoey76
  */
-public class RecommendationBonusDAOMySQLImpl implements RecommendationBonusDAO
-{
+public class RecommendationBonusDAOMySQLImpl implements RecommendationBonusDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(RecommendationBonusDAOMySQLImpl.class);
 	
 	private static final String SELECT = "SELECT rec_have,rec_left,time_left FROM character_reco_bonus WHERE charId=? LIMIT 1";
@@ -42,40 +38,30 @@ public class RecommendationBonusDAOMySQLImpl implements RecommendationBonusDAO
 	private static final String INSERT = "INSERT INTO character_reco_bonus (charId,rec_have,rec_left,time_left) VALUES (?,?,?,?) ON DUPLICATE KEY UPDATE rec_have=?, rec_left=?, time_left=?";
 	
 	@Override
-	public long load(L2PcInstance player)
-	{
+	public long load(L2PcInstance player) {
 		long timeLeft = 0;
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				if (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				if (rs.next()) {
 					player.setRecomHave(rs.getInt("rec_have"));
 					player.setRecomLeft(rs.getInt("rec_left"));
 					timeLeft = rs.getLong("time_left");
-				}
-				else
-				{
+				} else {
 					timeLeft = 3600000;
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore Recommendations for {}, {}", player, e);
 		}
 		return timeLeft;
 	}
 	
 	@Override
-	public void insert(L2PcInstance player, long recoTaskEnd)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+	public void insert(L2PcInstance player, long recoTaskEnd) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, player.getRecomHave());
 			ps.setInt(3, player.getRecomLeft());
@@ -85,9 +71,7 @@ public class RecommendationBonusDAOMySQLImpl implements RecommendationBonusDAO
 			ps.setInt(6, player.getRecomLeft());
 			ps.setLong(7, recoTaskEnd);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not update Recommendations for player: {}", player, e);
 		}
 	}

+ 29 - 52
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ServitorSkillSaveDAOMySQLImpl.java

@@ -18,17 +18,14 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import java.util.LinkedList;
 import java.util.List;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.dao.ServitorSkillSaveDAO;
 import com.l2jserver.gameserver.data.sql.impl.SummonEffectsTable;
 import com.l2jserver.gameserver.datatables.SkillData;
@@ -42,19 +39,20 @@ import com.l2jserver.gameserver.model.skills.Skill;
  * Servitor Skill Save DAO MySQL implementation.
  * @author Zoey76
  */
-public class ServitorSkillSaveDAOMySQLImpl implements ServitorSkillSaveDAO
-{
+public class ServitorSkillSaveDAOMySQLImpl implements ServitorSkillSaveDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(ServitorSkillSaveDAOMySQLImpl.class);
+	
 	private static final String ADD_SKILL_SAVE = "INSERT INTO character_summon_skills_save (ownerId,ownerClassIndex,summonSkillId,skill_id,skill_level,remaining_time,buff_index) VALUES (?,?,?,?,?,?,?)";
+	
 	private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,remaining_time,buff_index FROM character_summon_skills_save WHERE ownerId=? AND ownerClassIndex=? AND summonSkillId=? ORDER BY buff_index ASC";
+	
 	private static final String DELETE_SKILL_SAVE = "DELETE FROM character_summon_skills_save WHERE ownerId=? AND ownerClassIndex=? AND summonSkillId=?";
 	
 	@Override
-	public void insert(L2ServitorInstance servitor, boolean storeEffects)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE_SKILL_SAVE))
-		{
+	public void insert(L2ServitorInstance servitor, boolean storeEffects) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE_SKILL_SAVE)) {
 			con.setAutoCommit(false);
 			// Delete all current stored effects for summon to avoid dupe
 			ps.setInt(1, servitor.getOwner().getObjectId());
@@ -67,37 +65,29 @@ public class ServitorSkillSaveDAOMySQLImpl implements ServitorSkillSaveDAO
 			final List<Integer> storedSkills = new LinkedList<>();
 			
 			// Store all effect data along with calculated remaining
-			if (storeEffects)
-			{
-				try (PreparedStatement ps2 = con.prepareStatement(ADD_SKILL_SAVE))
-				{
-					for (BuffInfo info : servitor.getEffectList().getEffects())
-					{
-						if (info == null)
-						{
+			if (storeEffects) {
+				try (var ps2 = con.prepareStatement(ADD_SKILL_SAVE)) {
+					for (BuffInfo info : servitor.getEffectList().getEffects()) {
+						if (info == null) {
 							continue;
 						}
 						
 						final Skill skill = info.getSkill();
 						// Do not save heals.
-						if (skill.getAbnormalType() == AbnormalType.LIFE_FORCE_OTHERS)
-						{
+						if (skill.getAbnormalType() == AbnormalType.LIFE_FORCE_OTHERS) {
 							continue;
 						}
 						
-						if (skill.isToggle())
-						{
+						if (skill.isToggle()) {
 							continue;
 						}
 						
 						// Dances and songs are not kept in retail.
-						if (skill.isDance() && !Config.ALT_STORE_DANCES)
-						{
+						if (skill.isDance() && !Config.ALT_STORE_DANCES) {
 							continue;
 						}
 						
-						if (storedSkills.contains(skill.getReuseHashCode()))
-						{
+						if (storedSkills.contains(skill.getReuseHashCode())) {
 							continue;
 						}
 						
@@ -118,39 +108,29 @@ public class ServitorSkillSaveDAOMySQLImpl implements ServitorSkillSaveDAO
 				}
 			}
 			con.commit();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not store summon effect data for owner {},  class index {}, skill {}!", servitor.getOwner().getObjectId(), servitor.getOwner().getClassIndex(), servitor.getReferenceSkill(), e);
 		}
 	}
 	
 	@Override
-	public void load(L2ServitorInstance servitor)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection())
-		{
-			if (!SummonEffectsTable.getInstance().containsSkill(servitor.getOwner(), servitor.getReferenceSkill()))
-			{
-				try (PreparedStatement ps = con.prepareStatement(RESTORE_SKILL_SAVE))
-				{
+	public void load(L2ServitorInstance servitor) {
+		try (var con = ConnectionFactory.getInstance().getConnection()) {
+			if (!SummonEffectsTable.getInstance().containsSkill(servitor.getOwner(), servitor.getReferenceSkill())) {
+				try (var ps = con.prepareStatement(RESTORE_SKILL_SAVE)) {
 					ps.setInt(1, servitor.getOwner().getObjectId());
 					ps.setInt(2, servitor.getOwner().getClassIndex());
 					ps.setInt(3, servitor.getReferenceSkill());
-					try (ResultSet rs = ps.executeQuery())
-					{
-						while (rs.next())
-						{
+					try (var rs = ps.executeQuery()) {
+						while (rs.next()) {
 							int effectCurTime = rs.getInt("remaining_time");
 							
 							final Skill skill = SkillData.getInstance().getSkill(rs.getInt("skill_id"), rs.getInt("skill_level"));
-							if (skill == null)
-							{
+							if (skill == null) {
 								continue;
 							}
 							
-							if (skill.hasEffects(EffectScope.GENERAL))
-							{
+							if (skill.hasEffects(EffectScope.GENERAL)) {
 								SummonEffectsTable.getInstance().addServitorEffect(servitor.getOwner(), servitor.getReferenceSkill(), skill, effectCurTime);
 							}
 						}
@@ -158,16 +138,13 @@ public class ServitorSkillSaveDAOMySQLImpl implements ServitorSkillSaveDAO
 				}
 			}
 			
-			try (PreparedStatement ps = con.prepareStatement(DELETE_SKILL_SAVE))
-			{
+			try (var ps = con.prepareStatement(DELETE_SKILL_SAVE)) {
 				ps.setInt(1, servitor.getOwner().getObjectId());
 				ps.setInt(2, servitor.getOwner().getClassIndex());
 				ps.setInt(3, servitor.getReferenceSkill());
 				ps.executeUpdate();
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore {} active effect data!", servitor, e);
 		}
 	}

+ 7 - 14
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/ShortcutDAOMySQLImpl.java

@@ -18,13 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.ShortcutDAO;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
@@ -32,24 +29,20 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  * Shortcut DAO MySQL implementation.
  * @author Zoey76
  */
-public class ShortcutDAOMySQLImpl implements ShortcutDAO
-{
+public class ShortcutDAOMySQLImpl implements ShortcutDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(ShortcutDAOMySQLImpl.class);
 	
 	private static final String DELETE = "DELETE FROM character_shortcuts WHERE charId=? AND class_index=?";
 	
 	@Override
-	public boolean delete(L2PcInstance player, int classIndex)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE))
-		{
+	public boolean delete(L2PcInstance player, int classIndex) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, classIndex);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not modify sub class for {} to class index {}, {}", player, classIndex, e);
 			return false;
 		}

+ 41 - 72
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/SkillDAOMySQLImpl.java

@@ -18,17 +18,13 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
 import java.util.List;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.dao.SkillDAO;
 import com.l2jserver.gameserver.data.xml.impl.ClassListData;
 import com.l2jserver.gameserver.data.xml.impl.SkillTreesData;
@@ -43,37 +39,37 @@ import com.l2jserver.gameserver.util.Util;
  * Skill DAO MySQL implementation.
  * @author Zoey76
  */
-public class SkillDAOMySQLImpl implements SkillDAO
-{
+public class SkillDAOMySQLImpl implements SkillDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(SkillDAOMySQLImpl.class);
 	
 	private static final String SELECT = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? AND class_index=?";
+	
 	private static final String INSERT = "INSERT INTO character_skills (charId,skill_id,skill_level,class_index) VALUES (?,?,?,?)";
+	
 	private static final String UPDATE = "UPDATE character_skills SET skill_level=? WHERE skill_id=? AND charId=? AND class_index=?";
+	
 	private static final String REPLACE = "REPLACE INTO character_skills (charId,skill_id,skill_level,class_index) VALUES (?,?,?,?)";
+	
 	private static final String DELETE_ONE = "DELETE FROM character_skills WHERE skill_id=? AND charId=? AND class_index=?";
+	
 	private static final String DELETE_ALL = "DELETE FROM character_skills WHERE charId=? AND class_index=?";
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, player.getClassIndex());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					final int id = rs.getInt("skill_id");
 					final int level = rs.getInt("skill_level");
 					
 					// Create a L2Skill object for each record
 					final Skill skill = SkillData.getInstance().getSkill(id, level);
 					
-					if (skill == null)
-					{
+					if (skill == null) {
 						LOG.warn("Skipped null skill Id: {}, Level: {} while restoring player skills for {}", id, level, this);
 						continue;
 					}
@@ -81,60 +77,47 @@ public class SkillDAOMySQLImpl implements SkillDAO
 					// Add the L2Skill object to the L2Character _skills and its Func objects to the calculator set of the L2Character
 					player.addSkill(skill);
 					
-					if (Config.SKILL_CHECK_ENABLE && (!player.canOverrideCond(PcCondOverride.SKILL_CONDITIONS) || Config.SKILL_CHECK_GM))
-					{
-						if (!SkillTreesData.getInstance().isSkillAllowed(player, skill))
-						{
+					if (Config.SKILL_CHECK_ENABLE && (!player.canOverrideCond(PcCondOverride.SKILL_CONDITIONS) || Config.SKILL_CHECK_GM)) {
+						if (!SkillTreesData.getInstance().isSkillAllowed(player, skill)) {
 							Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " has invalid skill " + skill.getName() + " (" + skill.getId() + "/" + skill.getLevel() + "), class:"
 								+ ClassListData.getInstance().getClass(player.getClassId()).getClassName(), IllegalActionPunishmentType.BROADCAST);
-							if (Config.SKILL_CHECK_REMOVE)
-							{
+							if (Config.SKILL_CHECK_REMOVE) {
 								player.removeSkill(skill);
 							}
 						}
 					}
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore {} skills: {}", player, e);
 		}
 	}
 	
 	@Override
-	public void insert(L2PcInstance player, int classIndex, Skill skill)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+	public void insert(L2PcInstance player, int classIndex, Skill skill) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, skill.getId());
 			ps.setInt(3, skill.getLevel());
 			ps.setInt(4, classIndex);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Error could not store char skills: {}", e);
 		}
 	}
 	
 	@Override
-	public void insert(L2PcInstance player, int newClassIndex, List<Skill> newSkills)
-	{
-		if (newSkills.isEmpty())
-		{
+	public void insert(L2PcInstance player, int newClassIndex, List<Skill> newSkills) {
+		if (newSkills.isEmpty()) {
 			return;
 		}
 		
 		final int classIndex = (newClassIndex > -1) ? newClassIndex : player.getClassIndex();
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(REPLACE))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(REPLACE)) {
 			con.setAutoCommit(false);
-			for (final Skill addSkill : newSkills)
-			{
+			for (final Skill addSkill : newSkills) {
 				
 				ps.setInt(1, player.getObjectId());
 				ps.setInt(2, addSkill.getId());
@@ -144,60 +127,46 @@ public class SkillDAOMySQLImpl implements SkillDAO
 			}
 			ps.executeBatch();
 			con.commit();
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.error("Error could not store {} skills: {}", player, e);
 		}
 	}
 	
 	@Override
-	public void update(L2PcInstance player, int classIndex, Skill newSkill, Skill oldSkill)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(UPDATE))
-		{
+	public void update(L2PcInstance player, int classIndex, Skill newSkill, Skill oldSkill) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(UPDATE)) {
 			ps.setInt(1, newSkill.getLevel());
 			ps.setInt(2, oldSkill.getId());
 			ps.setInt(3, player.getObjectId());
 			ps.setInt(4, classIndex);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Error could not store char skills: {}", e);
 		}
 	}
 	
 	@Override
-	public void delete(L2PcInstance player, Skill skill)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE_ONE))
-		{
+	public void delete(L2PcInstance player, Skill skill) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE_ONE)) {
 			ps.setInt(1, skill.getId());
 			ps.setInt(2, player.getObjectId());
 			ps.setInt(3, player.getClassIndex());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Error could not delete skill: {}", e);
 		}
 	}
 	
 	@Override
-	public void deleteAll(L2PcInstance player, int classIndex)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE_ALL))
-		{
+	public void deleteAll(L2PcInstance player, int classIndex) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE_ALL)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, classIndex);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Error could not delete skill: {}", e);
 		}
 	}

+ 26 - 47
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/SubclassDAOMySQLImpl.java

@@ -18,14 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.SubclassDAO;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.base.SubClass;
@@ -34,28 +30,27 @@ import com.l2jserver.gameserver.model.base.SubClass;
  * Subclass DAO MySQL implementation.
  * @author Zoey76
  */
-public class SubclassDAOMySQLImpl implements SubclassDAO
-{
+public class SubclassDAOMySQLImpl implements SubclassDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(SubclassDAOMySQLImpl.class);
 	
 	private static final String SELECT = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE charId=? ORDER BY class_index ASC";
+	
 	private static final String INSERT = "INSERT INTO character_subclasses (charId,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)";
+	
 	private static final String UPDATE = "UPDATE character_subclasses SET exp=?,sp=?,level=?,class_id=? WHERE charId=? AND class_index =?";
+	
 	private static final String DELETE = "DELETE FROM character_subclasses WHERE charId=? AND class_index=?";
 	
 	@Override
-	public void update(L2PcInstance player)
-	{
-		if (player.getTotalSubClasses() <= 0)
-		{
+	public void update(L2PcInstance player) {
+		if (player.getTotalSubClasses() <= 0) {
 			return;
 		}
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(UPDATE))
-		{
-			for (SubClass subClass : player.getSubClasses().values())
-			{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(UPDATE)) {
+			for (SubClass subClass : player.getSubClasses().values()) {
 				ps.setLong(1, subClass.getExp());
 				ps.setInt(2, subClass.getSp());
 				ps.setInt(3, subClass.getLevel());
@@ -65,19 +60,15 @@ public class SubclassDAOMySQLImpl implements SubclassDAO
 				ps.addBatch();
 			}
 			ps.executeBatch();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not store sub class data for {} : {}", player, e);
 		}
 	}
 	
 	@Override
-	public boolean insert(L2PcInstance player, SubClass newClass)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+	public boolean insert(L2PcInstance player, SubClass newClass) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, newClass.getClassId());
 			ps.setLong(3, newClass.getExp());
@@ -85,9 +76,7 @@ public class SubclassDAOMySQLImpl implements SubclassDAO
 			ps.setInt(5, newClass.getLevel());
 			ps.setInt(6, newClass.getClassIndex());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not add character sub class for {}, {}", player, e);
 			return false;
 		}
@@ -95,32 +84,24 @@ public class SubclassDAOMySQLImpl implements SubclassDAO
 	}
 	
 	@Override
-	public void delete(L2PcInstance player, int classIndex)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE))
-		{
+	public void delete(L2PcInstance player, int classIndex) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, classIndex);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not delete subclass for {} to class index {}, {}", player, classIndex, e);
 		}
 	}
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					final SubClass subClass = new SubClass(player);
 					subClass.setClassId(rs.getInt("class_id"));
 					subClass.setExp(rs.getLong("exp"));
@@ -132,9 +113,7 @@ public class SubclassDAOMySQLImpl implements SubclassDAO
 					player.getSubClasses().put(subClass.getClassIndex(), subClass);
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not restore classes for {}, {}", player, e);
 		}
 	}

+ 24 - 43
src/main/java/com/l2jserver/gameserver/dao/impl/mysql/TeleportBookmarkDAOMySQLImpl.java

@@ -18,14 +18,10 @@
  */
 package com.l2jserver.gameserver.dao.impl.mysql;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.dao.TeleportBookmarkDAO;
 import com.l2jserver.gameserver.model.TeleportBookmark;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -34,37 +30,34 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  * Teleport Bookmark DAO MySQL implementation.
  * @author Zoey76
  */
-public class TeleportBookmarkDAOMySQLImpl implements TeleportBookmarkDAO
-{
+public class TeleportBookmarkDAOMySQLImpl implements TeleportBookmarkDAO {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(TeleportBookmarkDAOMySQLImpl.class);
 	
 	private static final String INSERT = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)";
+	
 	private static final String UPDATE = "UPDATE character_tpbookmark SET icon=?,tag=?,name=? where charId=? AND Id=?";
+	
 	private static final String SELECT = "SELECT Id,x,y,z,icon,tag,name FROM character_tpbookmark WHERE charId=?";
+	
 	private static final String DELETE = "DELETE FROM character_tpbookmark WHERE charId=? AND Id=?";
 	
 	@Override
-	public void delete(L2PcInstance player, int id)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(DELETE))
-		{
+	public void delete(L2PcInstance player, int id) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(DELETE)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, id);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not delete character teleport bookmark data: {}", e);
 		}
 	}
 	
 	@Override
-	public void insert(L2PcInstance player, int id, int x, int y, int z, int icon, String tag, String name)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(INSERT))
-		{
+	public void insert(L2PcInstance player, int id, int x, int y, int z, int icon, String tag, String name) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(INSERT)) {
 			ps.setInt(1, player.getObjectId());
 			ps.setInt(2, id);
 			ps.setInt(3, x);
@@ -74,49 +67,37 @@ public class TeleportBookmarkDAOMySQLImpl implements TeleportBookmarkDAO
 			ps.setString(7, tag);
 			ps.setString(8, name);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not insert character teleport bookmark data: {}", e);
 		}
 	}
 	
 	@Override
-	public void update(L2PcInstance player, int id, int icon, String tag, String name)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(UPDATE))
-		{
+	public void update(L2PcInstance player, int id, int icon, String tag, String name) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(UPDATE)) {
 			ps.setInt(1, icon);
 			ps.setString(2, tag);
 			ps.setString(3, name);
 			ps.setInt(4, player.getObjectId());
 			ps.setInt(5, id);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Could not update character teleport bookmark data: {}", e);
 		}
 	}
 	
 	@Override
-	public void load(L2PcInstance player)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SELECT))
-		{
+	public void load(L2PcInstance player) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SELECT)) {
 			ps.setInt(1, player.getObjectId());
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					player.getTpbookmarks().put(rs.getInt("Id"), new TeleportBookmark(rs.getInt("Id"), rs.getInt("x"), rs.getInt("y"), rs.getInt("z"), rs.getInt("icon"), rs.getString("tag"), rs.getString("name")));
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.error("Failed restoing character teleport bookmark.", e);
 		}
 	}

+ 1 - 1
src/main/java/com/l2jserver/gameserver/data/json/ExperienceData.java

@@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.google.gson.stream.JsonReader;
-import com.l2jserver.Config;
+import com.l2jserver.gameserver.config.Config;
 
 /**
  * @author Zealar

+ 30 - 52
src/main/java/com/l2jserver/gameserver/data/sql/impl/AnnouncementsTable.java

@@ -18,9 +18,6 @@
  */
 package com.l2jserver.gameserver.data.sql.impl;
 
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.Statement;
 import java.util.Collection;
 import java.util.Map;
 import java.util.concurrent.ConcurrentSkipListMap;
@@ -28,7 +25,7 @@ import java.util.concurrent.ConcurrentSkipListMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.announce.Announcement;
 import com.l2jserver.gameserver.model.announce.AnnouncementType;
@@ -41,52 +38,44 @@ import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
  * Loads announcements from database.
  * @author UnAfraid
  */
-public final class AnnouncementsTable
-{
+public final class AnnouncementsTable {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(AnnouncementsTable.class);
 	
 	private final Map<Integer, IAnnouncement> _announcements = new ConcurrentSkipListMap<>();
 	
-	protected AnnouncementsTable()
-	{
+	protected AnnouncementsTable() {
 		load();
 	}
 	
-	private void load()
-	{
+	private void load() {
 		_announcements.clear();
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			Statement st = con.createStatement();
-			ResultSet rset = st.executeQuery("SELECT * FROM announcements"))
-		{
-			while (rset.next())
-			{
-				final AnnouncementType type = AnnouncementType.findById(rset.getInt("type"));
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var st = con.createStatement();
+			var rs = st.executeQuery("SELECT id, type, initial, delay, repeat, author, content FROM announcements")) {
+			while (rs.next()) {
+				final AnnouncementType type = AnnouncementType.findById(rs.getInt("type"));
+				final var author = rs.getString("author");
+				final var content = rs.getString("content");
 				final Announcement announce;
-				switch (type)
-				{
+				switch (type) {
 					case NORMAL:
-					case CRITICAL:
-					{
-						announce = new Announcement(rset);
+					case CRITICAL: {
+						announce = new Announcement(rs.getInt("id"), type, content, author);
 						break;
 					}
 					case AUTO_NORMAL:
-					case AUTO_CRITICAL:
-					{
-						announce = new AutoAnnouncement(rset);
+					case AUTO_CRITICAL: {
+						announce = new AutoAnnouncement(type, content, author, rs.getLong("initial"), rs.getLong("delay"), rs.getInt("repeat"));
 						break;
 					}
-					default:
-					{
+					default: {
 						continue;
 					}
 				}
 				_announcements.put(announce.getId(), announce);
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Failed loading announcements:", e);
 		}
 	}
@@ -95,8 +84,7 @@ public final class AnnouncementsTable
 	 * Sending all announcements to the player
 	 * @param player
 	 */
-	public void showAnnouncements(L2PcInstance player)
-	{
+	public void showAnnouncements(L2PcInstance player) {
 		sendAnnouncements(player, AnnouncementType.NORMAL);
 		sendAnnouncements(player, AnnouncementType.CRITICAL);
 		sendAnnouncements(player, AnnouncementType.EVENT);
@@ -107,12 +95,9 @@ public final class AnnouncementsTable
 	 * @param player
 	 * @param type
 	 */
-	public void sendAnnouncements(L2PcInstance player, AnnouncementType type)
-	{
-		for (IAnnouncement announce : _announcements.values())
-		{
-			if (announce.isValid() && (announce.getType() == type))
-			{
+	public void sendAnnouncements(L2PcInstance player, AnnouncementType type) {
+		for (IAnnouncement announce : _announcements.values()) {
+			if (announce.isValid() && (announce.getType() == type)) {
 				player.sendPacket(new CreatureSay(0, //
 					type == AnnouncementType.CRITICAL ? Say2.CRITICAL_ANNOUNCE : Say2.ANNOUNCEMENT, //
 					player.getName(), announce.getContent()));
@@ -124,10 +109,8 @@ public final class AnnouncementsTable
 	 * Adds announcement
 	 * @param announce
 	 */
-	public void addAnnouncement(IAnnouncement announce)
-	{
-		if (announce.storeMe())
-		{
+	public void addAnnouncement(IAnnouncement announce) {
+		if (announce.storeMe()) {
 			_announcements.put(announce.getId(), announce);
 		}
 	}
@@ -137,8 +120,7 @@ public final class AnnouncementsTable
 	 * @param id
 	 * @return {@code true} if announcement exists and was deleted successfully, {@code false} otherwise.
 	 */
-	public boolean deleteAnnouncement(int id)
-	{
+	public boolean deleteAnnouncement(int id) {
 		final IAnnouncement announce = _announcements.remove(id);
 		return (announce != null) && announce.deleteMe();
 	}
@@ -147,29 +129,25 @@ public final class AnnouncementsTable
 	 * @param id
 	 * @return {@link IAnnouncement} by id
 	 */
-	public IAnnouncement getAnnounce(int id)
-	{
+	public IAnnouncement getAnnounce(int id) {
 		return _announcements.get(id);
 	}
 	
 	/**
 	 * @return {@link Collection} containing all announcements
 	 */
-	public Collection<IAnnouncement> getAllAnnouncements()
-	{
+	public Collection<IAnnouncement> getAllAnnouncements() {
 		return _announcements.values();
 	}
 	
 	/**
 	 * @return Single instance of {@link AnnouncementsTable}
 	 */
-	public static AnnouncementsTable getInstance()
-	{
+	public static AnnouncementsTable getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final AnnouncementsTable _instance = new AnnouncementsTable();
 	}
 }

+ 54 - 106
src/main/java/com/l2jserver/gameserver/data/sql/impl/CharNameTable.java

@@ -18,11 +18,6 @@
  */
 package com.l2jserver.gameserver.data.sql.impl;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.concurrent.ConcurrentHashMap;
@@ -30,98 +25,80 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 
 /**
  * Loads name and access level for all players.
  * @since 2005/03/27
  */
-public class CharNameTable
-{
+public class CharNameTable {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(CharNameTable.class);
 	
 	private final Map<Integer, String> _chars = new ConcurrentHashMap<>();
+	
 	private final Map<Integer, Integer> _accessLevels = new ConcurrentHashMap<>();
 	
-	protected CharNameTable()
-	{
-		if (Config.CACHE_CHAR_NAMES)
-		{
+	protected CharNameTable() {
+		if (Config.CACHE_CHAR_NAMES) {
 			loadAll();
 		}
 	}
 	
-	public final void addName(L2PcInstance player)
-	{
-		if (player != null)
-		{
+	public final void addName(L2PcInstance player) {
+		if (player != null) {
 			addName(player.getObjectId(), player.getName());
 			_accessLevels.put(player.getObjectId(), player.getAccessLevel().getLevel());
 		}
 	}
 	
-	private final void addName(int objectId, String name)
-	{
-		if (name != null)
-		{
-			if (!name.equals(_chars.get(objectId)))
-			{
+	private final void addName(int objectId, String name) {
+		if (name != null) {
+			if (!name.equals(_chars.get(objectId))) {
 				_chars.put(objectId, name);
 			}
 		}
 	}
 	
-	public final void removeName(int objId)
-	{
+	public final void removeName(int objId) {
 		_chars.remove(objId);
 		_accessLevels.remove(objId);
 	}
 	
-	public final int getIdByName(String name)
-	{
-		if ((name == null) || name.isEmpty())
-		{
+	public final int getIdByName(String name) {
+		if ((name == null) || name.isEmpty()) {
 			return -1;
 		}
 		
-		for (Entry<Integer, String> entry : _chars.entrySet())
-		{
-			if (entry.getValue().equalsIgnoreCase(name))
-			{
+		for (Entry<Integer, String> entry : _chars.entrySet()) {
+			if (entry.getValue().equalsIgnoreCase(name)) {
 				return entry.getKey();
 			}
 		}
 		
-		if (Config.CACHE_CHAR_NAMES)
-		{
+		if (Config.CACHE_CHAR_NAMES) {
 			return -1;
 		}
 		
 		int id = -1;
 		int accessLevel = 0;
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT charId,accesslevel FROM characters WHERE char_name=?"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT charId,accesslevel FROM characters WHERE char_name=?")) {
 			ps.setString(1, name);
-			try (ResultSet rs = ps.executeQuery())
-			{
-				while (rs.next())
-				{
+			try (var rs = ps.executeQuery()) {
+				while (rs.next()) {
 					id = rs.getInt(1);
 					accessLevel = rs.getInt(2);
 				}
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not check existing char name!", e);
 		}
 		
-		if (id > 0)
-		{
+		if (id > 0) {
 			_chars.put(id, name);
 			_accessLevels.put(id, accessLevel);
 			return id;
@@ -130,123 +107,94 @@ public class CharNameTable
 		return -1; // not found
 	}
 	
-	public final String getNameById(int id)
-	{
-		if (id <= 0)
-		{
+	public final String getNameById(int id) {
+		if (id <= 0) {
 			return null;
 		}
 		
 		String name = _chars.get(id);
-		if (name != null)
-		{
+		if (name != null) {
 			return name;
 		}
 		
-		if (Config.CACHE_CHAR_NAMES)
-		{
+		if (Config.CACHE_CHAR_NAMES) {
 			return null;
 		}
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT char_name,accesslevel FROM characters WHERE charId=?"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT char_name,accesslevel FROM characters WHERE charId=?")) {
 			ps.setInt(1, id);
-			try (ResultSet rset = ps.executeQuery())
-			{
-				if (rset.next())
-				{
+			try (var rset = ps.executeQuery()) {
+				if (rset.next()) {
 					name = rset.getString(1);
 					_chars.put(id, name);
 					_accessLevels.put(id, rset.getInt(2));
 					return name;
 				}
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not check existing char id!", e);
 		}
 		
 		return null; // not found
 	}
 	
-	public final int getAccessLevelById(int objectId)
-	{
-		if (getNameById(objectId) != null)
-		{
+	public final int getAccessLevelById(int objectId) {
+		if (getNameById(objectId) != null) {
 			return _accessLevels.get(objectId);
 		}
 		
 		return 0;
 	}
 	
-	public synchronized boolean doesCharNameExist(String name)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT account_name FROM characters WHERE char_name=?"))
-		{
+	public boolean doesCharNameExist(String name) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT account_name FROM characters WHERE char_name=?")) {
 			ps.setString(1, name);
-			try (ResultSet rs = ps.executeQuery())
-			{
+			try (var rs = ps.executeQuery()) {
 				return rs.next();
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not check existing charname!", e);
 		}
 		return false;
 	}
 	
-	public int getAccountCharacterCount(String account)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT COUNT(char_name) FROM characters WHERE account_name=?"))
-		{
+	public int getAccountCharacterCount(String account) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT COUNT(char_name) FROM characters WHERE account_name=?")) {
 			ps.setString(1, account);
-			try (ResultSet rset = ps.executeQuery())
-			{
-				while (rset.next())
-				{
+			try (var rset = ps.executeQuery()) {
+				while (rset.next()) {
 					return rset.getInt(1);
 				}
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not check existing char count!", e);
 		}
 		return 0;
 	}
 	
-	private void loadAll()
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			Statement s = con.createStatement();
-			ResultSet rs = s.executeQuery("SELECT charId, char_name, accesslevel FROM characters"))
-		{
-			while (rs.next())
-			{
+	private void loadAll() {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var s = con.createStatement();
+			var rs = s.executeQuery("SELECT charId, char_name, accesslevel FROM characters")) {
+			while (rs.next()) {
 				final int id = rs.getInt(1);
 				_chars.put(id, rs.getString(2));
 				_accessLevels.put(id, rs.getInt(3));
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Could not load char name!", e);
 		}
 		LOG.info(getClass().getSimpleName() + ": Loaded " + _chars.size() + " char names.");
 	}
 	
-	public static CharNameTable getInstance()
-	{
+	public static CharNameTable getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final CharNameTable _instance = new CharNameTable();
 	}
 }

+ 51 - 89
src/main/java/com/l2jserver/gameserver/data/sql/impl/CharSummonTable.java

@@ -18,19 +18,14 @@
  */
 package com.l2jserver.gameserver.data.sql.impl;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.data.xml.impl.NpcData;
 import com.l2jserver.gameserver.data.xml.impl.PetDataTable;
 import com.l2jserver.gameserver.datatables.SkillData;
@@ -46,105 +41,89 @@ import com.l2jserver.gameserver.network.serverpackets.PetItemList;
 /**
  * @author Nyaran
  */
-public class CharSummonTable
-{
+public class CharSummonTable {
+	
 	private static final Logger LOG = LoggerFactory.getLogger(CharSummonTable.class);
+	
 	private static final Map<Integer, Integer> _pets = new ConcurrentHashMap<>();
+	
 	private static final Map<Integer, Integer> _servitors = new ConcurrentHashMap<>();
 	
 	// SQL
 	private static final String INIT_PET = "SELECT ownerId, item_obj_id FROM pets WHERE restore = 'true'";
+	
 	private static final String INIT_SUMMONS = "SELECT ownerId, summonSkillId FROM character_summons";
+	
 	private static final String LOAD_SUMMON = "SELECT curHp, curMp, time FROM character_summons WHERE ownerId = ? AND summonSkillId = ?";
+	
 	private static final String REMOVE_SUMMON = "DELETE FROM character_summons WHERE ownerId = ?";
+	
 	private static final String SAVE_SUMMON = "REPLACE INTO character_summons (ownerId,summonSkillId,curHp,curMp,time) VALUES (?,?,?,?,?)";
 	
-	public Map<Integer, Integer> getPets()
-	{
+	public Map<Integer, Integer> getPets() {
 		return _pets;
 	}
 	
-	public Map<Integer, Integer> getServitors()
-	{
+	public Map<Integer, Integer> getServitors() {
 		return _servitors;
 	}
 	
-	public void init()
-	{
-		if (Config.RESTORE_SERVITOR_ON_RECONNECT)
-		{
-			try (Connection con = ConnectionFactory.getInstance().getConnection();
-				Statement s = con.createStatement();
-				ResultSet rs = s.executeQuery(INIT_SUMMONS))
-			{
-				while (rs.next())
-				{
+	public void init() {
+		if (Config.RESTORE_SERVITOR_ON_RECONNECT) {
+			try (var con = ConnectionFactory.getInstance().getConnection();
+				var s = con.createStatement();
+				var rs = s.executeQuery(INIT_SUMMONS)) {
+				while (rs.next()) {
 					_servitors.put(rs.getInt("ownerId"), rs.getInt("summonSkillId"));
 				}
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				LOG.warn("Error while loading saved servitor!", e);
 			}
 		}
 		
-		if (Config.RESTORE_PET_ON_RECONNECT)
-		{
-			try (Connection con = ConnectionFactory.getInstance().getConnection();
-				Statement s = con.createStatement();
-				ResultSet rs = s.executeQuery(INIT_PET))
-			{
-				while (rs.next())
-				{
+		if (Config.RESTORE_PET_ON_RECONNECT) {
+			try (var con = ConnectionFactory.getInstance().getConnection();
+				var s = con.createStatement();
+				var rs = s.executeQuery(INIT_PET)) {
+				while (rs.next()) {
 					_pets.put(rs.getInt("ownerId"), rs.getInt("item_obj_id"));
 				}
-			}
-			catch (Exception e)
-			{
+			} catch (Exception e) {
 				LOG.warn("Error while loading saved pet!", e);
 			}
 		}
 	}
 	
-	public void removeServitor(L2PcInstance activeChar)
-	{
+	public void removeServitor(L2PcInstance activeChar) {
 		_servitors.remove(activeChar.getObjectId());
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(REMOVE_SUMMON))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(REMOVE_SUMMON)) {
 			ps.setInt(1, activeChar.getObjectId());
 			ps.execute();
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Summon cannot be removed!", e);
 		}
 	}
 	
-	public void restorePet(L2PcInstance activeChar)
-	{
+	public void restorePet(L2PcInstance activeChar) {
 		final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_pets.get(activeChar.getObjectId()));
-		if (item == null)
-		{
+		if (item == null) {
 			LOG.warn("Null pet summoning item for player {}!", activeChar);
 			return;
 		}
 		final L2PetData petData = PetDataTable.getInstance().getPetDataByItemId(item.getId());
-		if (petData == null)
-		{
+		if (petData == null) {
 			LOG.warn("Null pet data for: {} and summoning item {}!", activeChar, item);
 			return;
 		}
 		final L2NpcTemplate npcTemplate = NpcData.getInstance().getTemplate(petData.getNpcId());
-		if (npcTemplate == null)
-		{
+		if (npcTemplate == null) {
 			LOG.warn("Null pet NPC template for player {} and pet ID {}!", activeChar, petData.getNpcId());
 			return;
 		}
 		
 		final L2PetInstance pet = L2PetInstance.spawnPet(npcTemplate, activeChar, item);
-		if (pet == null)
-		{
+		if (pet == null) {
 			LOG.warn("Null pet instance for player {} and pet NPC template {}!", activeChar, npcTemplate);
 			return;
 		}
@@ -152,8 +131,7 @@ public class CharSummonTable
 		pet.setShowSummonAnimation(true);
 		pet.setTitle(activeChar.getName());
 		
-		if (!pet.isRespawned())
-		{
+		if (!pet.isRespawned()) {
 			pet.setCurrentHp(pet.getMaxHp());
 			pet.setCurrentMp(pet.getMaxMp());
 			pet.setExp(pet.getExpForThisLevel());
@@ -162,8 +140,7 @@ public class CharSummonTable
 		
 		pet.setRunning();
 		
-		if (!pet.isRespawned())
-		{
+		if (!pet.isRespawned()) {
 			pet.storeMe();
 		}
 		
@@ -176,34 +153,28 @@ public class CharSummonTable
 		pet.broadcastStatusUpdate();
 	}
 	
-	public void restoreServitor(L2PcInstance activeChar)
-	{
+	public void restoreServitor(L2PcInstance activeChar) {
 		int skillId = _servitors.get(activeChar.getObjectId());
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(LOAD_SUMMON))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(LOAD_SUMMON)) {
 			ps.setInt(1, activeChar.getObjectId());
 			ps.setInt(2, skillId);
-			try (ResultSet rs = ps.executeQuery())
-			{
+			try (var rs = ps.executeQuery()) {
 				Skill skill;
 				
-				while (rs.next())
-				{
+				while (rs.next()) {
 					int curHp = rs.getInt("curHp");
 					int curMp = rs.getInt("curMp");
 					int time = rs.getInt("time");
 					
 					skill = SkillData.getInstance().getSkill(skillId, activeChar.getSkillLevel(skillId));
-					if (skill == null)
-					{
+					if (skill == null) {
 						removeServitor(activeChar);
 						return;
 					}
 					
 					skill.applyEffects(activeChar, activeChar);
-					if (activeChar.hasServitor())
-					{
+					if (activeChar.hasServitor()) {
 						final L2ServitorInstance summon = (L2ServitorInstance) activeChar.getSummon();
 						summon.setCurrentHp(curHp);
 						summon.setCurrentMp(curMp);
@@ -211,45 +182,36 @@ public class CharSummonTable
 					}
 				}
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Servitor cannot be restored!", e);
 		}
 	}
 	
-	public void saveSummon(L2ServitorInstance summon)
-	{
-		if ((summon == null) || (summon.getLifeTimeRemaining() <= 0))
-		{
+	public void saveSummon(L2ServitorInstance summon) {
+		if ((summon == null) || (summon.getLifeTimeRemaining() <= 0)) {
 			return;
 		}
 		
 		_servitors.put(summon.getOwner().getObjectId(), summon.getReferenceSkill());
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement(SAVE_SUMMON))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement(SAVE_SUMMON)) {
 			ps.setInt(1, summon.getOwner().getObjectId());
 			ps.setInt(2, summon.getReferenceSkill());
 			ps.setInt(3, (int) Math.round(summon.getCurrentHp()));
 			ps.setInt(4, (int) Math.round(summon.getCurrentMp()));
 			ps.setInt(5, summon.getLifeTimeRemaining());
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOG.warn("Failed to store summon {} from {}!", summon, summon.getOwner(), e);
 		}
 	}
 	
-	public static CharSummonTable getInstance()
-	{
+	public static CharSummonTable getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final CharSummonTable _instance = new CharSummonTable();
 	}
 }

+ 90 - 183
src/main/java/com/l2jserver/gameserver/data/sql/impl/ClanTable.java

@@ -18,10 +18,6 @@
  */
 package com.l2jserver.gameserver.data.sql.impl;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.Statement;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -30,8 +26,8 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.communitybbs.Manager.ForumsBBSManager;
 import com.l2jserver.gameserver.idfactory.IdFactory;
@@ -66,42 +62,34 @@ import com.l2jserver.util.EnumIntBitmask;
 /**
  * This class loads the clan related data.
  */
-public class ClanTable
-{
+public class ClanTable {
 	private static final Logger _log = Logger.getLogger(ClanTable.class.getName());
 	public static final int CLAN_NAME_MAX_LENGHT = 16;
 	
 	private final Map<Integer, L2Clan> _clans = new ConcurrentHashMap<>();
 	
-	protected ClanTable()
-	{
+	protected ClanTable() {
 		// forums has to be loaded before clan data, because of last forum id used should have also memo included
-		if (Config.ENABLE_COMMUNITY_BOARD)
-		{
+		if (Config.ENABLE_COMMUNITY_BOARD) {
 			ForumsBBSManager.getInstance().initRoot();
 		}
 		
 		L2Clan clan;
 		// Count the clans
 		int clanCount = 0;
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			Statement s = con.createStatement();
-			ResultSet rs = s.executeQuery("SELECT clan_id FROM clan_data"))
-		{
-			while (rs.next())
-			{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var s = con.createStatement();
+			var rs = s.executeQuery("SELECT clan_id FROM clan_data")) {
+			while (rs.next()) {
 				int clanId = rs.getInt("clan_id");
 				_clans.put(clanId, new L2Clan(clanId));
 				clan = getClan(clanId);
-				if (clan.getDissolvingExpiryTime() != 0)
-				{
+				if (clan.getDissolvingExpiryTime() != 0) {
 					scheduleRemoveClan(clan.getId());
 				}
 				clanCount++;
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			_log.log(Level.SEVERE, "Error restoring ClanTable.", e);
 		}
 		_log.info(getClass().getSimpleName() + ": Restored " + clanCount + " clans from the database.");
@@ -113,8 +101,7 @@ public class ClanTable
 	 * Gets the clans.
 	 * @return the clans
 	 */
-	public Collection<L2Clan> getClans()
-	{
+	public Collection<L2Clan> getClans() {
 		return _clans.values();
 	}
 	
@@ -122,8 +109,7 @@ public class ClanTable
 	 * Gets the clan count.
 	 * @return the clan count
 	 */
-	public int getClanCount()
-	{
+	public int getClanCount() {
 		return _clans.size();
 	}
 	
@@ -131,13 +117,11 @@ public class ClanTable
 	 * @param clanId
 	 * @return
 	 */
-	public L2Clan getClan(int clanId)
-	{
+	public L2Clan getClan(int clanId) {
 		return _clans.get(clanId);
 	}
 	
-	public L2Clan getClanByName(String clanName)
-	{
+	public L2Clan getClanByName(String clanName) {
 		return getClans().stream().filter(c -> c.getName().equalsIgnoreCase(clanName)).findFirst().orElse(null);
 	}
 	
@@ -147,46 +131,37 @@ public class ClanTable
 	 * @param clanName
 	 * @return NULL if clan with same name already exists
 	 */
-	public L2Clan createClan(L2PcInstance player, String clanName)
-	{
-		if (null == player)
-		{
+	public L2Clan createClan(L2PcInstance player, String clanName) {
+		if (null == player) {
 			return null;
 		}
 		
-		if (Config.DEBUG)
-		{
+		if (Config.DEBUG) {
 			_log.info(getClass().getSimpleName() + ": " + player.getObjectId() + "(" + player.getName() + ") requested a clan creation.");
 		}
 		
-		if (10 > player.getLevel())
-		{
+		if (10 > player.getLevel()) {
 			player.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_CRITERIA_IN_ORDER_TO_CREATE_A_CLAN);
 			return null;
 		}
-		if (0 != player.getClanId())
-		{
+		if (0 != player.getClanId()) {
 			player.sendPacket(SystemMessageId.FAILED_TO_CREATE_CLAN);
 			return null;
 		}
-		if (System.currentTimeMillis() < player.getClanCreateExpiryTime())
-		{
+		if (System.currentTimeMillis() < player.getClanCreateExpiryTime()) {
 			player.sendPacket(SystemMessageId.YOU_MUST_WAIT_XX_DAYS_BEFORE_CREATING_A_NEW_CLAN);
 			return null;
 		}
-		if (clanName.length() < 2)
-		{
+		if (clanName.length() < 2) {
 			player.sendPacket(SystemMessageId.CLAN_NAME_INCORRECT);
 			return null;
 		}
-		if (clanName.length() > CLAN_NAME_MAX_LENGHT)
-		{
+		if (clanName.length() > CLAN_NAME_MAX_LENGHT) {
 			player.sendPacket(SystemMessageId.CLAN_NAME_TOO_LONG);
 			return null;
 		}
 		
-		if (null != getClanByName(clanName))
-		{
+		if (null != getClanByName(clanName)) {
 			// clan name is already taken
 			SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_ALREADY_EXISTS);
 			sm.addString(clanName);
@@ -218,138 +193,109 @@ public class ClanTable
 		return clan;
 	}
 	
-	public synchronized void destroyClan(int clanId)
-	{
+	public synchronized void destroyClan(int clanId) {
 		L2Clan clan = getClan(clanId);
-		if (clan == null)
-		{
+		if (clan == null) {
 			return;
 		}
 		
 		clan.broadcastToOnlineMembers(SystemMessage.getSystemMessage(SystemMessageId.CLAN_HAS_DISPERSED));
 		int castleId = clan.getCastleId();
-		if (castleId == 0)
-		{
-			for (Siege siege : SiegeManager.getInstance().getSieges())
-			{
+		if (castleId == 0) {
+			for (Siege siege : SiegeManager.getInstance().getSieges()) {
 				siege.removeSiegeClan(clan);
 			}
 		}
 		
 		int fortId = clan.getFortId();
-		if (fortId == 0)
-		{
-			for (FortSiege siege : FortSiegeManager.getInstance().getSieges())
-			{
+		if (fortId == 0) {
+			for (FortSiege siege : FortSiegeManager.getInstance().getSieges()) {
 				siege.removeAttacker(clan);
 			}
 		}
 		
 		int hallId = clan.getHideoutId();
-		if (hallId == 0)
-		{
-			for (SiegableHall hall : CHSiegeManager.getInstance().getConquerableHalls().values())
-			{
+		if (hallId == 0) {
+			for (SiegableHall hall : CHSiegeManager.getInstance().getConquerableHalls().values()) {
 				hall.removeAttacker(clan);
 			}
 		}
 		
 		Auction auction = AuctionManager.getInstance().getAuction(clan.getAuctionBiddedAt());
-		if (auction != null)
-		{
+		if (auction != null) {
 			auction.cancelBid(clan.getId());
 		}
 		
 		L2ClanMember leaderMember = clan.getLeader();
-		if (leaderMember == null)
-		{
+		if (leaderMember == null) {
 			clan.getWarehouse().destroyAllItems("ClanRemove", null, null);
-		}
-		else
-		{
+		} else {
 			clan.getWarehouse().destroyAllItems("ClanRemove", clan.getLeader().getPlayerInstance(), null);
 		}
 		
-		for (L2ClanMember member : clan.getMembers())
-		{
+		for (L2ClanMember member : clan.getMembers()) {
 			clan.removeClanMember(member.getObjectId(), 0);
 		}
 		
 		_clans.remove(clanId);
 		IdFactory.getInstance().releaseId(clanId);
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection())
-		{
-			try (PreparedStatement ps = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?"))
-			{
+		try (var con = ConnectionFactory.getInstance().getConnection()) {
+			try (var ps = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?")) {
 				ps.setInt(1, clanId);
 				ps.execute();
 			}
 			
-			try (PreparedStatement ps = con.prepareStatement("DELETE FROM clan_privs WHERE clan_id=?"))
-			{
+			try (var ps = con.prepareStatement("DELETE FROM clan_privs WHERE clan_id=?")) {
 				ps.setInt(1, clanId);
 				ps.execute();
 			}
 			
-			try (PreparedStatement ps = con.prepareStatement("DELETE FROM clan_skills WHERE clan_id=?"))
-			{
+			try (var ps = con.prepareStatement("DELETE FROM clan_skills WHERE clan_id=?")) {
 				ps.setInt(1, clanId);
 				ps.execute();
 			}
 			
-			try (PreparedStatement ps = con.prepareStatement("DELETE FROM clan_subpledges WHERE clan_id=?"))
-			{
+			try (var ps = con.prepareStatement("DELETE FROM clan_subpledges WHERE clan_id=?")) {
 				ps.setInt(1, clanId);
 				ps.execute();
 			}
 			
-			try (PreparedStatement ps = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? OR clan2=?"))
-			{
+			try (var ps = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? OR clan2=?")) {
 				ps.setInt(1, clanId);
 				ps.setInt(2, clanId);
 				ps.execute();
 			}
 			
-			try (PreparedStatement ps = con.prepareStatement("DELETE FROM clan_notices WHERE clan_id=?"))
-			{
+			try (var ps = con.prepareStatement("DELETE FROM clan_notices WHERE clan_id=?")) {
 				ps.setInt(1, clanId);
 				ps.execute();
 			}
 			
-			if (castleId != 0)
-			{
-				try (PreparedStatement ps = con.prepareStatement("UPDATE castle SET taxPercent = 0 WHERE id = ?"))
-				{
+			if (castleId != 0) {
+				try (var ps = con.prepareStatement("UPDATE castle SET taxPercent = 0 WHERE id = ?")) {
 					ps.setInt(1, castleId);
 					ps.execute();
 				}
 			}
 			
-			if (fortId != 0)
-			{
+			if (fortId != 0) {
 				Fort fort = FortManager.getInstance().getFortById(fortId);
-				if (fort != null)
-				{
+				if (fort != null) {
 					L2Clan owner = fort.getOwnerClan();
-					if (clan == owner)
-					{
+					if (clan == owner) {
 						fort.removeOwner(true);
 					}
 				}
 			}
 			
-			if (hallId != 0)
-			{
+			if (hallId != 0) {
 				SiegableHall hall = CHSiegeManager.getInstance().getSiegableHall(hallId);
-				if ((hall != null) && (hall.getOwnerId() == clanId))
-				{
+				if ((hall != null) && (hall.getOwnerId() == clanId)) {
 					hall.free();
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			_log.log(Level.SEVERE, getClass().getSimpleName() + ": Error removing clan from DB.", e);
 		}
 		
@@ -357,35 +303,27 @@ public class ClanTable
 		EventDispatcher.getInstance().notifyEventAsync(new OnPlayerClanDestroy(leaderMember, clan));
 	}
 	
-	public void scheduleRemoveClan(final int clanId)
-	{
-		ThreadPoolManager.getInstance().scheduleGeneral(() ->
-		{
-			if (getClan(clanId) == null)
-			{
+	public void scheduleRemoveClan(final int clanId) {
+		ThreadPoolManager.getInstance().scheduleGeneral(() -> {
+			if (getClan(clanId) == null) {
 				return;
 			}
-			if (getClan(clanId).getDissolvingExpiryTime() != 0)
-			{
+			if (getClan(clanId).getDissolvingExpiryTime() != 0) {
 				destroyClan(clanId);
 			}
 		}, Math.max(getClan(clanId).getDissolvingExpiryTime() - System.currentTimeMillis(), 300000));
 	}
 	
-	public boolean isAllyExists(String allyName)
-	{
-		for (L2Clan clan : getClans())
-		{
-			if ((clan.getAllyName() != null) && clan.getAllyName().equalsIgnoreCase(allyName))
-			{
+	public boolean isAllyExists(String allyName) {
+		for (L2Clan clan : getClans()) {
+			if ((clan.getAllyName() != null) && clan.getAllyName().equalsIgnoreCase(allyName)) {
 				return true;
 			}
 		}
 		return false;
 	}
 	
-	public void storeclanswars(int clanId1, int clanId2)
-	{
+	public void storeclanswars(int clanId1, int clanId2) {
 		final L2Clan clan1 = getClan(clanId1);
 		final L2Clan clan2 = getClan(clanId2);
 		
@@ -395,17 +333,14 @@ public class ClanTable
 		clan2.setAttackerClan(clan1);
 		clan1.broadcastClanStatus();
 		clan2.broadcastClanStatus();
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("REPLACE INTO clan_wars (clan1, clan2, wantspeace1, wantspeace2) VALUES(?,?,?,?)"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("REPLACE INTO clan_wars (clan1, clan2, wantspeace1, wantspeace2) VALUES(?,?,?,?)")) {
 			ps.setInt(1, clanId1);
 			ps.setInt(2, clanId2);
 			ps.setInt(3, 0);
 			ps.setInt(4, 0);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			_log.log(Level.SEVERE, getClass().getSimpleName() + ": Error storing clan wars data.", e);
 		}
 		
@@ -423,8 +358,7 @@ public class ClanTable
 		clan2.broadcastToOnlineMembers(msg);
 	}
 	
-	public void deleteclanswars(int clanId1, int clanId2)
-	{
+	public void deleteclanswars(int clanId1, int clanId2) {
 		L2Clan clan1 = getClan(clanId1);
 		L2Clan clan2 = getClan(clanId2);
 		
@@ -435,15 +369,12 @@ public class ClanTable
 		clan1.broadcastClanStatus();
 		clan2.broadcastClanStatus();
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? AND clan2=?"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? AND clan2=?")) {
 			ps.setInt(1, clanId1);
 			ps.setInt(2, clanId2);
 			ps.execute();
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			_log.log(Level.SEVERE, getClass().getSimpleName() + ": Error removing clan wars data.", e);
 		}
 		
@@ -456,48 +387,36 @@ public class ClanTable
 		clan2.broadcastToOnlineMembers(msg);
 	}
 	
-	public void checkSurrender(L2Clan clan1, L2Clan clan2)
-	{
+	public void checkSurrender(L2Clan clan1, L2Clan clan2) {
 		int count = 0;
-		for (L2ClanMember player : clan1.getMembers())
-		{
-			if ((player != null) && (player.getPlayerInstance().getWantsPeace() == 1))
-			{
+		for (L2ClanMember player : clan1.getMembers()) {
+			if ((player != null) && (player.getPlayerInstance().getWantsPeace() == 1)) {
 				count++;
 			}
 		}
-		if (count == (clan1.getMembers().length - 1))
-		{
+		if (count == (clan1.getMembers().length - 1)) {
 			clan1.deleteEnemyClan(clan2);
 			clan2.deleteEnemyClan(clan1);
 			deleteclanswars(clan1.getId(), clan2.getId());
 		}
 	}
 	
-	private void restorewars()
-	{
+	private void restorewars() {
 		L2Clan clan1, clan2;
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			Statement statement = con.createStatement();
-			ResultSet rset = statement.executeQuery("SELECT clan1, clan2 FROM clan_wars"))
-		{
-			while (rset.next())
-			{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var statement = con.createStatement();
+			var rset = statement.executeQuery("SELECT clan1, clan2 FROM clan_wars")) {
+			while (rset.next()) {
 				clan1 = getClan(rset.getInt("clan1"));
 				clan2 = getClan(rset.getInt("clan2"));
-				if ((clan1 != null) && (clan2 != null))
-				{
+				if ((clan1 != null) && (clan2 != null)) {
 					clan1.setEnemyClan(rset.getInt("clan2"));
 					clan2.setAttackerClan(rset.getInt("clan1"));
-				}
-				else
-				{
+				} else {
 					_log.log(Level.WARNING, getClass().getSimpleName() + ": restorewars one of clans is null clan1:" + clan1 + " clan2:" + clan2);
 				}
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			_log.log(Level.SEVERE, getClass().getSimpleName() + ": Error restoring clan wars data.", e);
 		}
 	}
@@ -505,15 +424,11 @@ public class ClanTable
 	/**
 	 * Check for nonexistent alliances
 	 */
-	private void allianceCheck()
-	{
-		for (L2Clan clan : _clans.values())
-		{
+	private void allianceCheck() {
+		for (L2Clan clan : _clans.values()) {
 			int allyId = clan.getAllyId();
-			if ((allyId != 0) && (clan.getId() != allyId))
-			{
-				if (!_clans.containsKey(allyId))
-				{
+			if ((allyId != 0) && (clan.getId() != allyId)) {
+				if (!_clans.containsKey(allyId)) {
 					clan.setAllyId(0);
 					clan.setAllyName(null);
 					clan.changeAllyCrest(0, true);
@@ -524,15 +439,11 @@ public class ClanTable
 		}
 	}
 	
-	public List<L2Clan> getClanAllies(int allianceId)
-	{
+	public List<L2Clan> getClanAllies(int allianceId) {
 		final List<L2Clan> clanAllies = new ArrayList<>();
-		if (allianceId != 0)
-		{
-			for (L2Clan clan : _clans.values())
-			{
-				if ((clan != null) && (clan.getAllyId() == allianceId))
-				{
+		if (allianceId != 0) {
+			for (L2Clan clan : _clans.values()) {
+				if ((clan != null) && (clan.getAllyId() == allianceId)) {
 					clanAllies.add(clan);
 				}
 			}
@@ -540,21 +451,17 @@ public class ClanTable
 		return clanAllies;
 	}
 	
-	public void storeClanScore()
-	{
-		for (L2Clan clan : _clans.values())
-		{
+	public void storeClanScore() {
+		for (L2Clan clan : _clans.values()) {
 			clan.updateClanScoreInDB();
 		}
 	}
 	
-	public static ClanTable getInstance()
-	{
+	public static ClanTable getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final ClanTable _instance = new ClanTable();
 	}
 }

+ 61 - 123
src/main/java/com/l2jserver/gameserver/data/sql/impl/CrestTable.java

@@ -20,11 +20,7 @@ package com.l2jserver.gameserver.data.sql.impl;
 
 import java.io.File;
 import java.nio.file.Files;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
 import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
@@ -33,8 +29,8 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.model.L2Clan;
 import com.l2jserver.gameserver.model.L2Crest;
 import com.l2jserver.gameserver.model.L2Crest.CrestType;
@@ -44,76 +40,62 @@ import com.l2jserver.util.file.filter.BMPFilter;
  * Loads and saves crests from database.
  * @author NosBit
  */
-public final class CrestTable
-{
+public final class CrestTable {
+	
 	private static final Logger LOGGER = Logger.getLogger(CrestTable.class.getName());
 	
 	private final Map<Integer, L2Crest> _crests = new ConcurrentHashMap<>();
+	
 	private final AtomicInteger _nextId = new AtomicInteger(1);
 	
-	protected CrestTable()
-	{
+	protected CrestTable() {
 		load();
 	}
 	
-	public synchronized void load()
-	{
+	public synchronized void load() {
 		_crests.clear();
 		Set<Integer> crestsInUse = new HashSet<>();
-		for (L2Clan clan : ClanTable.getInstance().getClans())
-		{
-			if (clan.getCrestId() != 0)
-			{
+		for (L2Clan clan : ClanTable.getInstance().getClans()) {
+			if (clan.getCrestId() != 0) {
 				crestsInUse.add(clan.getCrestId());
 			}
 			
-			if (clan.getCrestLargeId() != 0)
-			{
+			if (clan.getCrestLargeId() != 0) {
 				crestsInUse.add(clan.getCrestLargeId());
 			}
 			
-			if (clan.getAllyCrestId() != 0)
-			{
+			if (clan.getAllyCrestId() != 0) {
 				crestsInUse.add(clan.getAllyCrestId());
 			}
 		}
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			Statement statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
-			ResultSet rs = statement.executeQuery("SELECT `crest_id`, `data`, `type` FROM `crests` ORDER BY `crest_id` DESC"))
-		{
-			while (rs.next())
-			{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var statement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
+			var rs = statement.executeQuery("SELECT `crest_id`, `data`, `type` FROM `crests` ORDER BY `crest_id` DESC")) {
+			while (rs.next()) {
 				int id = rs.getInt("crest_id");
 				
-				if (_nextId.get() <= id)
-				{
+				if (_nextId.get() <= id) {
 					_nextId.set(id + 1);
 				}
 				
 				// delete all unused crests except the last one we dont want to reuse
 				// a crest id because client will display wrong crest if its reused
-				if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1)))
-				{
+				if (!crestsInUse.contains(id) && (id != (_nextId.get() - 1))) {
 					rs.deleteRow();
 					continue;
 				}
 				
 				byte[] data = rs.getBytes("data");
 				CrestType crestType = CrestType.getById(rs.getInt("type"));
-				if (crestType != null)
-				{
+				if (crestType != null) {
 					_crests.put(id, new L2Crest(id, data, crestType));
-				}
-				else
-				{
+				} else {
 					LOGGER.warning("Unknown crest type found in database. Type:" + rs.getInt("type"));
 				}
 			}
 			
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOGGER.log(Level.WARNING, "There was an error while loading crests from database:", e);
 		}
 		
@@ -121,32 +103,25 @@ public final class CrestTable
 		
 		LOGGER.info(getClass().getSimpleName() + ": Loaded " + _crests.size() + " Crests.");
 		
-		for (L2Clan clan : ClanTable.getInstance().getClans())
-		{
-			if (clan.getCrestId() != 0)
-			{
-				if (getCrest(clan.getCrestId()) == null)
-				{
+		for (L2Clan clan : ClanTable.getInstance().getClans()) {
+			if (clan.getCrestId() != 0) {
+				if (getCrest(clan.getCrestId()) == null) {
 					LOGGER.info("Removing non-existent crest for clan " + clan.getName() + " [" + clan.getId() + "], crestId:" + clan.getCrestId());
 					clan.setCrestId(0);
 					clan.changeClanCrest(0);
 				}
 			}
 			
-			if (clan.getCrestLargeId() != 0)
-			{
-				if (getCrest(clan.getCrestLargeId()) == null)
-				{
+			if (clan.getCrestLargeId() != 0) {
+				if (getCrest(clan.getCrestLargeId()) == null) {
 					LOGGER.info("Removing non-existent large crest for clan " + clan.getName() + " [" + clan.getId() + "], crestLargeId:" + clan.getCrestLargeId());
 					clan.setCrestLargeId(0);
 					clan.changeLargeCrest(0);
 				}
 			}
 			
-			if (clan.getAllyCrestId() != 0)
-			{
-				if (getCrest(clan.getAllyCrestId()) == null)
-				{
+			if (clan.getAllyCrestId() != 0) {
+				if (getCrest(clan.getAllyCrestId()) == null) {
 					LOGGER.info("Removing non-existent ally crest for clan " + clan.getName() + " [" + clan.getId() + "], allyCrestId:" + clan.getAllyCrestId());
 					clan.setAllyCrestId(0);
 					clan.changeAllyCrest(0, true);
@@ -160,72 +135,50 @@ public final class CrestTable
 	 * <b>TODO:</b> remove it after some time
 	 * @param crestsInUse the set of crests in use
 	 */
-	private void moveOldCrestsToDb(Set<Integer> crestsInUse)
-	{
+	private void moveOldCrestsToDb(Set<Integer> crestsInUse) {
 		final File crestDir = new File(Config.DATAPACK_ROOT, "data/crests/");
-		if (crestDir.exists())
-		{
+		if (crestDir.exists()) {
 			final File[] files = crestDir.listFiles(new BMPFilter());
-			if (files == null)
-			{
+			if (files == null) {
 				return;
 			}
 			
-			for (File file : files)
-			{
-				try
-				{
+			for (File file : files) {
+				try {
 					final byte[] data = Files.readAllBytes(file.toPath());
-					if (file.getName().startsWith("Crest_Large_"))
-					{
+					if (file.getName().startsWith("Crest_Large_")) {
 						final int crestId = Integer.parseInt(file.getName().substring(12, file.getName().length() - 4));
-						if (crestsInUse.contains(crestId))
-						{
+						if (crestsInUse.contains(crestId)) {
 							final L2Crest crest = createCrest(data, CrestType.PLEDGE_LARGE);
-							if (crest != null)
-							{
-								for (L2Clan clan : ClanTable.getInstance().getClans())
-								{
-									if (clan.getCrestLargeId() == crestId)
-									{
+							if (crest != null) {
+								for (L2Clan clan : ClanTable.getInstance().getClans()) {
+									if (clan.getCrestLargeId() == crestId) {
 										clan.setCrestLargeId(0);
 										clan.changeLargeCrest(crest.getId());
 									}
 								}
 							}
 						}
-					}
-					else if (file.getName().startsWith("Crest_"))
-					{
+					} else if (file.getName().startsWith("Crest_")) {
 						final int crestId = Integer.parseInt(file.getName().substring(6, file.getName().length() - 4));
-						if (crestsInUse.contains(crestId))
-						{
+						if (crestsInUse.contains(crestId)) {
 							final L2Crest crest = createCrest(data, CrestType.PLEDGE);
-							if (crest != null)
-							{
-								for (L2Clan clan : ClanTable.getInstance().getClans())
-								{
-									if (clan.getCrestId() == crestId)
-									{
+							if (crest != null) {
+								for (L2Clan clan : ClanTable.getInstance().getClans()) {
+									if (clan.getCrestId() == crestId) {
 										clan.setCrestId(0);
 										clan.changeClanCrest(crest.getId());
 									}
 								}
 							}
 						}
-					}
-					else if (file.getName().startsWith("AllyCrest_"))
-					{
+					} else if (file.getName().startsWith("AllyCrest_")) {
 						final int crestId = Integer.parseInt(file.getName().substring(10, file.getName().length() - 4));
-						if (crestsInUse.contains(crestId))
-						{
+						if (crestsInUse.contains(crestId)) {
 							final L2Crest crest = createCrest(data, CrestType.ALLY);
-							if (crest != null)
-							{
-								for (L2Clan clan : ClanTable.getInstance().getClans())
-								{
-									if (clan.getAllyCrestId() == crestId)
-									{
+							if (crest != null) {
+								for (L2Clan clan : ClanTable.getInstance().getClans()) {
+									if (clan.getAllyCrestId() == crestId) {
 										clan.setAllyCrestId(0);
 										clan.changeAllyCrest(crest.getId(), false);
 									}
@@ -234,9 +187,7 @@ public final class CrestTable
 						}
 					}
 					file.delete();
-				}
-				catch (Exception e)
-				{
+				} catch (Exception e) {
 					LOGGER.log(Level.WARNING, "There was an error while moving crest file " + file.getName() + " to database:", e);
 				}
 			}
@@ -248,8 +199,7 @@ public final class CrestTable
 	 * @param crestId The crest id
 	 * @return {@code L2Crest} if crest is found, {@code null} if crest was not found.
 	 */
-	public L2Crest getCrest(int crestId)
-	{
+	public L2Crest getCrest(int crestId) {
 		return _crests.get(crestId);
 	}
 	
@@ -259,11 +209,9 @@ public final class CrestTable
 	 * @param crestType
 	 * @return {@code L2Crest} on success, {@code null} on failure.
 	 */
-	public L2Crest createCrest(byte[] data, CrestType crestType)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement statement = con.prepareStatement("INSERT INTO `crests`(`crest_id`, `data`, `type`) VALUES(?, ?, ?)"))
-		{
+	public L2Crest createCrest(byte[] data, CrestType crestType) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var statement = con.prepareStatement("INSERT INTO `crests`(`crest_id`, `data`, `type`) VALUES(?, ?, ?)")) {
 			final L2Crest crest = new L2Crest(getNextId(), data, crestType);
 			statement.setInt(1, crest.getId());
 			statement.setBytes(2, crest.getData());
@@ -271,9 +219,7 @@ public final class CrestTable
 			statement.executeUpdate();
 			_crests.put(crest.getId(), crest);
 			return crest;
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOGGER.log(Level.WARNING, "There was an error while saving crest in database:", e);
 		}
 		return null;
@@ -283,25 +229,20 @@ public final class CrestTable
 	 * Removes crest from database and cache.
 	 * @param crestId the id of crest to be removed.
 	 */
-	public void removeCrest(int crestId)
-	{
+	public void removeCrest(int crestId) {
 		_crests.remove(crestId);
 		
 		// avoid removing last crest id we dont want to lose index...
 		// because client will display wrong crest if its reused
-		if (crestId == (_nextId.get() - 1))
-		{
+		if (crestId == (_nextId.get() - 1)) {
 			return;
 		}
 		
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var statement = con.prepareStatement("DELETE FROM `crests` WHERE `crest_id` = ?")) {
 			statement.setInt(1, crestId);
 			statement.executeUpdate();
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOGGER.log(Level.WARNING, "There was an error while deleting crest from database:", e);
 		}
 	}
@@ -309,18 +250,15 @@ public final class CrestTable
 	/**
 	 * @return The next crest id.
 	 */
-	public int getNextId()
-	{
+	public int getNextId() {
 		return _nextId.getAndIncrement();
 	}
 	
-	public static CrestTable getInstance()
-	{
+	public static CrestTable getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final CrestTable _instance = new CrestTable();
 	}
 }

+ 37 - 74
src/main/java/com/l2jserver/gameserver/data/sql/impl/NpcBufferTable.java

@@ -18,87 +18,71 @@
  */
 package com.l2jserver.gameserver.data.sql.impl;
 
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 import com.l2jserver.gameserver.model.holders.ItemHolder;
 import com.l2jserver.gameserver.model.holders.SkillHolder;
 
-public class NpcBufferTable
-{
+public class NpcBufferTable {
+	
 	private static final Logger LOGGER = Logger.getLogger(NpcBufferTable.class.getName());
 	
 	private final Map<Integer, NpcBufferSkills> _buffers = new HashMap<>();
 	
-	public static class NpcBufferData
-	{
+	public static class NpcBufferData {
 		private final SkillHolder _skill;
 		private final ItemHolder _fee;
 		
-		protected NpcBufferData(int skillId, int skillLevel, int feeId, int feeAmount)
-		{
+		protected NpcBufferData(int skillId, int skillLevel, int feeId, int feeAmount) {
 			_skill = new SkillHolder(skillId, skillLevel);
 			_fee = new ItemHolder(feeId, feeAmount);
 		}
 		
-		public SkillHolder getSkill()
-		{
+		public SkillHolder getSkill() {
 			return _skill;
 		}
 		
-		public ItemHolder getFee()
-		{
+		public ItemHolder getFee() {
 			return _fee;
 		}
 	}
 	
-	private static class NpcBufferSkills
-	{
+	private static class NpcBufferSkills {
 		private final int _npcId;
 		private final Map<Integer, NpcBufferData> _skills = new HashMap<>();
 		
-		protected NpcBufferSkills(int npcId)
-		{
+		protected NpcBufferSkills(int npcId) {
 			_npcId = npcId;
 		}
 		
-		public void addSkill(int skillId, int skillLevel, int skillFeeId, int skillFeeAmount, int buffGroup)
-		{
+		public void addSkill(int skillId, int skillLevel, int skillFeeId, int skillFeeAmount, int buffGroup) {
 			_skills.put(buffGroup, new NpcBufferData(skillId, skillLevel, skillFeeId, skillFeeAmount));
 		}
 		
-		public NpcBufferData getSkillGroupInfo(int buffGroup)
-		{
+		public NpcBufferData getSkillGroupInfo(int buffGroup) {
 			return _skills.get(buffGroup);
 		}
 		
 		@SuppressWarnings("unused")
-		public int getNpcId()
-		{
+		public int getNpcId() {
 			return _npcId;
 		}
 	}
 	
-	protected NpcBufferTable()
-	{
+	protected NpcBufferTable() {
 		int skillCount = 0;
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			Statement s = con.createStatement();
-			ResultSet rset = s.executeQuery("SELECT `npc_id`,`skill_id`,`skill_level`,`skill_fee_id`,`skill_fee_amount`,`buff_group` FROM `npc_buffer` ORDER BY `npc_id` ASC"))
-		{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var s = con.createStatement();
+			var rset = s.executeQuery("SELECT `npc_id`,`skill_id`,`skill_level`,`skill_fee_id`,`skill_fee_amount`,`buff_group` FROM `npc_buffer` ORDER BY `npc_id` ASC")) {
 			int lastNpcId = 0;
 			NpcBufferSkills skills = null;
 			
-			while (rset.next())
-			{
+			while (rset.next()) {
 				int npcId = rset.getInt("npc_id");
 				int skillId = rset.getInt("skill_id");
 				int skillLevel = rset.getInt("skill_level");
@@ -106,18 +90,14 @@ public class NpcBufferTable
 				int skillFeeAmount = rset.getInt("skill_fee_amount");
 				int buffGroup = rset.getInt("buff_group");
 				
-				if (npcId != lastNpcId)
-				{
-					if (lastNpcId != 0)
-					{
+				if (npcId != lastNpcId) {
+					if (lastNpcId != 0) {
 						_buffers.put(lastNpcId, skills);
 					}
 					
 					skills = new NpcBufferSkills(npcId);
 					skills.addSkill(skillId, skillLevel, skillFeeId, skillFeeAmount, buffGroup);
-				}
-				else if (skills != null)
-				{
+				} else if (skills != null) {
 					skills.addSkill(skillId, skillLevel, skillFeeId, skillFeeAmount, buffGroup);
 				}
 				
@@ -125,26 +105,20 @@ public class NpcBufferTable
 				skillCount++;
 			}
 			
-			if (lastNpcId != 0)
-			{
+			if (lastNpcId != 0) {
 				_buffers.put(lastNpcId, skills);
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Error reading npc_buffer table: " + e.getMessage(), e);
 		}
 		
-		if (Config.CUSTOM_NPCBUFFER_TABLES)
-		{
-			try (Connection con = ConnectionFactory.getInstance().getConnection();
-				Statement s = con.createStatement();
-				ResultSet rset = s.executeQuery("SELECT `npc_id`,`skill_id`,`skill_level`,`skill_fee_id`,`skill_fee_amount`,`buff_group` FROM `custom_npc_buffer` ORDER BY `npc_id` ASC"))
-			{
+		if (Config.CUSTOM_NPCBUFFER_TABLES) {
+			try (var con = ConnectionFactory.getInstance().getConnection();
+				var s = con.createStatement();
+				var rset = s.executeQuery("SELECT `npc_id`,`skill_id`,`skill_level`,`skill_fee_id`,`skill_fee_amount`,`buff_group` FROM `custom_npc_buffer` ORDER BY `npc_id` ASC")) {
 				int lastNpcId = 0;
 				NpcBufferSkills skills = null;
-				while (rset.next())
-				{
+				while (rset.next()) {
 					int npcId = rset.getInt("npc_id");
 					int skillId = rset.getInt("skill_id");
 					int skillLevel = rset.getInt("skill_level");
@@ -152,54 +126,43 @@ public class NpcBufferTable
 					int skillFeeAmount = rset.getInt("skill_fee_amount");
 					int buffGroup = rset.getInt("buff_group");
 					
-					if (npcId != lastNpcId)
-					{
-						if (lastNpcId != 0)
-						{
+					if (npcId != lastNpcId) {
+						if (lastNpcId != 0) {
 							_buffers.put(lastNpcId, skills);
 						}
 						
 						skills = new NpcBufferSkills(npcId);
 						skills.addSkill(skillId, skillLevel, skillFeeId, skillFeeAmount, buffGroup);
-					}
-					else if (skills != null)
-					{
+					} else if (skills != null) {
 						skills.addSkill(skillId, skillLevel, skillFeeId, skillFeeAmount, buffGroup);
 					}
 					lastNpcId = npcId;
 					skillCount++;
 				}
 				
-				if (lastNpcId != 0)
-				{
+				if (lastNpcId != 0) {
 					_buffers.put(lastNpcId, skills);
 				}
-			}
-			catch (SQLException e)
-			{
+			} catch (Exception e) {
 				LOGGER.log(Level.SEVERE, getClass().getSimpleName() + ": Error reading custom_npc_buffer table: " + e.getMessage(), e);
 			}
 		}
 		LOGGER.info(getClass().getSimpleName() + ": Loaded " + _buffers.size() + " buffers and " + skillCount + " skills.");
 	}
 	
-	public NpcBufferData getSkillInfo(int npcId, int buffGroup)
-	{
+	public NpcBufferData getSkillInfo(int npcId, int buffGroup) {
 		final NpcBufferSkills skills = _buffers.get(npcId);
-		if (skills != null)
-		{
+		if (skills != null) {
 			return skills.getSkillGroupInfo(buffGroup);
 		}
 		return null;
 	}
 	
-	public static NpcBufferTable getInstance()
-	{
+	public static NpcBufferTable getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final NpcBufferTable _instance = new NpcBufferTable();
 	}
 }

+ 53 - 94
src/main/java/com/l2jserver/gameserver/data/sql/impl/OfflineTradersTable.java

@@ -18,16 +18,12 @@
  */
 package com.l2jserver.gameserver.data.sql.impl;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.Statement;
 import java.util.Calendar;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
+import com.l2jserver.commons.database.ConnectionFactory;
 import com.l2jserver.gameserver.LoginServerThread;
 import com.l2jserver.gameserver.enums.PrivateStoreType;
 import com.l2jserver.gameserver.model.L2ManufactureItem;
@@ -37,51 +33,47 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.network.L2GameClient;
 import com.l2jserver.gameserver.network.L2GameClient.GameClientState;
 
-public class OfflineTradersTable
-{
-	private static Logger LOGGER = Logger.getLogger(OfflineTradersTable.class.getName());
+public class OfflineTradersTable {
+	
+	private static final Logger LOGGER = Logger.getLogger(OfflineTradersTable.class.getName());
 	
-	// SQL DEFINITIONS
 	private static final String SAVE_OFFLINE_STATUS = "INSERT INTO character_offline_trade (`charId`,`time`,`type`,`title`) VALUES (?,?,?,?)";
+	
 	private static final String SAVE_ITEMS = "INSERT INTO character_offline_trade_items (`charId`,`item`,`count`,`price`) VALUES (?,?,?,?)";
+	
 	private static final String CLEAR_OFFLINE_TABLE = "DELETE FROM character_offline_trade";
+	
 	private static final String CLEAR_OFFLINE_TABLE_ITEMS = "DELETE FROM character_offline_trade_items";
+	
 	private static final String LOAD_OFFLINE_STATUS = "SELECT * FROM character_offline_trade";
+	
 	private static final String LOAD_OFFLINE_ITEMS = "SELECT * FROM character_offline_trade_items WHERE charId = ?";
 	
-	public void storeOffliners()
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE);
-			PreparedStatement stm2 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS);
-			PreparedStatement stm3 = con.prepareStatement(SAVE_OFFLINE_STATUS);
-			PreparedStatement stm_items = con.prepareStatement(SAVE_ITEMS))
-		{
+	public void storeOffliners() {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var stm1 = con.prepareStatement(CLEAR_OFFLINE_TABLE);
+			var stm2 = con.prepareStatement(CLEAR_OFFLINE_TABLE_ITEMS);
+			var stm3 = con.prepareStatement(SAVE_OFFLINE_STATUS);
+			var stm_items = con.prepareStatement(SAVE_ITEMS)) {
 			stm1.execute();
 			stm2.execute();
 			con.setAutoCommit(false); // avoid halfway done
 			
-			for (L2PcInstance pc : L2World.getInstance().getPlayers())
-			{
-				try
-				{
-					if ((pc.getPrivateStoreType() != PrivateStoreType.NONE) && pc.isInOfflineMode())
-					{
+			for (L2PcInstance pc : L2World.getInstance().getPlayers()) {
+				try {
+					if ((pc.getPrivateStoreType() != PrivateStoreType.NONE) && pc.isInOfflineMode()) {
 						stm3.setInt(1, pc.getObjectId()); // Char Id
 						stm3.setLong(2, pc.getOfflineStartTime());
 						stm3.setInt(3, pc.getPrivateStoreType().getId()); // store type
 						String title = null;
 						
-						switch (pc.getPrivateStoreType())
-						{
+						switch (pc.getPrivateStoreType()) {
 							case BUY:
-								if (!Config.OFFLINE_TRADE_ENABLE)
-								{
+								if (!Config.OFFLINE_TRADE_ENABLE) {
 									continue;
 								}
 								title = pc.getBuyList().getTitle();
-								for (TradeItem i : pc.getBuyList().getItems())
-								{
+								for (TradeItem i : pc.getBuyList().getItems()) {
 									stm_items.setInt(1, pc.getObjectId());
 									stm_items.setInt(2, i.getItem().getId());
 									stm_items.setLong(3, i.getCount());
@@ -92,13 +84,11 @@ public class OfflineTradersTable
 								break;
 							case SELL:
 							case PACKAGE_SELL:
-								if (!Config.OFFLINE_TRADE_ENABLE)
-								{
+								if (!Config.OFFLINE_TRADE_ENABLE) {
 									continue;
 								}
 								title = pc.getSellList().getTitle();
-								for (TradeItem i : pc.getSellList().getItems())
-								{
+								for (TradeItem i : pc.getSellList().getItems()) {
 									stm_items.setInt(1, pc.getObjectId());
 									stm_items.setInt(2, i.getObjectId());
 									stm_items.setLong(3, i.getCount());
@@ -108,13 +98,11 @@ public class OfflineTradersTable
 								}
 								break;
 							case MANUFACTURE:
-								if (!Config.OFFLINE_CRAFT_ENABLE)
-								{
+								if (!Config.OFFLINE_CRAFT_ENABLE) {
 									continue;
 								}
 								title = pc.getStoreName();
-								for (L2ManufactureItem i : pc.getManufactureItems().values())
-								{
+								for (L2ManufactureItem i : pc.getManufactureItems().values()) {
 									stm_items.setInt(1, pc.getObjectId());
 									stm_items.setInt(2, i.getRecipeId());
 									stm_items.setLong(3, 0);
@@ -128,58 +116,46 @@ public class OfflineTradersTable
 						stm3.clearParameters();
 						con.commit(); // flush
 					}
-				}
-				catch (Exception e)
-				{
+				} catch (Exception e) {
 					LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Error while saving offline trader: " + pc.getObjectId() + " " + e, e);
 				}
 			}
 			LOGGER.info(getClass().getSimpleName() + ": Offline traders stored.");
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Error while saving offline traders: " + e, e);
 		}
 	}
 	
-	public void restoreOfflineTraders()
-	{
+	public void restoreOfflineTraders() {
 		LOGGER.info(getClass().getSimpleName() + ": Loading offline traders...");
 		int nTraders = 0;
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			Statement stm = con.createStatement();
-			ResultSet rs = stm.executeQuery(LOAD_OFFLINE_STATUS))
-		{
-			while (rs.next())
-			{
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var stm = con.createStatement();
+			var rs = stm.executeQuery(LOAD_OFFLINE_STATUS)) {
+			while (rs.next()) {
 				long time = rs.getLong("time");
-				if (Config.OFFLINE_MAX_DAYS > 0)
-				{
+				if (Config.OFFLINE_MAX_DAYS > 0) {
 					Calendar cal = Calendar.getInstance();
 					cal.setTimeInMillis(time);
 					cal.add(Calendar.DAY_OF_YEAR, Config.OFFLINE_MAX_DAYS);
-					if (cal.getTimeInMillis() <= System.currentTimeMillis())
-					{
+					if (cal.getTimeInMillis() <= System.currentTimeMillis()) {
 						continue;
 					}
 				}
 				
 				PrivateStoreType type = PrivateStoreType.findById(rs.getInt("type"));
-				if (type == null)
-				{
+				if (type == null) {
 					LOGGER.warning(getClass().getSimpleName() + ": PrivateStoreType with id " + rs.getInt("type") + " could not be found.");
 					continue;
 				}
 				
-				if (type == PrivateStoreType.NONE)
-				{
+				if (type == PrivateStoreType.NONE) {
 					continue;
 				}
 				
 				L2PcInstance player = null;
 				
-				try
-				{
+				try {
 					L2GameClient client = new L2GameClient(null);
 					client.setDetached(true);
 					player = L2PcInstance.load(rs.getInt("charId"));
@@ -192,18 +168,13 @@ public class OfflineTradersTable
 					player.setOfflineStartTime(time);
 					player.spawnMe(player.getX(), player.getY(), player.getZ());
 					LoginServerThread.getInstance().addGameServerLogin(player.getAccountName(), client);
-					try (PreparedStatement stm_items = con.prepareStatement(LOAD_OFFLINE_ITEMS))
-					{
+					try (var stm_items = con.prepareStatement(LOAD_OFFLINE_ITEMS)) {
 						stm_items.setInt(1, player.getObjectId());
-						try (ResultSet items = stm_items.executeQuery())
-						{
-							switch (type)
-							{
+						try (var items = stm_items.executeQuery()) {
+							switch (type) {
 								case BUY:
-									while (items.next())
-									{
-										if (player.getBuyList().addItemByItemId(items.getInt(2), items.getLong(3), items.getLong(4)) == null)
-										{
+									while (items.next()) {
+										if (player.getBuyList().addItemByItemId(items.getInt(2), items.getLong(3), items.getLong(4)) == null) {
 											throw new NullPointerException();
 										}
 									}
@@ -211,10 +182,8 @@ public class OfflineTradersTable
 									break;
 								case SELL:
 								case PACKAGE_SELL:
-									while (items.next())
-									{
-										if (player.getSellList().addItem(items.getInt(2), items.getLong(3), items.getLong(4)) == null)
-										{
+									while (items.next()) {
+										if (player.getSellList().addItem(items.getInt(2), items.getLong(3), items.getLong(4)) == null) {
 											throw new NullPointerException();
 										}
 									}
@@ -222,8 +191,7 @@ public class OfflineTradersTable
 									player.getSellList().setPackaged(type == PrivateStoreType.PACKAGE_SELL);
 									break;
 								case MANUFACTURE:
-									while (items.next())
-									{
+									while (items.next()) {
 										player.getManufactureItems().put(items.getInt(2), new L2ManufactureItem(items.getInt(2), items.getLong(4)));
 									}
 									player.setStoreName(rs.getString("title"));
@@ -232,8 +200,7 @@ public class OfflineTradersTable
 						}
 					}
 					player.sitDown();
-					if (Config.OFFLINE_SET_NAME_COLOR)
-					{
+					if (Config.OFFLINE_SET_NAME_COLOR) {
 						player.getAppearance().setNameColor(Config.OFFLINE_NAME_COLOR);
 					}
 					player.setPrivateStoreType(type);
@@ -241,12 +208,9 @@ public class OfflineTradersTable
 					player.restoreEffects();
 					player.broadcastUserInfo();
 					nTraders++;
-				}
-				catch (Exception e)
-				{
+				} catch (Exception e) {
 					LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Error loading trader: " + player, e);
-					if (player != null)
-					{
+					if (player != null) {
 						player.deleteMe();
 					}
 				}
@@ -254,14 +218,11 @@ public class OfflineTradersTable
 			
 			LOGGER.info(getClass().getSimpleName() + ": Loaded: " + nTraders + " offline trader(s)");
 			
-			try (Statement stm1 = con.createStatement())
-			{
+			try (var stm1 = con.createStatement()) {
 				stm1.execute(CLEAR_OFFLINE_TABLE);
 				stm1.execute(CLEAR_OFFLINE_TABLE_ITEMS);
 			}
-		}
-		catch (Exception e)
-		{
+		} catch (Exception e) {
 			LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Error while loading offline traders: ", e);
 		}
 	}
@@ -270,13 +231,11 @@ public class OfflineTradersTable
 	 * Gets the single instance of OfflineTradersTable.
 	 * @return single instance of OfflineTradersTable
 	 */
-	public static OfflineTradersTable getInstance()
-	{
+	public static OfflineTradersTable getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final OfflineTradersTable _instance = new OfflineTradersTable();
 	}
 }

+ 13 - 25
src/main/java/com/l2jserver/gameserver/data/sql/impl/PetNameTable.java

@@ -18,50 +18,38 @@
  */
 package com.l2jserver.gameserver.data.sql.impl;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import com.l2jserver.Config;
-import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
+import com.l2jserver.commons.database.ConnectionFactory;
+import com.l2jserver.gameserver.config.Config;
 
-public class PetNameTable
-{
-	private static Logger LOGGER = Logger.getLogger(PetNameTable.class.getName());
+public class PetNameTable {
 	
-	public static PetNameTable getInstance()
-	{
+	private static final Logger LOGGER = Logger.getLogger(PetNameTable.class.getName());
+	
+	public static PetNameTable getInstance() {
 		return SingletonHolder._instance;
 	}
 	
-	public boolean doesPetNameExist(String name)
-	{
-		try (Connection con = ConnectionFactory.getInstance().getConnection();
-			PreparedStatement ps = con.prepareStatement("SELECT name FROM pets WHERE name=?"))
-		{
+	public boolean doesPetNameExist(String name) {
+		try (var con = ConnectionFactory.getInstance().getConnection();
+			var ps = con.prepareStatement("SELECT name FROM pets WHERE name=?")) {
 			ps.setString(1, name);
-			try (ResultSet rs = ps.executeQuery())
-			{
+			try (var rs = ps.executeQuery()) {
 				return rs.next();
 			}
-		}
-		catch (SQLException e)
-		{
+		} catch (Exception e) {
 			LOGGER.log(Level.WARNING, getClass().getSimpleName() + ": Could not check existing petname:" + e.getMessage(), e);
 		}
 		return false;
 	}
 	
-	public boolean isValidPetName(String name)
-	{
+	public boolean isValidPetName(String name) {
 		return Config.PET_NAME_TEMPLATE.matcher(name).matches();
 	}
 	
-	private static class SingletonHolder
-	{
+	private static class SingletonHolder {
 		protected static final PetNameTable _instance = new PetNameTable();
 	}
 }

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