Skip to content

Commit

Permalink
Bonus range was not being used in the range
Browse files Browse the repository at this point in the history
tastybento committed Dec 17, 2024
1 parent 4bd7f46 commit c6cd8f3
Showing 3 changed files with 336 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
@@ -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());
}

/**
@@ -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());
}

/**
@@ -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());
}

/**
@@ -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());
}

/**
@@ -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);
}

/**
Loading

0 comments on commit c6cd8f3

Please sign in to comment.