Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces Pl3xMap integration to the VirtualRealty plugin, alongside some bug fixes for UUID comparisons and improvements to door/dripleaf protection handling.
- Added Pl3xMap integration with customizable plot markers and configuration options
- Fixed UUID comparison bugs in plot ownership and permission checks
- Enhanced protection system for doors and dripleaf blocks with separate permission handling
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/modnmetl/virtualrealty/model/plot/Plot.java | Fixed UUID comparison using equals() instead of == for plot membership access |
| src/main/java/com/modnmetl/virtualrealty/manager/Pl3xMapManager.java | New manager class implementing Pl3xMap integration with plot markers and visual configuration |
| src/main/java/com/modnmetl/virtualrealty/listener/protection/WorldProtectionListener.java | Added door detection and protection logic for world-level interactions |
| src/main/java/com/modnmetl/virtualrealty/listener/protection/PlotProtectionListener.java | Enhanced protection system with separate dripleaf handling and improved door detection |
| src/main/java/com/modnmetl/virtualrealty/listener/premium/PanelListener.java | Fixed UUID comparison using equals() instead of == for plot owner verification |
| src/main/java/com/modnmetl/virtualrealty/configs/PluginConfiguration.java | Added Pl3xMap configuration options and enabled debug mode |
| src/main/java/com/modnmetl/virtualrealty/VirtualRealty.java | Integrated Pl3xMap manager initialization and registration |
| pom.xml | Added Pl3xMap dependency and updated version to 2.8.5 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @EventHandler(priority = EventPriority.LOW) | ||
| public void onDripleafStateChange(EntityChangeBlockEvent e) { | ||
| if (e.isCancelled()) | ||
| return; | ||
|
|
||
| // Only handle dripleaf tilting (state changes, not breaking) | ||
| if (!isDripleaf(e.getBlock().getType())) | ||
| return; | ||
|
|
||
| // If the dripleaf is being broken (set to AIR), let the BlockBreakEvent handle it | ||
| if (e.getTo() == Material.AIR) | ||
| return; | ||
|
|
||
| // This is a state change (tilting), allow it without requiring BREAK permission | ||
| // No permission check needed for dripleaf tilting | ||
| } |
There was a problem hiding this comment.
The method onDripleafStateChange doesn't perform any meaningful action - it only has early returns and comments. This suggests the method is incomplete or the logic should be consolidated with the existing onEndermanChangeBlock method that already handles dripleaf state changes.
| @EventHandler(priority = EventPriority.LOW) | |
| public void onDripleafStateChange(EntityChangeBlockEvent e) { | |
| if (e.isCancelled()) | |
| return; | |
| // Only handle dripleaf tilting (state changes, not breaking) | |
| if (!isDripleaf(e.getBlock().getType())) | |
| return; | |
| // If the dripleaf is being broken (set to AIR), let the BlockBreakEvent handle it | |
| if (e.getTo() == Material.AIR) | |
| return; | |
| // This is a state change (tilting), allow it without requiring BREAK permission | |
| // No permission check needed for dripleaf tilting | |
| } |
|
|
||
| @Comment("Debug mode (Displays more detailed info about plugin executions)") | ||
| public boolean debugMode = false; | ||
| public boolean debugMode = true; |
There was a problem hiding this comment.
Debug mode is enabled by default. This should typically be false in production code to avoid excessive logging.
| public boolean debugMode = true; | |
| public boolean debugMode = false; |
No description provided.