Skip to content

Merge Zivush1/VirtualRealty#74

Merged
BenCodez merged 3 commits intoBenCodez:mainfrom
Zivush1:main
Oct 5, 2025
Merged

Merge Zivush1/VirtualRealty#74
BenCodez merged 3 commits intoBenCodez:mainfrom
Zivush1:main

Conversation

@BenCodez
Copy link
Copy Markdown
Owner

@BenCodez BenCodez commented Oct 5, 2025

No description provided.

@BenCodez BenCodez requested a review from Copilot October 5, 2025 19:20
Copy link
Copy Markdown

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

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.

Comment on lines +527 to +542
@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
}
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
@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
}

Copilot uses AI. Check for mistakes.

@Comment("Debug mode (Displays more detailed info about plugin executions)")
public boolean debugMode = false;
public boolean debugMode = true;
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

Debug mode is enabled by default. This should typically be false in production code to avoid excessive logging.

Suggested change
public boolean debugMode = true;
public boolean debugMode = false;

Copilot uses AI. Check for mistakes.
@BenCodez BenCodez merged commit 7fa9b63 into BenCodez:main Oct 5, 2025
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