feat: adapt to allay 0.17.0 and refactor build configuration#1
Merged
smartcmd merged 2 commits intosmartcmd:masterfrom Nov 30, 2025
Merged
feat: adapt to allay 0.17.0 and refactor build configuration#1smartcmd merged 2 commits intosmartcmd:masterfrom
smartcmd merged 2 commits intosmartcmd:masterfrom
Conversation
Contributor
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
smartcmd
requested changes
Nov 28, 2025
| .bool("show") | ||
| .exec((context, player) -> { | ||
| .exec(context -> { | ||
| if (!(context.getSender() instanceof Player player)) { |
Owner
There was a problem hiding this comment.
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 -> { |
| maven("https://storehouse.okaeri.eu/repository/maven-public/") | ||
| plugin { | ||
| entrance = ".ServerInfo" | ||
| apiVersion = ">=0.17.0" |
build.gradle.kts
Outdated
| allay { | ||
| api = "0.17.0" | ||
| apiOnly = true | ||
| server = null |
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.