Skip to content

Refactor event handling and update dependencies to Matthiesen Core - #22

Merged
Adammatthiesen merged 7 commits into
mainfrom
matthiesen-core
Aug 11, 2026
Merged

Adammatthiesen merged 7 commits into
mainfrom
matthiesen-core

Conversation

@Adammatthiesen

Copy link
Copy Markdown
Member

This pull request migrates the mod from depending on "Matthiesen Lib API" to the newer "Matthiesen Core" library. It updates all relevant code, configuration, and documentation to use the new core library and its APIs. Additionally, it removes obsolete event handler classes and simplifies event registration using the new platform events system. There are also minor cleanups and improvements to code structure and logging.

Dependency and API migration:

  • Replaced all usages and imports of matthiesen_lib_api with matthiesen_core, including commands, permissions, configuration, and utility classes throughout the codebase. (CobbledLevelControl.java, LevelControlCommand.java, CobbledLevelControlConfigManager.java, PermissionHelpers.java, etc.) [1] [2] [3] [4]
  • Updated workflow and documentation references to require "Matthiesen Core" instead of "Matthiesen Lib API", including badges, dependency lists, and config file paths. (README.md, .github/workflows/publish-release.yml) [1] [2] [3] [4] [5]

Event handling refactor:

  • Removed old event handler classes PlayerEvents and ServerEvents, and replaced their functionality by subscribing directly to PlatformEvents in CobbledLevelControl.java. [1] [2] [3]
  • Updated player account record creation and subscription management to use the new events system.

Code cleanup and simplification:

  • Removed unused or redundant code, such as static Gson instances in config classes, and unnecessary logging/debug lines in event listeners. (DifficultyConfig.java, MainConfig.java, MessagesConfig.java, BattleStartEventsListener.java) [1] [2] [3] [4] [5] [6]

Minor improvements:

  • Updated version compatibility table in the documentation to include the Cobblemon version.
  • Fixed references to server access utilities and command registration to align with the new core API. [1] [2]

These changes modernize the mod’s codebase, align it with the latest Matthiesen libraries, and simplify event and permission handling for easier maintenance and future development.

@Adammatthiesen
Adammatthiesen marked this pull request as ready for review August 11, 2026 02:26
@Adammatthiesen
Adammatthiesen merged commit 8d6fc91 into main Aug 11, 2026
1 check passed
@Adammatthiesen
Adammatthiesen deleted the matthiesen-core branch August 11, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant