-
Notifications
You must be signed in to change notification settings - Fork 1
feat: adapt to allay 0.17.0 and refactor build configuration #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Miroshka000
commented
Nov 28, 2025
- Replace shadow plugin with org.allaymc.gradle.plugin for simplified build management
- Update API version from 0.6.0 to 0.17.0 with apiOnly configuration
- Migrate from Okaeri ConfigManager to Allay's native Config system
- Update event imports to use new server event package structure
- Replace log4j @slf4j with getPluginLogger() for consistent logging
- Refactor player entity access to use getControlledEntity() and getController()
- Update scoreboard disable tracking to use entity references instead of player
- Simplify Settings class to use direct field access instead of getter methods
- Remove unnecessary repository declarations now handled by gradle plugin
- Consolidate dependency management and remove unused imports
- Replace shadow plugin with org.allaymc.gradle.plugin for simplified build management - Update API version from 0.6.0 to 0.17.0 with apiOnly configuration - Migrate from Okaeri ConfigManager to Allay's native Config system - Update event imports to use new server event package structure - Replace log4j @slf4j with getPluginLogger() for consistent logging - Refactor player entity access to use getControlledEntity() and getController() - Update scoreboard disable tracking to use entity references instead of player - Simplify Settings class to use direct field access instead of getter methods - Remove unnecessary repository declarations now handled by gradle plugin - Consolidate dependency management and remove unused imports
| .bool("show") | ||
| .exec((context, player) -> { | ||
| .exec(context -> { | ||
| if (!(context.getSender() instanceof Player player)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context.getSender() instanceof Player player would always failed because Player does not implement CommandSender. I recommend using SenderType.ACTUAL_PLAYER instead
| .key("scoreboard") | ||
| .bool("show") | ||
| .exec((context, player) -> { | ||
| .exec(context -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same to above
| maven("https://storehouse.okaeri.eu/repository/maven-public/") | ||
| plugin { | ||
| entrance = ".ServerInfo" | ||
| apiVersion = ">=0.17.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be removed
build.gradle.kts
Outdated
| allay { | ||
| api = "0.17.0" | ||
| apiOnly = true | ||
| server = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be removed
- Remove redundant `server = null` configuration from build.gradle.kts - Update command executor signatures to use new lambda parameter pattern with entity argument - Replace `context.getSender()` instanceof checks with `SenderType.ACTUAL_PLAYER` constraint - Simplify player entity access by using entity parameter directly instead of casting sender - Replace `player.getControlledEntity()` calls with `entity.getController()` for consistency - Add null check for controller before proceeding with command execution - Update both msptbar and scoreboard command handlers to use new API pattern