Skip to content

[WIP] Plugin rewrite - #78

Draft
GeorgeV220 wants to merge 79 commits into
masterfrom
beta
Draft

[WIP] Plugin rewrite#78
GeorgeV220 wants to merge 79 commits into
masterfrom
beta

Conversation

@GeorgeV220

Copy link
Copy Markdown
Owner

No description provided.

GeorgeV220 and others added 30 commits July 15, 2025 08:54
BREAKING CHANGE: Removed all old classes for the recode
BREAKING CHANGE: Old configs and save data may not be compatible with the new version
Introduce `pluginId` property in build.gradle.kts derived from existing
`pluginName` (lowercased). Add corresponding PLUGIN_ID constant to
BuildParameters.java template for generated build info.
- Introduce MessageManager interface for skin data messaging
- Implement RedisManager using Redis pub/sub for cross-server sync
- Add PluginMessageListener for Bukkit inter-server communication
- Extend configuration with connection type and Redis settings
- Add Base64 serialization methods to Skin class
- Integrate messaging system in Bukkit initialization
- Update SkinApplier to support new applySkin method with Skin param
- Add new configuration options in OptionsUtil and config.yml
Removed the logger parameter from CommandManager and its subclass.
Instead, using SkinOverlay's logger instance directly for logging.
This simplifies the constructor and centralizes logger access.

- Removed logger parameter from BukkitCommandManager
- Updated SkinOverlayBukkit to instantiate without logger
- CommandManager now uses SkinOverlay's logger instance
Add VelocityCommandManager to SkinOverlayVelocity plugin setup.
This integrates the command manager during plugin enable phase.
Previously, the VelocityAudienceProvider registered events with itself as
the plugin parameter, which was incorrect. Now the main plugin instance
is passed to the VelocityAudienceProvider constructor. This ensures
proper event registration by using the actual plugin instance.
- Exclude slf4j-api from common and platform modules to prevent conflicts
- Adjust Adventure dependencies: move API to compileOnly, add implementations
- Force specific Adventure library versions in resolution strategies
- Update shadowJar tasks with module-specific classifiers and relocations
- Add relocations for json, pool2, and jedis dependencies
- Migrate to Kotlin's lowercase() in build-info plugin configuration
Fix ArrayIndexOutOfBoundsException when tab completing with no arguments.
Previously, accessing parts[-1] when args was empty caused an exception.
Now uses parts[0] when args array is empty to avoid index errors.
Refactor MessageBuilder to use new MessageParser for MiniMessage conversion
- Remove legacy color translation method and COLOR_MAP
- Add placeholder support throughout MessageBuilder
- Implement methods for legacy string serialization (buildLegacyString)
- Remove Audience-based send method to decouple building/sending
- Add MessageParser with robust legacy/MiniMessage hybrid parsing
- Fix legacy color handling within quoted MiniMessage tag arguments
- Add comprehensive placeholder replacement functionality
Centralize proxy save condition in entity managers and remove redundant
checks. Added proxy condition to saveEntityWithRetry in SkinEntityManager
and PlayerEntityManager. Removed duplicate checks from SkinApplier and
PlayerListeners since the condition is now handled at the save level.

Changes:
- Added proxy check in saveEntityWithRetry for both managers
- Removed proxy condition from SkinApplier.applySkin
- Removed proxy condition from PlayerListeners.playerJoinEvent
- Removed unused import in SkinApplier
Wrap PluginMessage and Redis initialization inside PROXY config check.
Only initialize message handling when proxy mode is enabled. Prevents
unnecessary setup in non-proxy environments.
- Add MessageManagerNoop implementation for disabled messaging
- Introduce AES encryption/decryption utilities in Utils class
- Create MessageData record for structured message handling
- Refactor RedisManager to handle multiple channels and callbacks
- Rewrite VelocityPluginMessageManager with channel separation
- Implement new PluginMessageListenerImpl with encryption support
- Update Bukkit/Velocity main classes to use new message system
- Add player join publishing/subscribing to messaging system
- Introduce channel constants and message encryption handling
- Refactor MessageManager into abstract class with utilities
Update getScheduler method to use specific type parameters instead
of wildcards for better type safety. Added unchecked cast with
suppression comment where necessary. Also adjusted Javadoc alignment
in setPlugin method for consistency.

