Skip to content

Conversation

@thomasmny
Copy link
Owner

@thomasmny thomasmny commented Jun 16, 2023

@thomasmny thomasmny added this to the v3 milestone Nov 16, 2023
@thomasmny thomasmny added the stale The issue is old and hasn't had activity in 3 months. label May 13, 2025
@thomasmny thomasmny removed the stale The issue is old and hasn't had activity in 3 months. label Jun 26, 2025
@thomasmny thomasmny self-assigned this Jun 26, 2025
@thomasmny thomasmny force-pushed the dev/v3 branch 2 times, most recently from 72e9091 to a0d37d0 Compare July 1, 2025 15:15
@thomasmny thomasmny linked an issue Jul 2, 2025 that may be closed by this pull request
@thomasmny thomasmny requested a review from Copilot July 7, 2025 14:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

BuildSystem v3 refactors core components to the new plugin API, introduces null-safety annotations, and replaces the old inventory/listener framework with the InventoryHandler/InventoryManager system.

  • Switched from BuildSystem to BuildSystemPlugin throughout
  • Added @NullMarked annotations and updated null checks
  • Replaced legacy listener-based GUIs with InventoryHandler implementations

Reviewed Changes

Copilot reviewed 206 out of 307 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
NoClipManager.java Updated package, swapped plugin type, added null-safety
DesignInventory.java Converted to InventoryHandler, removed direct Bukkit calls
CustomBlocksManager.java Simplified rotateBlock using pattern matching; added null checks
CustomBlock.java Moved enum to new package, removed obsolete version field
BlocksInventory.java New inventory class using InventoryHandler and InventoryManager
Comments suppressed due to low confidence (4)

buildsystem-core/src/main/java/de/eintosti/buildsystem/player/customblocks/CustomBlocksManager.java:193

  • The key string "invisible-itemframe" is duplicated in multiple places; consider defining it as a constant to avoid typos and ease future changes.
        if (itemMeta == null || !itemMeta.getPersistentDataContainer().has(this.invisibleFrameKey, PersistentDataType.BYTE)) {

buildsystem-core/src/main/java/de/eintosti/buildsystem/listener/PlayerTeleportListener.java:50

  • [nitpick] Using getWorlds().getFirst() to detect the main world relies on list ordering; consider exposing a named or configured main world identifier for clarity.
        if (event.getCause() != PlayerTeleportEvent.TeleportCause.UNKNOWN) {

buildsystem-core/src/main/java/de/eintosti/buildsystem/player/settings/NoClipManager.java:22

  • The Settings import is never used in this class; consider removing it to reduce clutter.
import de.eintosti.buildsystem.api.player.settings.Settings;

buildsystem-core/src/main/java/de/eintosti/buildsystem/player/customblocks/CustomBlock.java:61

  • [nitpick] The legacy constructor overloads and commented-out version handling have been removed; ensure any residual dead code is cleaned up.
    }

Comment on lines 43 to 52
BuildWorld buildWorld = worldStorage.getBuildWorld(from.getName());
if (buildWorld != null) {
buildWorld.resetUnloadTask();
buildWorld.getUnloader().resetUnloadTask();
}
}

@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) {
World from = event.getPlayer().getWorld();
BuildWorld buildWorld = worldManager.getBuildWorld(from.getName());
BuildWorld buildWorld = worldStorage.getBuildWorld(from.getName());
Copy link

Copilot AI Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Identical resetUnloadTask() calls appear in both event handlers; consider extracting to a single private method to avoid duplication.

Copilot uses AI. Check for mistakes.
@thomasmny thomasmny linked an issue Jul 7, 2025 that may be closed by this pull request
@thomasmny thomasmny force-pushed the dev/v3 branch 2 times, most recently from 39057f6 to 2403d90 Compare August 15, 2025 10:49
- Don't allow folders with subfolders to be deleted
- Also `BuildWorld` -> `Folder` assignment in world object instead of map in `FolderStorageImpl`
…ethods, and refactor related code for improved clarity and error handling
Also check whether default game rules set in config exist and are of correct type
…bility and enforce unmodifiable collections where applicable
- `/worlds public`: Open public worlds
- `/worlds archive`: Open archived worlds
- `/worlds private`: Open private worlds

Closes #243
Also add @contract annotations to improve nullability handling and enhance code clarity
@thomasmny thomasmny marked this pull request as ready for review August 30, 2025 14:32
@thomasmny thomasmny merged commit c9188c7 into master Aug 30, 2025
3 checks passed
@thomasmny thomasmny deleted the dev/v3 branch August 30, 2025 14:35
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.

World deletion blacklist file World backup systems Template don't keep world gen settings Command Improvement Subfolder System

2 participants