Skip to content

Conversation

@Miroshka000
Copy link
Contributor

  • 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)) {
Copy link
Owner

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 -> {
Copy link
Owner

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"
Copy link
Owner

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
Copy link
Owner

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
@Miroshka000 Miroshka000 requested a review from smartcmd November 30, 2025 16:03
@smartcmd smartcmd merged commit 67a8813 into smartcmd:master Nov 30, 2025
1 check passed
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.

2 participants