- Changed getScheduler return type to parameterized version
- Added type parameters to method signature
- Fixed Javadoc indentation in setPlugin
- Streamlined player join logic by combining conditionals and using
  orElseGet for skin creation
- Replaced nested optionals with concise functional approach in
  player leave handler
- Improved variable naming for better readability
- Centralized entity manager retrieval and reduced code duplication
- Optimized skin handling with early returns and null checks
Add delayed task for publishing player join event in non-proxy
environments when PROXY option is enabled. This ensures the proxy
receives the plugin message by delaying 20 ticks. Fixes unreliable
message delivery when PROXY=true on non-proxy instances.
Introduce new `EncryptUtils` class for secure AES-GCM encryption with PBKDF2 key derivation and GZIP compression. Remove outdated ECB-mode encryption methods from `Utils`. Refactor message handling:

- Replace `ByteStreams` with custom encryption-aware serialization
- Implement `MessageEncryptionException` for error handling
- Update `MessageManager` to use new encryption utilities
- Modify Velocity message parsing to match new encrypted format
- Ensure all plugin messages are encrypted and compressed
- Improve error logging and data validation
Simplify Gradle build commands by replacing per-version reobfJar tasks
with single reobfJar task. Update jar output paths to include platform
specific directories and filenames.

Update GitHub Actions workflow:
- Upgrade to JDK 21 and Node.js 20
- Use latest GitHub Action versions (v4)
- Simplify build command to single task
- Add Maven credential environment variables
- Fix workflow trigger spacing

Improve update-versions.sh script:
- Add shebang and usage instructions
- Require version argument parameter
- Use more robust version replacement pattern
# [8.0.0-beta.1](v7.1.0...v8.0.0-beta.1) (2025-07-15)

### Bug Fixes

* **completion:** handle empty args array in tab completion ([9dffca3](9dffca3))
* prevent saving entities in non-proxy mode when proxy enabled ([1381f51](1381f51))
* **velocity:** pass plugin instance to audience provider ([2996a13](2996a13))

### Features

* add Redis and PluginMessage support for skin synchronization ([a649393](a649393))
* conditionally initialize message handling based on proxy setting ([d77f772](d77f772))
* **messaging:** recode messaging system with encryption and channels ([9deaaf1](9deaaf1))
* **player:** delay publishPlayerJoin when PROXY enabled and not proxy ([07ae9a5](07ae9a5))
* recode encryption and message handling ([0c901ef](0c901ef))
* Recode of the entire plugin ([2ec6cf8](2ec6cf8))
* Start recode ([6470152](6470152))
* **utilities:** refactor message handling and add MessageParser ([2f35d09](2f35d09))
* Velocity support ([345924c](345924c))
* **velocity:** add VelocityCommandManager initialization ([f9b59c5](f9b59c5))

### BREAKING CHANGES

* Old configs and save data may not be compatible with the new version
* Removed all old classes for the recode
Introduce LoggerWrapper to bridge java.util.Logger with Log4j/SLF4J.
Modify SkinOverlayVelocity to use wrapper for consistent logging.
Add log4j-api dependency in common module and update versions catalog.
- Added new PlayerListeners class for Velocity to handle player join/quit
- Registered PlayerListeners to fire SPlayerJoin/SPlayerLeave events
- Condition player join log messages on debug option to reduce noise
Added fallback logic when default skin is missing. Now attempts to fetch
and save the skin if it's the default one. Also fixed Javadoc formatting
for parameter alignment in multiple methods.

- Implemented new else-if branch for 'default' skin handling
- Added skin creation and save flow when default skin missing
- Corrected Javadoc indentation for parameter/exception alignment
- Ensured consistent documentation formatting throughout file
# [8.0.0-beta.2](v8.0.0-beta.1...v8.0.0-beta.2) (2025-07-16)

### Bug Fixes

* **provider:** handle default skin not found case ([4ae9cd6](4ae9cd6))

### Features

