L2J

Add skills and character services

Optional L2J skill, Premium, rename, gender, and unstuck features

These features are optional. Register only the code your pack can implement and verify end to end. Missing registrations are not advertised and do not require placeholder results.

Sell skills

Skill sales need a catalog and a delivery handler. Returning the character's known skills is optional, but prevents checkout before payment when the player already knows the requested level.

RegistrationPurpose
.skills(...)Maps loaded templates to GameSkill for the admin picker
.skillDelivery(...)Validates and prepares the pack's skill-acquisition call
.characterSkills(...)Reports the active class's known skill levels before purchase

The delivery handler must refuse a downgrade: buying level 1 must never replace level 3. Prepare the acquisition with Delivery.apply(...), following the same journal boundary as item delivery.

Sell account Premium

Premium is account-scoped and database-only. Register a status provider so the player sees the current expiry and whether purchases extend or replace it, then register delivery with the same policy.

ForgeportIntegration.java
.accountPremiumDelivery((target, grant) -> Delivery.applyInTransaction(
    connection -> premiumTable.extend(
        connection,
        target.account(),
        grant.durationSeconds()),
    () -> premiumCache.invalidate(target.account())))

Delivery.applyInTransaction(...) commits Forgeport's APPLYING row, your SQL, and APPLIED together. The optional callback is only for cache refresh after commit; do not grant the entitlement there.

Rename or change gender

Register CharacterServices only for operations backed by normal pack APIs. Validate ownership, online state, name rules, class/race restrictions, and any restart or character-selection behavior your revision requires. Forgeport handles purchase routing and delivery safety; the pack remains authoritative for whether the requested change is valid.

Unstuck a character

.unstuck(...) receives the normalized account and character id. Use parameterized SQL or a safe pack API, verify ownership in the operation itself, and return UnstuckResult. Coordinates come from PortalConfig.UNSTUCK_X/Y/Z and portal.properties.

Verify

  • Search for one known skill and buy it on a test character; confirm its level in game.
  • Test Premium on a designated account and confirm the stored expiry and login behavior.
  • Run rename/gender tests through the client, including a refusal case.
  • Run unstuck on an offline test character and confirm the next login position.

Use the complete aCis and Mobius integrations for pack-specific APIs.

On this page