Skip to content
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

Change method signature of allowBreak method in main class #1406

Merged
merged 1 commit into from Jun 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -3440,7 +3440,11 @@ public String allowBreak(Player player, Block block, Location location)
return this.allowBreak(player, block, location, null);
}

public String allowBreak(Player player, Block block, Location location, BlockBreakEvent breakEvent)
public String allowBreak(Player player, Block block, Location location, BlockBreakEvent breakEvent) {
return this.allowBreak(player, block.getType(), location, breakEvent);
}

public String allowBreak(Player player, Material material, Location location, BlockBreakEvent breakEvent)
{
if (!GriefPrevention.instance.claimsEnabledForWorld(location.getWorld())) return null;

Expand Down Expand Up @@ -3475,7 +3479,7 @@ public String allowBreak(Player player, Block block, Location location, BlockBre
playerData.lastClaim = claim;

//if not in the wilderness, then apply claim rules (permissions, etc)
String cancel = claim.allowBreak(player, block.getType());
String cancel = claim.allowBreak(player, material);
if (cancel != null && breakEvent != null)
{
PreventBlockBreakEvent preventionEvent = new PreventBlockBreakEvent(breakEvent);
Expand Down