* **logging:** add LoggerWrapper for unified logging integration ([82b1121](82b1121))
* **velocity:** add player event listeners and debug logging ([a626d79](a626d79))
Add V1_21_R6 version to support Minecraft 1.21 subversions 9-10.
Update V1_21_R5 range to cover subversions 6-8 instead of just 6.
- Add new module for Minecraft version 1.21.R6
- Implement SkinApplier and GameProfileProvider for 1.21.R6
- Add Reflect library dependency for reflection utilities
- Update Bukkit build configuration to include new version module
- Update common module dependencies with Reflect library
Add GameProfileProviderNoop implementation for environments where
game profile operations are not supported. Update Bukkit version
handling to use no-op implementations instead of disabling the plugin
when encountering unsupported versions. This improves compatibility
and user experience by allowing the plugin to run with limited
functionality rather than crashing.
- Implement GameProfileProvider_SkinsRestorer for SkinsRestorer support
- Remove empty applySkin method from NoopSkinApplier
- Set GameProfileProvider and SkinApplier when SkinsRestorer is enabled
- Improve skin property handling and error logging
@GeorgeV220
GeorgeV220 marked this pull request as draft June 19, 2026 04:40
# [8.0.0-beta.6](v8.0.0-beta.5...v8.0.0-beta.6) (2026-06-19)

### Features

* add Placeholder and PlaceholderUtils for dynamic message replacement ([c3f581e](c3f581e))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 8.0.0-beta.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

GeorgeV220 and others added 26 commits July 1, 2026 11:17
Replace fragile split-based version parsing with a more robust regex
pattern. This change handles edge cases like missing minor or patch
versions correctly
- Move PlaceholderAPI hook registration to after data loading
in Bukkit implementation to ensure proper initialization.
- Add logging when placeholder hook is not set in common module.
- Implement persist() and canRegister() methods in
PlaceholderAPIHook for proper placeholder registration.
Introduce a new `DatabaseManager` class to handle database initialization,
shutdown, and data loading. Implement `MongoEntityManager` and
`SQLEntityManager` for MongoDB and SQL-based storage, alongside the
existing file-based `FileEntityManager`. Add `DataSourceProvider` for
HikariCP connection pooling and `MongoProvider` for MongoDB client
management. Update `OptionsUtil` to cache configuration values for
performance and add new database-related config options. Refactor
`SkinOverlay` to delegate database setup and loading to the new
`DatabaseManager`.
The Quark library manager is introduced to replace direct dependency
implementations with runtime-loaded libraries across Bukkit and Velocity
platforms.

- Add Quark Gradle plugin (1.3.0) to Bukkit and Velocity build scripts
- Migrate common module dependencies from `implementation` to `compileOnly`
- Replace `shadowJar` configuration with `quark` blocks for relocations
- Use Google Cloud Maven mirror for faster artifact resolution
- Update Gradle Shadow plugin to 9.4.1 and MineskinClient to 3.2.6
- Refactor Bukkit audiences into a dedicated utility class
- Simplify publication configuration and remove conditional Maven repos
JCenter has been sunset and is no longer receiving updates.
This repository was already read-only and should not be used
for resolving dependencies.
Allow entity creation without a consumer callback by making the
Consumer parameter nullable in both the interface and abstract
implementation. This provides flexibility when no post-creation
processing is needed.
Create default player data if missing and load default skin image
from provider, setting it as skin parts. Initialize current skin to
default if none set, improving data consistency and reliability.
Replace direct instantiation of `Skin` objects with the new
`skinManager.create()` factory method, which returns an `Optional<Skin>`.
This ensures proper skin resource management and consistent creation errors.

Add handling for empty optional results by throwing a `SkinException` and
including this exception in the catch block for skin retrieval failures.
This improves error reporting and prevents silent failures when skin
creation fails.
Introduce a ConcurrentMap-based cache for SPlayer instances in the
PlayerProvider base class, along with cache methods (remove, clear).

Refactor BukkitPlayerProvider and VelocityPlayerProvider to reuse
cached SPlayer objects via a getOrCreate helper, replacing direct
instantiation. This reduces object allocation and ensures consistent
player state across lookups.

Update method signatures with non-null annotations and adjust
logic in BukkitPlayerProvider to return null instead of throwing
IllegalArgumentException for offline players.

Add cache cleanup in PlayerListeners on player quit to prevent
memory leaks.
When target player is missing and issuer is a player, automatically
use the issuer as the target before showing missing argument error.
# [8.0.0-beta.7](v8.0.0-beta.6...v8.0.0-beta.7) (2026-07-02)

