Lucera2 Classic – Clear All Effects on Subclass Change
Hello everyone,I am sharing a custom solution for Lucera2 Classic that removes all active and saved effects whenever a player changes their active subclass.
The Problem
Lucera2 stores effects separately for each class, similar to how effects are saved during logout.Because of this, when a player switches back to a previously used class, the server restores the effects that were previously saved for that class.
Using the following option is valid when you only want to prevent a specific skill from being saved:
<set name="isSaveable" val="false"/><br>
However, this is not practical when the goal is to remove all effects during every subclass change.
It would require editing every skill manually, and it would also affect the skill's normal persistence behavior after logout.
The Solution
This package uses an independent .ext.jar extension.It does not replace or modify:
- server.jar
- scripts.jar
- Existing datapack files
OnSetActiveSubClassListener<br>
After the native subclass process finishes restoring the effects of the selected class, the extension performs the following actions:
- Removes all active effects from the character.
- Deletes saved effects associated with the character's classes.
- Prevents old effects from returning when switching back to another subclass.
- Refreshes effect icons and character statistics.
- Prevents Interface AutoBuff from automatically restoring the previous buff list, when applicable.
- Preserves saved summon effects.
- Runs only when an actual active-class change occurs.
Effects Removed
The cleanup includes:- Buffs and debuffs
- Songs and dances
- Toggle effects
- Transformations
- Skin effects
- Other effects registered in the character's active effect list
Configuration
The entire system can be enabled or disabled through the properties file:RemoveBuffsOnSubclassChange = true<br>
A short secondary cleanup pass is also available to improve compatibility with other subclass listeners:
PostSwitchCleanupDelayMs = 250<br>
This is not continuous polling.
Only one short delayed cleanup action is created when a subclass change occurs.
Installation
- Stop the GameServer.
- Copy the .ext.jar file to the GameServer root directory.
- Copy the properties file to:
- Start the GameServer.
- Check the console for the following startup messages:
No database installation or schema modification is required.
Important Compatibility Note
The provided binary was compiled and validated for a specific Lucera2 Classic Protocol 166 / Java 17 revision.Internal classes, methods, and signatures may differ between Lucera2 revisions.
Before using this extension on another build:
- Compile the included source against your own server.jar.
- Validate the listener and referenced methods.
- Always test the extension on a development server before using it in production.