Commit graph

45 commits

Author SHA1 Message Date
Zoey76
e69bfccbf2 Fixing "The value of the lambda parameter k is not used" warnings
AntiFeedManager: Fixed race condition in `tryAddClient` by using atomic
`getAndUpdate` for limit checks.
ListenersContainer: Optimized volatile access using local snapshots to
reduce memory barriers.
RaidBossPointsManager: Switched inner maps to `ConcurrentHashMap` to
ensure thread-safe updates to player raid points.
Quest: Optimized lazy initialization with local variable snapshots and
resolved unused lambda parameters.
SummonEffectsTable: Enhanced thread safety and efficiency using
ConcurrentHashMap and atomic computeIfAbsent refactoring.

Explicitly left out "com.l2jserver.gameserver.model.drops.strategy"
lambda warnings, I want to review the the drop strategy on another
commit.
2026-02-18 14:13:38 -03:00
Zoey76
09fec286ef Java 25 Upgrade
Updated SLF4J from 2.0.16 to 2.0.17
Updated Log4J from 2.24.3 to 2.25.3
Updated Gson from 2.12.1 to 2.13.2
Updated L2j Server Commons from 2.6.8.1 to 2.6.9.0
Updated JUnit from 5.11.4 to 6.0.1
Updated Mockito from 5.15.2 to 5.21.0
Updated AssertJ from 3.27.0 to 3.27.6
Updated DependencyCheck from 12.0.2 to 12.1.9
Updated Assembly from 3.7.1 to 3.8.0
Updated Compiler from 3.13.0 to 3.14.1
Updated JAR from 3.4.2 to 3.5.0
Updated Surefure from 3.5.2 to 3.5.4
2025-12-26 13:25:06 -03:00
Zoey76
1bd178f13b Updated Dependencies
Gson from 2.11.0 to 2.12.1
JDA from 5.2.1 to 5.3.0
Mockito from 5.14.2 to 5.15.2
Dependency Check Maven from 11.1.1 to 12.0.2
2025-02-08 22:08:26 -03:00
Zoey76
df606564d1 Updated Dependencies
Updated Log4J from 2.24.1 to 2.24.3
Updated JDA from 5.1.2 to 5.2.1
Updated L2J Commons from 2.6.8.0 to 2.6.8.1
Updated JUnit Jupiter from 5.11.3 to 5.11.4
Updated AssertJ Core from 3.26.3 to 3.27.0
Updated Maven Surefire plugin from 3.5.1 to 3.5.2
2024-12-26 21:02:45 -03:00
Kita
19d7e5e85e Merged in feature/logging-slf4j (pull request #126)
Migrated logging to slf4j

* style: Added load times logging to Gameserver

* refactor(logging): Migrated logging to slf4j

Fixed some warnings along the way

* refactor(logging): Removed slf4j bridge and JUL

* Minor changes to loggers refactor

Approved-by: Zoey76
2024-11-09 21:43:03 +00:00
Zoey76
fb162193d5 Updated Dependencies
Updated SLF4J from 2.0.12 to 2.0.16
Updated GSON from 2.10.1 to 2.11.0
Updated JDA from 5.0.0-beta.22 to 5.1.2
Updated L2J Server Commons from 2.6.7.1 to 2.6.8.0
Updated JUnit Jupiter from 5.10.2 to 5.11.3
Updated Mockito Core from 5.11.0 to 5.14.2
Removed deprecated Mockito Inline
Updated AssertJ from 3.25.3 to 3.26.3
Updated Dependency Check plugin from 9.1.0 to 10.0.4
Updated Maven Jar plugin from 3.3.0 to 3.4.2
Updated Maven Surefire plugin from 3.2.5 to 3.5.1
2024-11-02 20:10:43 -03:00
Zoey76
cca3ff0110 Updating Dependencies 2024-04-11 19:21:39 -03:00
HorridoJoho
2a2ea58963 Fix maven java compiler configs.
Remove the -proc:full configuration from pom.xml. We target Java 21, but
the JDK21 does not support "full" (it is the default value, but it can
not be set on the command line). "full" is only supported on JDK22+.

https://inside.java/2023/10/23/quality-heads-up/
2024-02-23 21:02:06 +01:00
Zoey76
a9d81c12f1 Adding a "ci" profile to run Dependency Checks
If you are going to contribute to L2J, please run it locally with `mvnw
clean install -Pci` so you can check that there are no known
vulnerabilities.
2023-12-18 00:59:34 -03:00
Zoey76
ad38939fd3 Updating JDA (Discord Java SDK) from 4.4.0 to 5.0.0-beta.18
Followed the guide: https://jda.wiki/introduction/migration-v4-v5/

The idea is to reduce the vulnerabilities, but some of them are still
present in this version...

Known vulnerabilities in JDA:
CVE-2023-35116
CVE-2022-24329
CVE-2023-3635
2023-12-16 18:47:20 -03:00
Zoey76
93c00daf0f Fixing Warnings and Build Errors
Warning 1:
WARNING: A Java agent has been loaded dynamically
(\.m2\repository\net\bytebuddy\byte-buddy-agent\1.14.9\byte-buddy-agent-1.14.9.jar)
WARNING: If a serviceability tool is in use, please run with
-XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with
-Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a
future release

Warning 2:
Annotation processing is enabled because one or more processors were
found on the class path. A future release of javac may disable
annotation processing unless at least one processor is specified by name
(-processor), or a search path is specified (--processor-path,
--processor-module-path), or annotation processing is enabled explicitly
(-proc:only, -proc:full).
Use -Xlint:-options to suppress this message.
Use -proc:none to disable annotation processing.

Warning 3:
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot
loader classes because bootstrap classpath has been appended
2023-12-16 17:42:31 -03:00
Zoey76
37ea166a09 Adding nvdApiKey property so we can get rid of the NDA warning.
Set your NVD API Key as an environment variable:
NVD_API_KEY=<api key>

Get your own API Key at
https://nvd.nist.gov/developers/request-an-api-key
2023-12-13 16:54:31 -03:00
Zoey76
903fdc0f8b Updated Game Server to Java 21
Updated Log4J to 2.22.0
Updated L2j Commons to 2.6.7.0
Updated Geo Driver to 2.6.5.0
Updated Dependency Check to 9.0.2
2023-12-02 19:40:19 -03:00
Zoey76
e0671bc8e7 Dependency Update 2023-11-19 19:49:00 -03:00
Zoey76
f1deb6d7d9 Updating Dependencies
SLF4J from 2.0.6 to 2.0.9
Log4J from 2.19.0 to 2.21.0
JDA from 4.3.0_330 to v4.4.0
L2j Commons from 2.6.6.1 to 2.6.6.4
JUnit from 5.9.2 to 5.10.0
Mockito from 5.0.0 to 5.6.0
Mockito Inline from 5.0.0 to 5.2.0
Maven Surefire from 3.0.0-M8 to 3.1.2
Maven Assembly from 3.4.2 to 3.6.0

Removed JDA's custom repository, version 4.x uses jitpack.io.

Fixed build final name.

Added Dependency Check Maven Plugin
2023-10-22 18:01:52 -03:00
Zoey76
6e3a99b479 Updating Dependencies
SLF4J 1.7.32 to 2.0.6
Java Mail API 1.6.2 to 2.1.1 (new Jakarta implementation)
L2J Commons 2.6.5.1 to 2.6.6.1 (MariaDB Java Client 3.1.2, HikariCP
5.0.1)
L2J Geo Driver 2.6.3.0 to 2.6.4.1

Replaced Log4J-SLF4J by Log4J-SLF4J2.
2023-01-29 04:00:04 -03:00
Zoey76
3486135ecf Updated Dependencies
Log4j 2.17.0 to 2.19.0
Gson 2.8.9 to 2.10.1
JUnit 5.8.2 to 5.9.2
Mockito 4.1.0 to 5.0.0
AssertJ 3.22.0 to 3.24.2
Surefire 2.22.2 to 3.0.0.M8
Jar 3.2.0 to 3.3.0
Assembly 3.3.0 to 3.4.2
2023-01-26 15:50:19 -03:00
Noe Caratini
45e78d6183 refactor: Improved quest drops handling
Hooked quest drop handling into the main drop calculation mechanism. This allows for better quest drops management including support for grouped drops, precise calculation etc. in a way that is consistent with how other drops are handled.
Added a configurable rate for amount of quest drops, separate from the chance multiplier.
Created QuestDroplist with a suite of builders to generate droplists for quests in a fluent way.
Repurposed QuestItemHolder into QuestItemChanceHolder to hold item limit information.
2022-04-18 01:01:53 +01:00
Zoey76
8687f27986 Fixing Point Blank skills being stopped half way.
Reported-by: Petersen
2021-12-18 15:46:26 -03:00
Zoey76
30de45d428 Removing custom target type party. 2021-12-17 00:23:01 -03:00
Zoey76
20a803cca1 Updating libraries 2021-12-10 22:18:10 -03:00
Stalitsa
cec66ddc19 Update JDA version.
Added TopCommand.

Remove invalid properties from discord to avoid confusion.
2021-10-02 20:41:04 +01:00
Zoey76
f85f324539 Update to Java 17
Added interface due to Mockito bug not allowing mocking of enum with
methods.
Added dummy variable before switch due to Eclipse bug not handling
correctly expression switch(auctions.length).

Updated BitBucket pipeline.
Fixed minor type in character.properties.
Updated Maven Wrapper.
Improved Stats to avoid iteration on each call to valueOfXml(String).

Updated SLF4J from 1.7.31 to 1.7.32.
Updated Gson from 2.8.7 to 2.8.8.
Updated JUnit from 5.7.2 to 5.8.0.
Updated Mockito from 3.11.2 to 3.12.4.
2021-09-24 03:42:39 -03:00
Stalitsa
f643175333 JDA version update. 2021-07-20 06:57:33 +00:00
Zoey76
aee0e9f18d Updated to Java 16
Replaced TestNG with JUnit 5.
Updated and simplified all tests.
Updated SLF4J from 1.7.30 to 1.7.31.
Updated Log4J from 2.13.3 to 2.14.1
Updated GSon from 2.8.6 to 2.8.7.
Updated L2J Commons from 2.6.4.0 to 2.6.5.0.

Fixed Java 16 compilation issues.
Simplified database configuration.
Reduced build from 25 MB to 18 MB.
2021-07-08 00:22:37 -03:00
Zoey76
2a7beaf827 Version bump to 2.6.3.0-SNAPSHOT 2021-06-11 23:38:47 -03:00
Zoey76
abf641b8fb Release 2.6.2.0 2021-06-11 23:05:30 -03:00
Stalitsa
a22931f173 Update JDA version and dependency repository. 2021-04-27 00:59:15 +01:00
Stalitsa
e0d911f172 JDA Update 2021-03-09 15:47:24 +00:00
Zoey76
260085b80b Target System (Part 1)
Removed L2TargetType and temporarily merged it with TargetType.
Added implementation of affect scopes: DEAD_PLEDGE, NONE, PARTY,
PARTY_PLEDGE, PLEDGE, POINT_BLANK, RANGE, RANGE_SORT_BY_HP, SINGLE.
Added implementation of affect object: ALL, CLAN (missing NPC), FRIEND,
INVISIBLE, NONE, NOT_FRIEND, OBJECT_DEAD_NPC_BODY, UNDEAD_REAL_ENEMY,
WYVERN_OBJECT.
Added Chain Heal official support.
Removed custom condition ConditionTargetMyPartyExceptMe.
Added missing condition ConditionTargetMyParty.
Replaced Mockito with EasyMock.
Added @Custom annotation to mark features that are not official like and
will be eventually removed or reworked.
2021-01-15 00:56:20 -03:00
Stalitsa
535783dd3f Server side discord bot support 2020-11-22 19:17:09 -03:00
Zoey76
1c3297ce2b Added external custom configuration directory
Changed configuration strategy to merge configs.
Updated to Java 14's version of L2J Commons, Geo Driver and MMO Core.
2020-08-24 15:20:03 -03:00
Zoey76
957dce2d15 Update to Java 14
Fixed invalid use of ResultSet#first() instead of ResultSet#next(),
reported by cryops.
Fixed several typos.
Updated L2J Commons to 2.6.3.0.
Updated MMO Core to 2.6.2.0.
Updated TestNG to 7.3.0.
Updated Mockito to 3.5.2.
2020-08-22 21:14:54 -03:00
Zoey76
c118d13af6 Party Matching fixes
Fixed packet structure, reported by darkagent
Added class filter.
Added text filter.
Added pagination support.
Added region display of players in waiting room.
Added instance display of players in waiting room with reuse.

Requires MMOCore update.

Fixes #325
2020-08-11 00:39:53 -03:00
Zoey76
3671e1d968 Adding Maven Wrapper
Now you can do:
git clone
mvnw clean install

It doesn't require to download and install Maven.
2020-07-15 00:41:47 -03:00
Zoey76
65a2b41094 Version bump to 2.6.2.0-SNAPSHOT 2020-04-27 01:57:42 -03:00
Zoey76
a8bbbe2545 Release of 2.6.1.0 2020-04-27 01:14:47 -03:00
Zoey76
91869b0f85 Updated dependencies
Log4J 2.13.0 to 2.13.2
Owner 1.0.10 to 1.0.11
L2J Commons 2.6.1.1 to 2.6.2.1
Mockito Core 3.2.4 to 3.3.3
2020-04-26 22:49:51 -03:00
Zoey76
ac08548f4c Updated dependencies 2020-04-26 22:49:50 -03:00
Zoey76
01543e66c2 Configuration rework
Renamed several configurations with proper names.
Added OWNER library (same as Login Server) for better properties
handling.
Reduced static code and split configurations on own classes (actually
interfaces).
Moved configurations to proper files.
Added Server configurations.
Added Database configurations.
Added Castle configurations.
Added Clan configurations.
Added Clan Hall configurations.
Added Fortress configurations.
Added Seven Sings configurations.
Added TvT Event configurations.
Added NPC configurations.
Added Olympiad configurations.
Added Flood Protector configurations.
Added Fort Siege configurations.
Added General configurations.
Added Gracia Seeds configurations.
Added Grand Boss configurations.
Added Hex Id configurations.
Added Id Factory configurations.
Added PvP configurations.
Added Rates configurations.
Added Siege configurations.
Added Territory War configurations.
Added Vitality configurations.
Adding Color, Control Tower, File Converter, Flame Tower, Hex Id, IP
Limit, Item Chance Holder, Item Holder, Key-Value, Location, Minutes 2
Milliseconds, Pattern, Seconds 2 Milliseconds, Server List Type and
Skill Holder converters.
Removed generic Feature configurations.
Added Item, Skill, Location, Pattern and Key-Value converters.
Configurations use hot reload, check each to see interval (20 min in
most of them).

Code review: HorridoJoho
Testing: HD321kbps, Zoey76
2019-12-27 17:37:10 -03:00
Zoey76
7f168af4bf Minor dependency update 2019-08-24 16:18:54 -03:00
Zoey76
3479827c55 Adding Maven build and Zip
Fixed HTML loading issue.
2019-04-01 00:58:56 -03:00
Zoey76
2073a936b4 Moving classes from commons to Game Server
Organizing all imports.
Ported more logs to SLF4J.
Removed all local dependencies.
2019-03-19 02:43:52 -03:00
Zoey76
1dc5980007 Fixing Server Startup
Fixed reserved words in aanouncements table.
Added more SLF4J logs.
Unhardcoded versions from pom.
Added server.log to log4j2.xml
Removed JDK4 log management.
2019-03-05 14:23:14 -03:00
Zoey76
a3ad152adc 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.
2019-03-05 02:29:18 -03:00