Skip to content

Commit

Permalink
Update 1.2.1 (#16)
Browse files Browse the repository at this point in the history
Fix PlotManager#getMergedPlot
  • Loading branch information
KCodeYT authored Aug 14, 2022
1 parent 07d6a82 commit 66cb85c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ms.kevi</groupId>
<artifactId>plotplugin</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -26,7 +26,7 @@
<dependency>
<groupId>cn.powernukkitx</groupId>
<artifactId>powernukkitx</artifactId>
<version>1.19.20-r1</version>
<version>1.19.20-r4</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ms/kevi/plotplugin/manager/PlotManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public Plot getMergedPlot(int x, int z) {
final int plotSize = this.levelSettings.getPlotSize();
final int totalSize = this.levelSettings.getTotalSize();

final int idX = x / totalSize;
final int idZ = z / totalSize;
final int idX = x >= 0 ? x / totalSize : (x / totalSize) - 1;
final int idZ = x >= 0 ? z / totalSize : (z / totalSize) - 1;

final int difX = x >= 0 ? x % totalSize : Math.abs((x - plotSize + 1) % totalSize);
final int difZ = z >= 0 ? z % totalSize : Math.abs((z - plotSize + 1) % totalSize);
Expand Down Expand Up @@ -159,8 +159,8 @@ private PlotId getPlotIdByPos(int x, int z) {
final int plotSize = this.levelSettings.getPlotSize();
final int totalSize = plotSize + this.levelSettings.getRoadSize();

final int idX = x / totalSize;
final int idZ = z / totalSize;
final int idX = x >= 0 ? x / totalSize : (x / totalSize) - 1;
final int idZ = x >= 0 ? z / totalSize : (z / totalSize) - 1;

final int difX = x >= 0 ? x % totalSize : Math.abs((x - plotSize + 1) % totalSize);
final int difZ = z >= 0 ? z % totalSize : Math.abs((z - plotSize + 1) % totalSize);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Plots
version: "1.2.0"
version: "1.2.1"
api: [ "1.0.13" ]
author: Kevims
main: ms.kevi.plotplugin.PlotPlugin

0 comments on commit 66cb85c

Please sign in to comment.