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

Bonus range was not being used in the range #2572

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>3.1.0</build.version>
<build.version>3.1.1</build.version>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<server.jars>${project.basedir}/lib</server.jars>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ public ImmutableSet<UUID> getMemberSet() {
* @return the minProtectedX
*/
public int getMinProtectedX() {
return Math.max(getMinX(), getProtectionCenter().getBlockX() - protectionRange);
return Math.max(getMinX(), getProtectionCenter().getBlockX() - this.getProtectionRange());
}

/**
Expand All @@ -488,7 +488,7 @@ public int getMinProtectedX() {
* @since 1.5.2
*/
public int getMaxProtectedX() {
return Math.min(getMaxX(), getProtectionCenter().getBlockX() + protectionRange);
return Math.min(getMaxX(), getProtectionCenter().getBlockX() + this.getProtectionRange());
}

/**
Expand All @@ -498,7 +498,7 @@ public int getMaxProtectedX() {
* @return the minProtectedZ
*/
public int getMinProtectedZ() {
return Math.max(getMinZ(), getProtectionCenter().getBlockZ() - protectionRange);
return Math.max(getMinZ(), getProtectionCenter().getBlockZ() - this.getProtectionRange());
}

/**
Expand All @@ -509,7 +509,7 @@ public int getMinProtectedZ() {
* @since 1.5.2
*/
public int getMaxProtectedZ() {
return Math.min(getMaxZ(), getProtectionCenter().getBlockZ() + protectionRange);
return Math.min(getMaxZ(), getProtectionCenter().getBlockZ() + this.getProtectionRange());
}

/**
Expand Down Expand Up @@ -957,9 +957,9 @@ public boolean onIsland(@NonNull Location target) {
|| this.getPlugin().getIWM().isIslandNether(target.getWorld())
|| this.getPlugin().getIWM().isIslandEnd(target.getWorld()))
&& target.getBlockX() >= this.getMinProtectedX()
&& target.getBlockX() < (this.getMinProtectedX() + this.protectionRange * 2)
&& target.getBlockX() < (this.getMinProtectedX() + this.getProtectionRange() * 2)
&& target.getBlockZ() >= this.getMinProtectedZ()
&& target.getBlockZ() < (this.getMinProtectedZ() + this.protectionRange * 2);
&& target.getBlockZ() < (this.getMinProtectedZ() + this.getProtectionRange() * 2);
}

/**
Expand Down
Loading
Loading