-
Notifications
You must be signed in to change notification settings - Fork 16
BuildSystem v3 #201
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
BuildSystem v3 #201
Conversation
72e9091 to
a0d37d0
Compare
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.
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
BuildSystemtoBuildSystemPluginthroughout - Added
@NullMarkedannotations and updated null checks - Replaced legacy listener-based GUIs with
InventoryHandlerimplementations
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
Settingsimport 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
versionhandling have been removed; ensure any residual dead code is cleaned up.
}
| 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()); |
Copilot
AI
Jul 7, 2025
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.
[nitpick] Identical resetUnloadTask() calls appear in both event handlers; consider extracting to a single private method to avoid duplication.
39057f6 to
2403d90
Compare
- 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
…pdateAndReopenInventory()`
…t folders and improving documentation
…bility and enforce unmodifiable collections where applicable
- `/worlds public`: Open public worlds - `/worlds archive`: Open archived worlds - `/worlds private`: Open private worlds Closes #243
…erences for improved clarity
Also add @contract annotations to improve nullability handling and enhance code clarity
…new methods and improve item creation
What's new in v3
Bug fixes
Other changes