### Bug Fixes

* add player placeholder to overlay reset success message ([0a83c6f](0a83c6f))
* register PlaceholderAPI hook after plugin initialization ([b19c54f](b19c54f))

### Features

* add multi-database support with MongoDB, MySQL, and SQLite ([c00a51f](c00a51f))
* implement SPlayer caching in PlayerProvider ([7e316b4](7e316b4))
* integrate Quark library manager for dependency loading ([030b71a](030b71a))
* make Consumer parameter nullable in entity creation methods ([75d09ee](75d09ee))
* simplify target player resolution in WearSubCommand ([44d73a4](44d73a4))
…olderAPI

Add a `placeholder` field to skin YAML configuration files, enabling
custom display names for each skin in PlaceholderAPI responses.

Update `PlaceholderAPIHook` to resolve the `%skinoverlay_overlay%`
placeholder by reading the new field from the skin's config. If the
skin is named "custom", it returns "Custom". Logs an error if the
skin configuration file is missing and returns "Unknown" as fallback.
- Replace hardcoded skin name strings with configurable options
- Remove unused imports and deprecated Exception usage
- Add null safety checks and new placeholder "overlay_raw"
- Refactor overlay logic into dedicated helper methods
# [8.0.0-beta.8](v8.0.0-beta.7...v8.0.0-beta.8) (2026-07-02)

### Features

* add placeholder field to skin configs and integrate with PlaceholderAPI ([2d04c3b](2d04c3b))
* improve placeholder API hook with configurable skin names ([71e990c](71e990c))
Consistently rename the local variable `world` to `serverLevel` across all
version-specific skin refresher implementations. This change also
replaces direct access to `entityPlayer.server` or
`entityPlayer.gameMode.level` with the more reliable
`serverLevel.getServer().getPlayerList()` to obtain the server's
player list.
Update the 1_21_R6 GameProfile provider to preserve and reuse the
original property name when rebuilding the internal PropertyMap.

The provider was incorrectly creating properties without passing the
original name, causing invalid mappings because the property value was
used as the name. This only affected the 1.21.10 implementation where
the property name handling was missing.

Use the existing property key from the GameProfile instead of
hardcoding or reconstructing property names, ensuring properties such
as `textures` are transferred correctly across versions.
…uffix

Remove the 'R' suffix from version-specific module names, class names, and
registration code to align with the actual Minecraft version numbers rather
than internal mappings. This includes renaming all bukkit version modules
(e.g., mc1_20_R4 -> mc1_20_5), their corresponding Java classes, and the
version registration in VersionRegistry. Additionally, remove the Reflect
library dependency and replace its usage with direct reflection in the
1.21.9 GameProfileProvider.
- Add GameProfileProvider_1_21_11 and SkinRefresher_1_21_11 for
  Minecraft 1.21.11 support.
- Refactor VersionRange to use a single-version constructor and add
  documentation.
- Update VersionRegistry to include the new version range and fix
  existing range definitions.
- Upgrade Gradle to 9.6.1, Paperweight to 2.0.0-beta.21, and Blossom
  to 2.2.0.
- Fix build-info description fallback and update gradlew scripts.
Update GitHub Actions workflow to use the latest versions of
actions/setup-java (v5), actions/cache (v6), actions/checkout (v7),
actions/upload-artifact (v7), and actions/setup-node (v6).

Support both JDK 21 and JDK 25 in the setup-java step, replacing
the previous single JDK 21 configuration.
BukkitMinecraftUtils

The Javadoc for the `isBelow` method now explicitly uses `{@code <}`
to indicate the less-than comparison, making the documentation
clearer and more formal.
# [8.0.0-beta.9](v8.0.0-beta.8...v8.0.0-beta.9) (2026-07-08)

### Bug Fixes

* catch specific NoSuchMethodError instead of generic Exception ([787f584](787f584))
* maven publish ([cb74575](cb74575))
* use original property names when updating GameProfile properties ([eb3fc33](eb3fc33))

### Features

* add Minecraft 1.21.11 version support and refactor VersionRange ([f8e4a33](f8e4a33))
* add support for Minecraft 26.1 and 26.2 versions ([86bf989](86bf989))
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 8.0.0-beta.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants