Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
A powerful, lightweight staff management plugin with advanced moderation features!
v1.2.3
This pull request introduces significant enhancements to the configuration and role management system in the LyttleAdmin
plugin. The changes include updating the plugin version, refactoring the code to centralize role-related actions, and adding new configuration types for better flexibility and maintainability. Additionally, it removes hardcoded role management logic and replaces it with a dynamic configuration-driven approach.
Configuration Updates:
- Version Updates: Updated
pluginVersion
to1.2.3
andpaperVersion
to1.21.8
ingradle.properties
for compatibility with newer versions. - Default Configs: Added
defaultGeneral
configuration inConfigs.java
to support default values for general settings.
Role Management Refactoring:
- Dynamic Role Actions: Replaced hardcoded role management methods (
giveRole
,removeRole
, etc.) with a centralizedrunActions
method that dynamically handles role actions based on configurations. - Role Configuration System: Introduced new POJO classes (
RolesConfig
,RoleConfig
,ActionsConfig
,RoleAction
,RoleChange
,BroadcastConfig
) to encapsulate role-related settings and actions.
Code Simplification:
- Staff Mode Logic: Consolidated
onStaffModeEnabled
andonStaffModeDisabled
logic to use the newrunActions
method, removing redundant methods likeonStaffModeEnabledAdmin
andonStaffModeEnabledModerator
. - Utility Enhancements: Added
RolesConfigLoader
utility for converting configuration objects into POJOs.
Logging Improvements:
- Error Handling: Enhanced logging for errors during staff mode enable/disable actions to improve debugging.
These changes improve the scalability and maintainability of the plugin by leveraging configuration-driven logic and reducing hardcoded dependencies.
Information
Published on | July 24, 2025 |
---|---|
Downloads | 0 |
Platforms
Paper (1.21.8)